- The Lidar coordinate system (the one which is used in the pointCloud objects returned by helperReadPointCloudFromFile) has the X-axis pointing to the right, Y-axis to the front (in the direction of motion of the ego-vehicle) and Z-axis pointing up. You can see this while visualizing the point cloud data in the "Load and Explore Recorded Data" section in the example. In order to account for this, the INS readings are switched so that INS-X -> Lidar-Y and INS-Y -> -(Lidar-X)
- The extrinsics provided in the DATAFORMATS.txt refer to the offset of the Velodyne frame w.r.t. the IMU (vehicle) frame. Since we want the offset of the IMU frame w.r.t. the Velodyne frame, the signs are switched as well, and so the offset is set to [0 -0.79 -1.73].
Example 'Build a Map from Lidar Data Using SLAM' Confusion
2 views (last 30 days)
I'm trying to follow the example 'Build a Map from Lidar Data Using SLAM' from the computer vision toolbox.
In the function helperComputeInitialEstimateFromINS, there are three lines that I really tried to understand but without sucess.
My problem is not in the theory but in this particular implementation. Here are the lines
% The INS readings are provided with X pointing to the front, Y to the left
% and Z up. Translation below accounts for transformation into the lidar
insToLidarOffset = [0 -0.79 -1.73]; % See DATAFORMAT.txt
Tnow = [-insData.Y(end), insData.X(end), insData.Z(end)].' + insToLidarOffset';
Tbef = [-insData.Y(1) , insData.X(1) , insData.Z(1)].' + insToLidarOffset';
- The DATAFORMAT.txt file says that the transform from IMU to lidar is [0.79 0 1.73]. Why is it not implemented this way then?
- Why are X and Y coordinates inverted and negative in Tnow and Tbef? It is clear in the DATAFORMAT.txt that the X coordinates is front, Y coordinates is left and Z coordinates is up
What makes even less sense to me is that the transformation to insToLidarOffset (i.e.: switching X,Y then put them negative) and the transformation to Tnow and Tbef (i.e.: switching X,Y then just put Y negative) is not even the same.
I appreciate the time you take to answer this question,
Vinoth Venkatesan on 2 Dec 2020
Edited: Vinoth Venkatesan on 2 Dec 2020
There are two things to note here: