Field-Robotics-Japan / UnitySensors

ROS/ROS2 enabled Sensor models (Assets) on Unity
Apache License 2.0
191 stars 28 forks source link

Raycast origin of lidar sensor #152

Open Autumn60 opened 4 months ago

Autumn60 commented 4 months ago

For some LiDAR sensors, the origin of the laser oscillation and the origin of the point cloud coordinates are different. UnitySensors' ScanPatterns do not take into account the origin of the laser oscillation.

sensorOrigin2LaserOriginOffset(Vector3) parameter must be added to the ScanPattern.

image Source: Livox user manual for Mid-70

image Source: Velodyne Datasheet for "Alpha Prime"

RyodoTanaka commented 4 months ago

@Autumn60 About Mid70, the sensorOrigin2LaserOriginOffset(Vector3) parameter looks not need. Because, only adding the scan frame inside of the origin frame is needed. But, about the Alpha prime sensor, the way I mentioned is not enough, and the sensorOrigin2LaserOriginOffset(Vector3) parameter is needed. Because the scan frame will dynamically moves.