Ask Your Question
0

laser scan from LiDAR installed with inverse X

asked 2019-10-28 08:18:54 -0600

twdragon gravatar image

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?

edit retag flag offensive close merge delete

Comments

1

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.

billy gravatar imagebilly ( 2019-10-28 11:25:15 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-10-29 04:39:06 -0600

twdragon gravatar image

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.

edit flag offensive delete link more

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.

Delb gravatar imageDelb ( 2019-10-29 05:19:13 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-10-28 08:18:54 -0600

Seen: 20 times

Last updated: Oct 29