Skip to content

Commit 680f21c

Browse files
authored
Merge branch 'ros2:rolling' into patch-8
2 parents d441e1f + f7112b1 commit 680f21c

File tree

24 files changed

+215
-112
lines changed

24 files changed

+215
-112
lines changed

rviz2/CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Changelog for package rviz2
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
14.3.1 (2024-10-11)
6+
-------------------
7+
8+
14.3.0 (2024-10-03)
9+
-------------------
10+
511
14.2.6 (2024-08-28)
612
-------------------
713

rviz2/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
schematypens="http://www.w3.org/2001/XMLSchema"?>
55
<package format="2">
66
<name>rviz2</name>
7-
<version>14.2.6</version>
7+
<version>14.3.1</version>
88
<description>
99
3D visualization tool for ROS.
1010
</description>

rviz_assimp_vendor/CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Changelog for package rviz_assimp_vendor
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
14.3.1 (2024-10-11)
6+
-------------------
7+
8+
14.3.0 (2024-10-03)
9+
-------------------
10+
511
14.2.6 (2024-08-28)
612
-------------------
713

rviz_assimp_vendor/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
schematypens="http://www.w3.org/2001/XMLSchema"?>
55
<package format="2">
66
<name>rviz_assimp_vendor</name>
7-
<version>14.2.6</version>
7+
<version>14.3.1</version>
88
<description>
99
Wrapper around assimp, providing nothing but a dependency on assimp, on some systems.
1010
On others, it provides a fixed CMake module or even an ExternalProject build of assimp.

rviz_common/CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
Changelog for package rviz_common
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
14.3.1 (2024-10-11)
6+
-------------------
7+
* Handle time source exception (`#1285 <https://github.com/ros2/rviz/issues/1285>`_)
8+
* Contributors: Matthew Foran
9+
10+
14.3.0 (2024-10-03)
11+
-------------------
12+
513
14.2.6 (2024-08-28)
614
-------------------
715
* Fully handle `Tool::processKeyEvent` return value (`#1270 <https://github.com/ros2/rviz/issues/1270>`_)

rviz_common/include/rviz_common/message_filter_display.hpp

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
#include <tf2_ros/message_filter.h>
3535
#include <memory>
36+
#include <string>
3637

3738
#include <message_filters/subscriber.hpp>
3839

@@ -207,19 +208,33 @@ class MessageFilterDisplay : public _RosTopicDisplay
207208
auto msg = std::static_pointer_cast<const MessageType>(type_erased_msg);
208209

209210
++messages_received_;
211+
rviz_common::properties::StatusProperty::Level topic_status_level =
212+
rviz_common::properties::StatusProperty::Ok;
210213
QString topic_str = QString::number(messages_received_) + " messages received";
211214
// Append topic subscription frequency if we can lock rviz_ros_node_.
212215
std::shared_ptr<ros_integration::RosNodeAbstractionIface> node_interface =
213216
rviz_ros_node_.lock();
214217
if (node_interface != nullptr) {
215-
const double duration =
216-
(node_interface->get_raw_node()->now() - subscription_start_time_).seconds();
217-
const double subscription_frequency =
218-
static_cast<double>(messages_received_) / duration;
219-
topic_str += " at " + QString::number(subscription_frequency, 'f', 1) + " hz.";
218+
try {
219+
const double duration =
220+
(node_interface->get_raw_node()->now() - subscription_start_time_).seconds();
221+
const double subscription_frequency =
222+
static_cast<double>(messages_received_) / duration;
223+
topic_str += " at " + QString::number(subscription_frequency, 'f', 1) + " hz.";
224+
} catch (const std::runtime_error & e) {
225+
if (std::string(e.what()).find("can't subtract times with different time sources") !=
226+
std::string::npos)
227+
{
228+
topic_status_level = rviz_common::properties::StatusProperty::Warn;
229+
topic_str += ". ";
230+
topic_str += e.what();
231+
} else {
232+
throw;
233+
}
234+
}
220235
}
221236
setStatus(
222-
properties::StatusProperty::Ok,
237+
topic_status_level,
223238
"Topic",
224239
topic_str);
225240

rviz_common/include/rviz_common/ros_topic_display.hpp

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,18 +264,32 @@ class RosTopicDisplay : public _RosTopicDisplay
264264

