Reputation: 21
I am using ros2-humble distro trying to get it working with slam_toolbox. I have converted the depth camera image raw to laserscan using the package from
https://github.com/ros-perception/depthimage_to_laserscan/tree/foxy-devel.
I can see the topic published by the conversion is displaying the laserscan message and giving valid values. Even though I cannot visualize the topic in rviz using laserscan.
But whenever I run the launch file in rviz terminal it displays a line showing
[rviz]: Message Filter dropping message: frame 'camera_depth_frame' at time 5.000 for a reason 'discarding message because the queue is full'.
How do I fix this problem? I have to use it for the slam toolbox to map the environment and cannot use lidar for this scenario.
I tried giving it a very large queue size and also checked if it is really the queue but it looks normal.
Upvotes: 2
Views: 7362
Reputation: 356
I believe there are multiple points that need to be looked at here.
You mention you cannot visualize the topic using RVIZ. Why is that the case You can go to RVIZ and click the 'Add' button on the bottom left of the RVIZ window, click 'By Topic' and select the appropriate topic ( in this case /scan with the frame link set to 'camera_depth_frame' since you seem to be using the default frame name provided by the package in the GIT repo). Once done, make sure you change your Fixed Frame in the Global Options of RVIZ to be 'camera_depth_frame' and not 'map'. This is because there is no tf transform from map -> camera_depth_frame being published. If the above works, it means everything is okay with your data and nodes, you just need to brush up on your RVIZ and ROS basics :)
Regarding the queue being full As you've mentioned, messages are being discarded since the queue is full. The queue is probably full because messages are not being processed and irrespective of what queue size you set, this will always be the case. Messages aren't probably being utilized because of how you've set up the complete tf transform chain in your setup and the other frames do not know or are expecting /scan data in another frame name and not 'camera_depth_frame'? Figuring out what sort of frames have been set up and how they are being utilized could be the fix for your problem. Unfortunately I cannot say more than this since you have not provided details about the frames that have been set up. Can you possibly post your complete /tf chain?
Upvotes: 1