Problem creating a map (navigation/robotsetup tutorial)
I'm trying to set up my robot as described in http://www.ros.org/wiki/navigation/Tutorials/RobotSetup. I'm using a PeopleBot (p2os) with a SICK scanner on the base.
When I get to the "create a map" stage, something goes wrong, and I'm not sure what. I start roscore, sicktoolboxwrapper, p2osdriver and my lasertorobot_transform, all of which I have confirmed works individually.
sicktoolboxwrapper publishes laserscans with "**frameid: laser" to "/scan**".
p2osdriver publishes, among other things, pose data with "**frameid: odom" and "childframeid: baselink" to "/pose", and also transform frames with "frameid: /odom" and "childframeid: /base_link**"
my Lasertorobottransform publishes transforms with "**frameid: /baselink", "childframe_id: /laser**"
I then create a bag with recordings of /scan and /tf, and play it back after setting the usesimtime preference to true and running "rosrun gmapping slam_gmapping".
slamgmapping does not give any output, and neither does running "rosrun mapserver map_save" after the bag has played back.
Am I missing some transformations, or is my current transformation not correct? When using the bag linked to from the tutorial (basiclocalizationstage.bag), everything works, and slam_gmapping gives output while playing back.
EDIT: Solved Well, don't I feel stupid. After hours of poking at this problem I find out what's wrong in half an hour after finally asking for help.
If anyone's interested, I had neglected to put a sleep in the body of my while loop for my robottolasertransform, making it publish data much more often than it should. This ended up with a bag file where there were no actual transform frames recorded from the p2osdriver, making mapping impossible.
Asked by AndreasB on 2012-02-16 03:38:48 UTC
Comments
are you publishing the clock with the bag?
Asked by Ivan Dryanovski on 2012-02-16 03:52:34 UTC
Adding --clock as a parameter to rosbag play doesnt seem to make a difference. Would I also need explicitly record this when creating the bag?
Asked by AndreasB on 2012-02-16 04:03:08 UTC
I don't think you need to record it. I'm fairly certain it won't work if you don't publish it though.
Asked by Ivan Dryanovski on 2012-02-16 05:45:21 UTC
I'm not quite understand why p2os_driver's frame_id is odom and child_frame_id is base_link?I'm also new to gmapping. Thank you~
Asked by sam on 2012-02-19 12:16:53 UTC