1
$\begingroup$

Our team encountered a peculiar issue while developing with ROS2. We are using the iron version of ROS2, and during intensive communications between multiple nodes (short time intervals but not large data volumes), the ROS2 communication system often randomly freezes for 200-300 milliseconds before resuming communication. This is very troubling for us because a 200-millisecond interruption in communication causes the underlying hardware to detect a timeout, leading to errors.

We wrote a simple project to replicate this issue, which includes the following components: a publisher that sends a message of 1000 bytes at a rate of 10000us, a subscriber that detects the interval between received messages and outputs an error if it exceeds 20ms, and a bad node designed to simulate the stalling behavior of other nodes in the wall_timer.

Project can be found at: https://github.com/BobH233/ECU_test/tree/main/src

When I run both sub and pub, everything is ok:

av_lab@avlab:~/BIT/github/ECU_test$ ros2 run topic_pub topic_pub_exe 
[INFO] [1712645878.677626286] [ecu_error_test_publisher_node]: Publisher node creating...
[INFO] [1712645878.678035256] [ecu_error_test_publisher_node]: Publisher node created.
av_lab@avlab:~/BIT/github/ECU_test$ ros2 run topic_sub topic_sub_exe 
[INFO] [1712645885.034009461] [ecu_error_test_subscriber_node]: Subscriber node creating...
[INFO] [1712645885.034481950] [ecu_error_test_subscriber_node]: Subscriber node created.

But when I run the bad node:

av_lab@avlab:~/BIT/github/ECU_test$ ros2 run bad_node bad_node_exe 
[INFO] [1712646177.526987708] [ecu_error_test_publisher_node]: Bad node creating...
[INFO] [1712646177.527049903] [ecu_error_test_publisher_node]: Bad node created.

Then there is a intermittent of communication:

av_lab@avlab:~/BIT/github/ECU_test$ ros2 run topic_pub topic_pub_exe 
[INFO] [1712645878.677626286] [ecu_error_test_publisher_node]: Publisher node creating...
[INFO] [1712645878.678035256] [ecu_error_test_publisher_node]: Publisher node created.
[ERROR] [1712646020.514055794] [ecu_error_test_publisher_node]: publish took more than 10ms! actual time: 325824548 ns
[ERROR] [1712646194.519824761] [ecu_error_test_publisher_node]: publish took more than 10ms! actual time: 331592877 ns
av_lab@avlab:~/BIT/github/ECU_test$ ros2 run topic_sub topic_sub_exe 
[INFO] [1712645885.034009461] [ecu_error_test_subscriber_node]: Subscriber node creating...
[INFO] [1712645885.034481950] [ecu_error_test_subscriber_node]: Subscriber node created.
[ERROR] [1712645903.006964024] [ecu_error_test_subscriber_node]: subscriber recv more than 20ms! actual time: 238330999 ns
[ERROR] [1712646020.514328248] [ecu_error_test_subscriber_node]: subscriber recv more than 20ms! actual time: 335667350 ns
[ERROR] [1712646047.772820274] [ecu_error_test_subscriber_node]: subscriber recv more than 20ms! actual time: 234432125 ns

And about 300ms delay occured.

$\endgroup$

1 Answer 1

0
$\begingroup$

what kind of rmw_implementation are you currently using? In the past we had problems with sending pointcloud data. For us the rmw_cyclonedds_cpp solved it. See iron Wiki

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.