With a correct URDF transform specification there's no need to have special logic to detect whether the LiDAR is inverted/reversed or not, i.e. whether the z-axis is point up or down. This information is in the roll, which wasn't used to set the laser_origin. This change also takes the pitch into account.
I'm happy to add a check to verify the LiDAR is still in a plane parallel to the floor, i.e. the XY plane, since I believe any other plane is not supported. In practice that means these two conditions should be satisfied:
Fix inverted LiDAR support
With a correct URDF transform specification there's no need to have special logic to detect whether the LiDAR is inverted/reversed or not, i.e. whether the z-axis is point up or down. This information is in the roll, which wasn't used to set the
laser_origin
. This change also takes the pitch into account.I'm happy to add a check to verify the LiDAR is still in a plane parallel to the floor, i.e. the XY plane, since I believe any other plane is not supported. In practice that means these two conditions should be satisfied:
roll == 0.0 || roll == M_PI
pitch == 0.0
On top of https://github.com/iris-ua/iris_lama_ros/pull/13