fsstudio-team / ZeroSimROSUnity

Robotic simulation in Unity with ROS integration.
https://roboticsimulationservices.com/
MIT License
168 stars 21 forks source link

match unity-axis and ros-axis about rays about lidar-2D #25

Open OldPaddy opened 2 years ago

OldPaddy commented 2 years ago

The visualized lidar sensor hit places on Rviz are different from its places on Unity when I change Min Angle Degree to different value from initial "0". It worked very well when it still remains "0". I tried fix it. How do you think?

micahpearlman commented 2 years ago

@OldPaddy I'm not sure I understand the issue. Can you describe specifically how to setup an easy test case?

OldPaddy commented 2 years ago

@micahpearlman I'm sorry I didn't make it clear enough. I tested initial turtlebot3 scene like following image. In this case, I changed the "Min Angle Degree" with lidar-2d script to 90 degree. So the lidar FOV is from 90 to 360 degree. It doesn't match Unity and Rviz display.

Screenshot from 2022-04-15 12-06-14 Turtlebot3 tested scene. The display to the left is Unity, the right is Rviz. The upward direction on the image is forward direction.

ghost commented 2 years ago

You can get the same result by manually adjusting the turtlebot definition.

In lidar-2d Transform, set Rotation to X=180, Y=180, Z=0 image

Result: image

ghost commented 2 years ago

You can get the same result by manually adjusting the turtlebot definition by doing the following:

In lidar-2d Transform, set Rotation to X=180, Y=180, Z=0 image

Result: image

OldPaddy commented 2 years ago

@alex-ssom Thank you for your description. I think it's strange the places of the lidar-2d rays are mismatch.

Please let me know if my understanding is wrong.

remco-r commented 2 years ago

@OldPaddy thanks, works for me. Its indeed a bug in ZOLIDAR2D.cs

anqitongxue commented 2 years ago

这里是氨气同学的QQ邮箱,您的邮件我已收到,祝生活愉快~