You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package contains a simple publishing and subscribing node implementation. The subscribing node uses ApproximateTime policy to synchronize messages from three publishers.
The file test_composable_nodes.launch.py contains the following block:
(Here the third publishing node is a publishing lifecycle node for the sake of test, though the behavior can be observed also when replacing it with another standard publishing node).
Run with the command:
ros2 launch composable_nodes_test_pkg test_composable_nodes.launch.py
Then swap the publish frequency parameter between publisher_node2 and publisher_node3:
The synchronized callback in the subscribing nodes should be called consistently in both situations, regardless of the publishing frequencies.
Actual behavior
In the first case (30, 20, 10 Hz), the Synchronizer callback works as expected. However, in the second case (30, 10, 20 Hz), the callback stops being called after a certain amount of time.
Additional Information
This behavior suggests that the ApproximateTime Synchronizer in ROS2 may have inconsistent performance when one of the topics has a higher message rate than the others. The issue seems to be specifically related to the relative frequencies of the publishers, particularly when the third topic has a higher frequency than at least one of the other two.
The text was updated successfully, but these errors were encountered:
Could this be related? ros-perception/image_pipeline#1037
I posted the question for the ros perception repo, but they mentioned it might have something to do with the message filters.
Bug report
Required Info:
Steps to reproduce issue
To test the issue, you can use composable_nodes_test_pkg from:
https://github.com/Deduard/ros2_demo/
The package contains a simple publishing and subscribing node implementation. The subscribing node uses ApproximateTime policy to synchronize messages from three publishers.
The file test_composable_nodes.launch.py contains the following block:
/***
ComposableNode(
package='composable_nodes_test_pkg',
plugin='PublisherNode',
name='publisher_node1',
parameters=[
{'publish_frequency': 30.0,
'topic': 'topic1'}
],
),
ComposableNode(
package='composable_nodes_test_pkg',
plugin='PublisherNode',
name='publisher_node2',
parameters=[
{'publish_frequency': 20.0,
'topic': 'topic2'}
],
),
ComposableNode(
package='composable_nodes_test_pkg',
plugin='PublisherLifecycleNode',
name='publisher_node3',
parameters=[
{'publish_frequency': 10.0,
'topic': 'topic3'}
],
),
***/
(Here the third publishing node is a publishing lifecycle node for the sake of test, though the behavior can be observed also when replacing it with another standard publishing node).
Run with the command:
ros2 launch composable_nodes_test_pkg test_composable_nodes.launch.py
Then swap the publish frequency parameter between publisher_node2 and publisher_node3:
/***
ComposableNode(
package='composable_nodes_test_pkg',
plugin='PublisherNode',
name='publisher_node1',
parameters=[
{'publish_frequency': 30.0,
'topic': 'topic1'}
],
),
ComposableNode(
package='composable_nodes_test_pkg',
plugin='PublisherNode',
name='publisher_node2',
parameters=[
{'publish_frequency': 10.0,
'topic': 'topic2'}
],
),
ComposableNode(
package='composable_nodes_test_pkg',
plugin='PublisherLifecycleNode',
name='publisher_node3',
parameters=[
{'publish_frequency': 20.0,
'topic': 'topic3'}
],
),
***/
and run again.
Expected behavior
The synchronized callback in the subscribing nodes should be called consistently in both situations, regardless of the publishing frequencies.
Actual behavior
In the first case (30, 20, 10 Hz), the Synchronizer callback works as expected. However, in the second case (30, 10, 20 Hz), the callback stops being called after a certain amount of time.
Additional Information
This behavior suggests that the ApproximateTime Synchronizer in ROS2 may have inconsistent performance when one of the topics has a higher message rate than the others. The issue seems to be specifically related to the relative frequencies of the publishers, particularly when the third topic has a higher frequency than at least one of the other two.
The text was updated successfully, but these errors were encountered: