AMCL TF Issues

asked 2019-04-01 23:35:09 -0500

noahnedz gravatar image

updated 2019-04-02 00:19:26 -0500

I am currently running ros kinetic on ubiquity robotics ubuntu on a raspberry pi B+. I am wanting to localize myself using a X4 ydlidar, a pre-made map using map_server, and amcl. I also have an IMU but I havent tried integrating that yet because I cannot seem to get the lidar working as it is. For amcl to localize, what transforms need to happen to what?

If I launch the lidar script and the map and amcl the output is the following base_footprint -> laser_frame which is broadcasted by /lidarTransform.

If I rostopic echo /scan data floods the screen as expected, however amcl states that there is no laser scan received. Also, amcl does not transform the map that it loaded in to the odom frame.

If I add a transform from base_footprint to /odom the /scan message goes away and amcl does the transform from map to odom. however the tree goes map ->odom->base_footprint-> laser_frame and the laser_frame cannot be projected on the map fixed frame in rviz because of a loop. If I then kill the odom to base_footprint it can then work. Moving the 2D pose estimate then shifts the entire scan about the point I make it face. Moving the robot also moves the scan data around, so I guess I need something that links laser data to the map So I just need some guidance on what transforms need to happen so that amcl can be happy and output a pose. Any help will be appreciated.

edit retag flag offensive close merge delete

Comments

This is actually documented on the wiki.

Also, your final tf tree, i.e.

the tree goes map ->odom->base_footprint-> laser_frame

seems correct to me. Though you should start looking into where you create the "loop". Can you give more details about this? Or show your tf tree before and after you get the notification about the "loop"?

mgruhler gravatar image mgruhler  ( 2019-04-02 00:40:06 -0500 )edit