laser scan from LiDAR installed with inverse X
I am trying to obtain odometry from laser scans using rf2o_laser_odometry
package. But in my case LiDAR device is installed on the back side of the robot so the speed on X axis is published with inverse sign. Would you take me an advice about how to specify rotation matrix on twist
component of nav_msgs::Odometry
?
Asked by twdragon on 2019-10-28 08:18:54 UTC
Answers
As it revealed, rf2o_laser odometry
determines linear speeds as scalars, not vectors or projections. I solved the problem using internal laser_pose_on_robot_
variable which represents transform from mounting point of the laser to base_link
. So, the source code of rf2o_laser_odometry
was changed.
The easiest way to solve the described problem is to recalculate the speed over the angle the laser lengthwise axis is located relative to robot's lengthwise axis. For easiest cases like mine there is no need to recalculate also transversal speed but that is the condition for future improvements.
Asked by twdragon on 2019-10-29 04:39:06 UTC
Comments
It's nice that you found a solution to your issue but I would not recommend changing code from source. Moreover here in the source code there is a TF listener for the transform base_link <-> laser_frame
so @billy 's answer is exactly what you want, even simpler than changing code because you just have to change your URDF
file to rotate the lidar.
Asked by Delb on 2019-10-29 05:19:13 UTC
Comments
You can use the LIDAR to BASELINK transform to orient the lidar properly so you don't have to do anything funny with your command outputs or ODOM input. I have a robot with the same set up and that is how I fixed it - but at this exact moment do not have access to the TF or I would give it to you. I will admit it took a few tries to get it correct.
Asked by billy on 2019-10-28 11:25:15 UTC