gmapping issues with laser pose
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.
Am I not correctly recording my tf data into the bag file? Shouldn't the urdf provide the laser pose?
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.
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.