Ask Your Question

[ros2] sensor message publisher does not abandon old data

asked 2019-08-23 17:45:35 -0500

johnconn gravatar image

I am streaming small pointclouds over wifi for navigation2 using opensplice as my dds impl.

Sometimes, I get messages like these for minutes at a time:

[world_model-4] [INFO] [global_costmap.global_costmap_rclcpp_node]: [signalFailure] Drop message: frame 'camera_depth_optical_frame' at time 1566597372.636 for reason(1)

I looked into what reason(1) is and saw that it is 'OutTheBack'.

I then started echoing the pointcloud data and my tf data to my terminal.

When my system is working well, both topics are publishing data at >10Hz with real-time time stamps .

However, sometimes my system enters a state where the pointcloud data is still publishing fast (>10Hz) but it starts to lag behind real-time, until it gets so bad that my most recent pointcloud data is 10 seconds stale compared to my most recent transform data.

I believe this is what's causing my 'OutTheBack' error.

What can I do to fix this? Currently, my publisher and subscriber are set to 'sensor' quality of service, with a depth of 10.

I recently moved from fastRTPS as my dds impl, where I had never hit this 'OutTheBack' error. This is why I don't believe there is a logic error in the time stamp construction of the message.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-10-18 16:27:02 -0500

johnconn gravatar image

updated 2019-10-18 16:27:40 -0500

Either my publisher or subscriber was incorrectly configured for reliable quality of service, while the other was configured for best effort. When I fixed the system and set both to best effort, my performance improved a lot.

So the answer to this was "programmer error". Whoops!

edit flag offensive delete link more


Hi. I am having the exact same problem as you did. How did you change the code to best effort? My publishers and subscribers also have a qos with depth of 10.

ninamwa gravatar image ninamwa  ( 2019-12-03 05:18:40 -0500 )edit

I usually use the sensor message QoS( rclcpp::SensorDataQoS() ) when I'm looking for best effort.this design doc talks about QoS and mentions sensor QoS tradeoffs.

johnconn gravatar image johnconn  ( 2019-12-03 08:18:31 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-08-23 17:45:35 -0500

Seen: 162 times

Last updated: Oct 18 '19