rviz: laser scans not showing when fixed frame is not equal to the laser scans frame id
I see this on Ubuntu 18.04 with the bouncy deb binaries.
Steps to reproduce:
ros2 launch dummy_robot_bringup dummy_robot_bringup.launch.pyrviz2- Add a display by topic and use
/scan - Add the tf display
- Add a map display for
/map - Set the fixed frame to
world
You’ll see the map and the tf frames moving, but no laser scan. If you look at the laser display you’ll see that the status is Ok, but the Points field just says Showing [0] points from [0] messages and it is not rendered. I would expect it to be rendered.
If you change the fixed frame to single_rrbot_hokuyo_link you can see the laser scans and the status adds the Transform: Ok status. However, the map no longer renders and prints to the console [ERROR] [rviz2]: Error transforming map 'Map' from frame 'world' to 'single_rrbot_hokuyo_link'. and it also sets a similar message, Could not transform from [world] to [single_rrbot_hokuyo_link] in the status part of the map display.
My expectation is that both the laser and map should work in either (or any) fixed frame.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (13 by maintainers)
Commits related to this issue
- Fix map display for moving TF frame Instead of the current time, use Time(0) to get the latest available transform as a fallback. This is the same logic that is applied in RViz from ROS 1. Resolves ... — committed to ros2/rviz by jacobperron 5 years ago
- Fix map display for moving TF frame (#483) Instead of the current time, use Time(0) to get the latest available transform as a fallback. This is the same logic that is applied in RViz from ROS 1. ... — committed to ros2/rviz by jacobperron 5 years ago
- Fix map display for moving TF frame (#483) Instead of the current time, use Time(0) to get the latest available transform as a fallback. This is the same logic that is applied in RViz from ROS 1. ... — committed to ros2/rviz by jacobperron 5 years ago
- Fix map display for moving TF frame (#483) Instead of the current time, use Time(0) to get the latest available transform as a fallback. This is the same logic that is applied in RViz from ROS 1. ... — committed to ros2/rviz by jacobperron 5 years ago
- Fix map display for moving TF frame (#483) (#579) Instead of the current time, use Time(0) to get the latest available transform as a fallback. This is the same logic that is applied in RViz from RO... — committed to ros2/rviz by jacobperron 4 years ago
- Fix map display for moving TF frame (#483) (#582) Instead of the current time, use Time(0) to get the latest available transform as a fallback. This is the same logic that is applied in RViz from RO... — committed to ros2/rviz by jacobperron 4 years ago
See https://github.com/ros2/rviz/pull/483 for a fix.
[Case 1]
Ubuntu 16.04ROS2 Bouncy Bolson(build from source code)dummy_robot_bringupandrviz2I am also in the same state as you. The laser scans not showing when fixed frame is not equal to the frame_id of laser scans. In addition, setting the fixed frame to world, single_rrbot_link1, and single_rrbot_link2 did not show the laser value. So I set it to single_rrbot_link3, single_rrbot_camera_link, single_rrbot_hokuyo_link, and I could see the laser value at rviz2.
[Case 2]
Ubuntu 16.04ROS2 Bouncy Bolson(build from source code)rviz2I can’t see the laser data on rviz2 even if the fixed frame is the same as the frame_id of topic of /scan.
The status of rviz2 is
Okand it saysxxxxx message received, but the Points field just saysShowing [0] points from [0] messages.