cyberbotics / webots

Webots Robot Simulator
https://cyberbotics.com
Apache License 2.0
3.2k stars 1.68k forks source link

Mirroring Lidar output #2027

Closed SherlockSheep closed 4 years ago

SherlockSheep commented 4 years ago

When I used webots with ROS, I got mirroring Lidar output when I viewed the scan topic in rviz, as can be seen at 6:12 in video.

To make sure that the problem is not specific-sensor-related, I tried HokuyoUtm30lx and Sick LMS291, and I met the same problem. I wonder why this happens and how I can fix it.

DavidMansolino commented 4 years ago

You're right, the scan seems to be inversed, we will fix this for the next version of Webots that will be released soon.

DavidMansolino commented 4 years ago

The problem is actually due to the fact that the Webots and RVIZ coordinate systems are not equivalent. The Webots X-axis becomes -Y in RVIZ. The Webots Y-axis becomes Z in RVIZ. The Webots Z-axis becomes -X in RVIZ.

DavidMansolino commented 4 years ago

The coordinate system should be the same for the multi-lines and single-line lidars. What difference do you see between them?

SherlockSheep commented 4 years ago

@DavidMansolino Sorry my bad, I should post my screenshots.

This is how I placed Velodyne VLP-16: VLP16_POS

This is how I placed HokuyoUtm30lx: Hokuyo_POS

And I got these in rviz: output

SherlockSheep commented 4 years ago

In the third picture,: z axis points toward the screen for the HokuyoUtm30lx rviz visualization. z axis points outward the screen for the VLP-16 rviz visualization.