ori-drs / alphasense_description

URDF Model of the Alphasense Dev Kit
Apache License 2.0
0 stars 1 forks source link

Add Gazebo simulation plug-in for IMU and camera modules #4

Open 2b-t opened 10 months ago

2b-t commented 10 months ago

This pull request adds IMU and camera simulation modules for the Alphasense. In the process it was necessary to rotate the _optical_frame as it was not oriented correctly (see the images below). The old incorrect frame still exists as _frame:

Before After
Before After
Before After

There are still some frame inconsistencies that persist. The links do not have the same name as the ones published by the Alphasense driver. The Alphasense driver publishes camX_sensor_frame where X is an integer while the ones inside the URDF are called cam_front_left, cam_front_right, cam_side_right, ... Similarly for the IMU where the driver publishes imu_sensor_frame but inside the URDF the corresponding link is called alphasense_imu. I do not want to fix these inconsistencies as they might break somebody's URDF that build on them.

The current configuration neglects lens distortion. The reason for this is that the kalibr calibration values I have at hand only output distortion values for the equidistant distortion model (see here) while Gazebo only supports the radial tangential Brown–Conrady (see here). More information about this can be found on several issues on kalibr (e.g. #17 and #226). Somebody posted also a Matlab script for approximating the equidistant distortion model with the Brown-Conrady (RadTan) distortion model.

mmattamala commented 10 months ago

Thanks for making this as well @2b-t There are many things that are wrong in the alphasense driver (from Sevensense):

mcamurri commented 10 months ago

I agree with @mmattamala. I designed the camera modules for this description and I followed the z-forward convention as it is the standard one for cameras.

The naming for the modules were chosen to clearly identify each camera on the frontier, and not to copy what the alphasense driver does.

A possible approach to solve might be the following:

@2b-t Keep in mind that a widely used package that depends on this repo and hesai_description is the Phasma description: https://github.com/Hilti-Research/phasma_description

We should either update their README to tell their users to point to a specific tag of hesai_description and alphasense_description, or add a submodule to it. In this way these two packages can be updated without the fear of breaking someone else's project.