265265
++messages_received_;
266266
QString topic_str = QString::number(messages_received_) + " messages received";
267+
rviz_common::properties::StatusProperty::Level topic_status_level =
268+
rviz_common::properties::StatusProperty::Ok;
267269
// Append topic subscription frequency if we can lock rviz_ros_node_.
268270
std::shared_ptr<ros_integration::RosNodeAbstractionIface> node_interface =
269271
rviz_ros_node_.lock();
270272
if (node_interface != nullptr) {
271-
const double duration =
272-
(node_interface->get_raw_node()->now() - subscription_start_time_).seconds();
273-
const double subscription_frequency =
274-
static_cast<double>(messages_received_) / duration;
275-
topic_str += " at " + QString::number(subscription_frequency, 'f', 1) + " hz.";
273+
try {
274+
const double duration =
275+
(node_interface->get_raw_node()->now() - subscription_start_time_).seconds();
276+
const double subscription_frequency =
277+
static_cast<double>(messages_received_) / duration;
278+
topic_str += " at " + QString::number(subscription_frequency, 'f', 1) + " hz.";
279+
} catch (const std::runtime_error & e) {
280+
if (std::string(e.what()).find("can't subtract times with different time sources") !=
281+
std::string::npos)
282+
{
283+
topic_status_level = rviz_common::properties::StatusProperty::Warn;
284+
topic_str += ". ";
285+
topic_str += e.what();
286+
} else {
287+
throw;
288+
}
289+
}
276290
}
277291
setStatus(
278-
properties::StatusProperty::Ok,
292+
topic_status_level,
279293
"Topic",
280294
topic_str);
281295

rviz_common/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
schematypens="http://www.w3.org/2001/XMLSchema"?>
55
<package format="2">
66
<name>rviz_common</name>
7-
<version>14.2.6</version>
7+
<version>14.3.1</version>
88
<description>
99
Common rviz API, used by rviz plugins and applications.
1010
</description>

rviz_default_plugins/CHANGELOG.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
Changelog for package rviz_default_plugins
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
14.3.1 (2024-10-11)
6+
-------------------
7+
* Handle time source exception (`#1285 <https://github.com/ros2/rviz/issues/1285>`_)
8+
* Contributors: Matthew Foran
9+
10+
14.3.0 (2024-10-03)
11+
-------------------
12+
* replace deprecated encodings 'yuv422' and 'yuv422_yuy2' (`#1276 <https://github.com/ros2/rviz/issues/1276>`_)
13+
* Contributors: Christian Rauch
14+
515
14.2.6 (2024-08-28)
616
-------------------
717
* Update urdf model.h deprecation (`#1266 <https://github.com/ros2/rviz/issues/1266>`_)

rviz_default_plugins/include/rviz_default_plugins/displays/image/image_transport_display.hpp

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#define RVIZ_DEFAULT_PLUGINS__DISPLAYS__IMAGE__IMAGE_TRANSPORT_DISPLAY_HPP_
3535

3636
#include <memory>
37+
#include <string>
3738

3839
#include "get_transport_from_topic.hpp"
3940
#include "image_transport/image_transport.hpp"
@@ -171,18 +172,32 @@ class ImageTransportDisplay : public rviz_common::_RosTopicDisplay
171172

172173
++messages_received_;
173174
QString topic_str = QString::number(messages_received_) + " messages received";
175+
rviz_common::properties::StatusProperty::Level topic_status_level =
176+
rviz_common::properties::StatusProperty::Ok;
174177
// Append topic subscription frequency if we can lock rviz_ros_node_.
175178
std::shared_ptr<rviz_common::ros_integration::RosNodeAbstractionIface> node_interface =
176179
rviz_ros_node_.lock();
177180
if (node_interface != nullptr) {
178-
const double duration =
179-
(node_interface->get_raw_node()->now() - subscription_start_time_).seconds();
180-
const double subscription_frequency =
181-
static_cast<double>(messages_received_) / duration;
182-
topic_str += " at " + QString::number(subscription_frequency, 'f', 1) + " hz.";
181+
try {
182+
const double duration =
183+
(node_interface->get_raw_node()->now() - subscription_start_time_).seconds();
184+
const double subscription_frequency =
185+
static_cast<double>(messages_received_) / duration;
186+
topic_str += " at " + QString::number(subscription_frequency, 'f', 1) + " hz.";
187+
} catch (const std::runtime_error & e) {
188+
if (std::string(e.what()).find("can't subtract times with different time sources") !=
189+
std::string::npos)
190+
{
191+
topic_status_level = rviz_common::properties::StatusProperty::Warn;
192+
topic_str += ". ";
193+
topic_str += e.what();
194+
} else {
195+
throw;
196+
}
197+
}
183198
}
184199
setStatus(
185-
rviz_common::properties::StatusProperty::Ok,
200+
topic_status_level,
186201
"Topic",
187202
topic_str);
188203

0 commit comments

Comments
 (0)