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.py
  • rviz2
  • 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

Most upvoted comments

[Case 1]

  • Ubuntu 16.04
  • ROS2 Bouncy Bolson (build from source code)
  • Used packages: dummy_robot_bringup and rviz2
$ ros2 launch dummy_robot_bringup dummy_robot_bringup.launch.py
$ rviz2

I 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]

$ ros2 run hls_lfcd_lds_driver hlds_laser_publisher
$ ros2 topic echo /scan

header:
  stamp:
    sec: 1534470809
    nanosec: 149773231
  frame_id: laser
angle_min: 0.0
angle_max: 6.2657318115234375
angle_increment: 0.01745329238474369
time_increment: 2.9930000891909003e-05
scan_time: 0.0
range_min: 0.11999999731779099
range_max: 3.5
ranges: [0.6909999847412109, 0.6710000038146973, 0.671999990940094, 0.6399999856948853, 0.5899999737739563, 0.5590000152587891, 0.5389999747276306, 0.531000018119812, 0.5230000019073486, ....
$ rviz2

I 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 Ok and it says xxxxx message received, but the Points field just says Showing [0] points from [0] messages. rviz2_laserscan