ouster-lidar / ouster-ros

Official ROS drivers for Ouster sensors (OS0, OS1, OS2, OSDome)
https://ouster.com
Other
116 stars 138 forks source link

incorrect 2d laser scan tf(both horizontal and vertical inversion) #221

Open flymaxty opened 11 months ago

flymaxty commented 11 months ago

Describe the bug Hi all, when I use ouster on ROS noetic with this package, I found that 2d laser scan has an incorrect tf. I'm not sure if I miss something.

To Reproduce Steps to reproduce the behavior (steps below are just an example):

  1. source ros environment
  2. compile the project workspace
  3. source the project workspace
  4. roslaunch ouster_ros driver.launch sensor_hostname:=192.168.33.7
  5. add /scan to rviz, and put it to white color.
  6. observe the issue ...

Screenshots Screenshot from 2023-09-28 09-43-31

as you can see laser scan(white dots) is totally different from pointcloud, it seems both horizontal(left right) inversion and vertical(up-down) inversion.

Platform (please complete the following information):

Samahu commented 11 months ago

I think this can be explained by the fact that the ROS1 driver version publishes PointCloud in in the "sensor frame" by default. However, the LaserScan message is published in "lidar frame". Currently, you can not change the frame of LaserScan message but you can change the reference frame for the PointCloud message. Not that even with this there is a bit of misalignment on that I spent some time to address (currently focusing on ROS2 PRs = {#203, #204} but will back port to ROS1 once finalized).