Ask Your Question
0

gmapping issues with laser pose

asked 2013-11-19 15:37:47 -0600

pwong gravatar image

updated 2013-11-20 14:36:50 -0600

I'm working on creating a server map using the tutorial:

<a href="http://wiki.ros.org/slam_gmapping/Tutorials/MappingFromLoggedData">http://wiki.ros.org/slam_gmapping/Tutorials/MappingFromLoggedData</a>

The odometry data is being published, and I have a hokuyo utm-30lx laser scanner published as well. My robot is being modeled with a urdf file.

I made sure the hokuyo was perfectly horizontal and then start recording my bag file with this:

>rosbag record -O mylaserdata /scan /tf

After the recording, it plays back into rviz fairly well. Even with all of the scan overlap, it still resembled the room recorded.

The issue comes when I try to turn it into a map with:

>rosrun gmapping slam_gmapping scan:=scan

as soon as I start playing the bag file, it gives me this warning:

[ WARN] [1384916667.376566157, 1384914870.078301371]: Failed to compute laser pose, aborting initialization ("base_link" passed to lookupTransform argument target_frame does not exist. )

This warning repeatedly keeps coming up as the bag is playing. I've also tried:

>rosrun gmapping slam_gmapping scan:=base_scan _odom_frame:=odom

But it gives me the same warning.

  1. Am I not correctly recording my tf data into the bag file? Shouldn't the urdf provide the laser pose?

  2. The robot_state_publisher is in the topic named '/tf'. Why isn't it my base link from my urdf file? rosbag wouldn't record my base link when I tried.

  3. On a somewhat different note, if my odometry data isn't too accurate, what does it mean for gmapping and using the Navigation Stack?

Advice would be greatly appreciated! Thank you.

Edit: I've tried to create the map live with rviz. Similar to how the map was made here.

<a href="http://wiki.ros.org/pr2_simulator/Tutorials/BuildingAMapInSimulation">http://wiki.ros.org/pr2_simulator/Tutorials/BuildingAMapInSimulation</a>

Unfortunately, it still gives me the same error. I thought the error came from the target frame, and tried setting that on rviz. Still nothing.

I also double checked my urdf file, and I don't believe the issue is there. The laser scan is leveled to the laser scanner visualized modeled on the urdf file.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-11-21 08:00:08 -0600

pwong gravatar image

updated 2013-11-25 06:45:33 -0600

I've tried quite a few ways of setting the parameters of base frame to run gmapping. I just missed the underscore.

>rosrun gmapping slam_gmapping scan:=scan _base_frame:=base

I think with the urdf and setting the base_frame to base, I fulfilled the tf requirements for gmapping. If there's anything I can find to clean up the map, I'll update the answer for the newcomers like me.


Edit: It was suppose to be _base_frame:=base, not odom as I had it before.

Here were some tips I found collectively from other ROS answers that helped me with my setup in a larger area with a hokuyo UTM-30LX.

1.Start near the corner of the room(if in a large empty room) and move slowly.

2.Use a launch file. Change the map_update_interval to around 30.

3.For the hokuyo I used, it had 270deg view, I made a mistake of trying to use all of the viewing angle. From another ROS answer post and the package page, I saw that its not stable and I think you would have to do some adjusting to the driver's angle resolution. It was best to use from -95 to 95 degree, or the defaults.

4.Set the maxUrange to the max distance your laser scanner is capable of.

Here is how the map turned out, which looks very good imo. http://i.imgur.com/73b4lkf.png

edit flag offensive delete link more
0

answered 2019-05-22 23:30:17 -0600

fayyaz gravatar image

You should have recorded /tf_static as well which gives the fixed transform between your laser frame and base link.

edit flag offensive delete link more

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: 2013-11-19 15:37:47 -0600

Seen: 2,583 times

Last updated: May 22