robofit / but_velodyne

ROS packages for Velodyne 3D LIDARs provided by Robo@FIT group.
GNU Lesser General Public License v3.0
142 stars 98 forks source link

Axis rotation around the X axis #33

Closed janu0510 closed 3 years ago

janu0510 commented 3 years ago

Hi,

I am trying to derive the extrinsic parameters by calibrating a VLP16 and a monocular camera. I had a doubt in regards to your code snippet as shown below -

  // x := x, y := -z, z := y,
  pointcloud = Velodyne::Velodyne(pc).transform(0, 0, 0, M_PI / 2, 0, 0);

Is this transformation of axis done just to bring an alignment of the camera and lidar axis? Could you please show me the orientation of the camera and lidar coordinate axis for your experimental setup.

Yet another query regarding this. In my setup, the camera is placed at a certain distance behind the LIDAR and they also are at different height planes. So does this mean I will have to consider these translations as well while transforming the axis in the start?

martin-velas commented 3 years ago

Hi!

This transformation has nothing with the calibration itself, it is just a modification of the LiDAR axis. After this, the LiDAR axis are oriented as follows: X=right, Y=down, Z = forward (depth). For camera image, X=rigt, Y=down. So during the (perspective) projection of the LiDAR data we will lose Z axis.

Regarding your setup - if the camera is behind the LiDAR, add additional transformation which will rotate the point cloud 180deg around the vertical axis. Our calibration requires the camera and LiDAR to be oriented in a similar direction.

Regards, Martin

janu0510 commented 3 years ago

Thank you so much for your quick response. I understand that the transformation was done to have the LIDAR and camera axis oriented together. But for the second question I had posted, I think it would be better understood in this image below -

calibration

Here as you can see the camera and LIDAR are both oriented in similar directions. But they are separated by a distance of 1714 cms and a height of 873 cms. So would I have to account for these two distances as well in the .transform() function?

Thank you so much for your time. Best regards, Jahnavi

martin-velas commented 3 years ago

Oh - 20m separation - that's unexpected. Yes - you should include this offset into transform() method.

janu0510 commented 3 years ago

Thank you so much for the clarification. I will proceed with the understanding that we must include the offset height and separation too while transforming the pointcloud. I will close this issue as well.

Thanks a lot! Jahnavi