ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ROS node to send USB camera frames appears to affect TF tree & Nav2 and cause delays on Turtlebot3. Any suggestions?

asked 2022-12-30 07:30:29 -0500

Reuben gravatar image

updated 2023-01-02 23:06:00 -0500

Original Title: Nav2 outputs “Message Filter dropping message” when attempting to run a node to publish video stream (using OpenCV) from USB camera on Turtlebot3

Edited title to be more specific. I am using ROS 2 Foxy on Ubuntu 20.04.4 LTS with the Turtlebot3 (Raspberry Pi 4) and attempting to do navigation in a small maze like environment and also to react to ArUco tags using a USB Camera. I am running the camera node on the Turtlebot directly and I have code which uses the Nav2 Simple Commander and the camera output running on my laptop. I am setting the inital pose using the Simple Commander and I’ve found that when I don’t start my camera node, everything works normally and eventually Nav2 won’t output any new messages on the terminal.

However, as soon as I run my camera stream publishing node, Nav2 continuously outputs the following type of message,

[rviz2-10] [INFO] [1672403578.861224983] [rviz2]: Message Filter dropping message: frame 'base_scan' at time 1672403577.690 for reason 'Unknown'

[amcl-2] [INFO] [1672403578.927933387] [amcl_rclcpp_node]: Message Filter dropping message: frame 'base_scan' at time 1672403577.796 for reason 'Unknown'

Sometimes the messages stop for a moment but then continue again. When I try to proceed with navigation with this output, the rviz output appears glitchy as the Turtlebot3 position gets stuck for a few moments before updating. During this glitch, the actual Turtlebot appears to just move in whatever direction it was already in before nav2 takes over again.

The current code I’m using for publishing camera frames is based on this tutorial ( but I’ve also tried the usb_cam ( and v4l2 ( packages and I have the same issues.

I also want to add that I’m using Paolorugg’s workaround from and using a modified burger.yaml file which I can share if needed.

How can I fix this or is there another way I can publish image frames from the USB camera connected to the Turtlebot?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2023-01-05 06:30:23 -0500

Mike Scheutzow gravatar image

These kinds of issues can be caused by trying to send too much data over wifi. Use ros2 topic bw ... to check the amount of data being published for a topic. You can reduce the camera data rate by reducing the image resolution, or reducing the image frame rate, or using image compression.

You may also want to look at #q408654. Some users believe that in ros2, the DDS probing over wifi may waste a lot of bandwidth.

edit flag offensive delete link more


Hi Mike, thank you for your advice. When I wrote this question, I had tried reducing the resolution and the publishing rate but I was still having issues. One thing that I tried was using a larger (32gb) SD card with just essential code and packages (earlier used a 16gb SD card which was 80% full) and Nav2 appears to be working alright now, although I did run into the same error again yesterday and had to reduce publishing rate to alleviate it.

I’ll also try using ros2 topic bw and image compression. I saw your link and wanted to share these links which seem to be related. Thanks again!

Reuben gravatar image Reuben  ( 2023-01-05 22:36:14 -0500 )edit

Thanks for the links. I hadn't read those particular discussions.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2023-01-06 06:51:32 -0500 )edit

Question Tools



Asked: 2022-12-30 07:30:29 -0500

Seen: 330 times

Last updated: Jan 05 '23