ROS node to send USB camera frames appears to affect TF tree & Nav2 and cause delays on Turtlebot3. Any suggestions?
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 (https://automaticaddison.com/getting-...) but I’ve also tried the usb_cam (https://github.com/ros-drivers/usb_cam) and v4l2 (https://index.ros.org/r/v4l2_camera/) packages and I have the same issues.
I also want to add that I’m using Paolorugg’s workaround from https://github.com/ROBOTIS-GIT/turtle... 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?