ROS gmapping laser scan TF problem

asked 2020-05-24 21:57:52 -0500

raymond gravatar image

I found the requirement of laser scan is,

-pi to pi, positive step, and 0 degree is the car's moving forward direction. i.e.

angle_min= -135 * (pi/180); //angle correspond to FIRST beam in scan ( in rad)
angle_max= 135 * (pi/180); //angle correspond to LAST beam in scan ( in rad)
angle_increment =0.25 * (pi/180); // Angular resolution i.e angle between 2 beams

now my lidar is 0 to 180 degree. negative step, and 90 degree is the car's moving forward direction.

angle_min= 0; 
angle_max=  (pi/180); 
angle_increment = -0.25 * (pi/180);

and it did not work!

I scanned a map. Then I used AMCL to locate the robot.

Even the laser scan are matched in below pic. But the direction is wrong. the yellow arrow is correct one, the red arrow was wrongly estimated by AMCL.

How can I resolve this direction conflict?

thank you.

enter image description here

edit retag flag offensive close merge delete


you should setup a static tf from laser to base_link

tianb03 gravatar image tianb03  ( 2020-05-26 02:13:13 -0500 )edit