webots icon indicating copy to clipboard operation
webots copied to clipboard

RpLidarA2 - rotating bugs meansurements

Open delihus opened this issue 3 years ago • 6 comments

Describe the Bug While preparing package webots_ros2_husarion I discovered that RpLidarA2 is not working properly. image

image

Here commented this line:

# type "rotating"

image

delihus avatar Nov 21 '22 18:11 delihus

I can't reproduce your issue. In the sample world the Lidar seems to work perfectly fine.

rosbot_1

Can the problem come from the ROS2 package? Or maybe from RViz? Are you making any transformation to the Lidar data before displaying it?

Could you please provide a minimal example with the failure, so that I can reproduce it?

ygoumaz avatar Nov 22 '22 08:11 ygoumaz

After further investigation on the Lidar and your project (following up our discussion on Discord), there is indeed a bug with the (rotating?) Lidars. Here is what I have observed:

  • All Lidars display correctly the point cloud inside Webots, including RPLidarA2, whatever their field of view is.
  • As reported by @delihus, the measurements of the Lidar (not the point cloud) are wrong for a field of view of 1.57 on the RPLidarA2. This corresponds to the /scan topic in webots_ros2 and has only been observed in RViz (for now). Measurements may be wrong in Webots too.
  • Increasing the field of view to 6.28 fixes the RPLidarA2 measurements.
  • The point cloud is not correctly displayed in Rviz (/scan/point_cloud topic). Points are correct but the complete pattern is rotated by 180 degrees.

I still need to investigate if the wrong measurements are coming from Webots or when writing to webots_ros2 topics.

ygoumaz avatar Dec 13 '22 09:12 ygoumaz

Thank you @ygoumaz!

I will also show the others what is happening then slam-toolbox is mapping.

Screenshot from 2022-11-23 23-22-43 Screenshot from 2022-11-24 02-10-47

I can't wait. Best regards, Jakub

delihus avatar Dec 13 '22 09:12 delihus

Hello,

I faced the same issues mentioned using slam_toolbox with Webots. I observed the odometry values coming from the diff_drive node started to drift quite a lot in short time period. As mentioned in the documentation, slam_toolbox requires high quality odometry, so this could be one of the reasons. Also, fine tuning of the config params may be required

I got better results using cartographer out of the box with the turtlebot demo: https://ros2-industrial-workshop.readthedocs.io/en/latest/_source/navigation/ROS2-Cartographer.html. My guess is that the algorithm in cartographer is more robust to noisier odometry.

I hope this could help.

Best regards,

toshiharutf avatar Jan 05 '23 03:01 toshiharutf

Thank you @ygoumaz!

I will also show the others what is happening then slam-toolbox is mapping.

Screenshot from 2022-11-23 23-22-43 Screenshot from 2022-11-24 02-10-47

I can't wait. Best regards, Jakub

Hello, I am using the slam_toolbox for the webots_ros2_tiago demo and I am having same issue as you. how did you fix it?

shiven2001 avatar Jan 29 '25 17:01 shiven2001

@shiven2001 Actually I used cartographer_ros instead of slam_toolbox and it does not have this issue

delihus avatar Mar 10 '25 11:03 delihus