Hello everyone. I am new to ROS (fuerte 12.04). I am trying to use gmapping to build a map in rviz with a Hokuyo laserscanner(UTM-30LX) and a mobile robot, which can provide odometry data.
I have already followed the tutorial MappingFromLoggedData. I run "rosrun gmapping slam_gmapping scan:=base_scan", and an already existed mapping bag runs in rviz rightly. But when I try to create my own map (e.g. my room) and run rosrun gmapping slam_gmapping, it shows "/use_sim_time set to true and no clock published. still waiting for valid time."
Did I follow the right tutorial? What else shoould I follow?
I also don't know how to set the parameter of gmapping like tf trees. which command should I use to set the parameter and run gmapping sucessfully? I am really confused.
Thank you so much for answering my question!
Now I set the time to sim_time false with command "rosparam set use_sim_time false"
In terminal 2 I enter the command like in the tutorial "rosrun gmapping slam_gmapping scan:=base_scan"
In terminal 3 I enter "rosbag record -O mylaserdata /base_scan /tf". It shows
[ INFO] [1389873864.228511055]: Subscribing to /base_scan [ INFO] [1389873864.256834976]: Subscribing to /tf [ INFO] [1389873864.284224081]: Recording to mylaserdata.bag. [ WARN] [1389873864.284374493]: Less than 5GB of space free on disk with mylaserdata.bag.active.
In terminal 4 I try to record my bag with "rosbag play mylaserdata.bag". It shows
[ INFO] [1389873813.472244379]: Opening mylaserdata.bag
Waiting 0.2 seconds after advertising topics... done.
And I open the rviz with commend "rosrun rviz rviz" and add a map set to the topic /map but nothing in rviz.
In terminal 2 the errors show up just after I enter "rosbag play mylaserdata.bag"
in terminal 4. here are the errors. TF_OLD_DATA ignoring data from the past for frame /odom at time 1.38987e+09 according to authority /play_1389877419301103194 Possible reasons are listed at
I am confused. Thank you for helping!
Originally posted by Yuliang Sun on ROS Answers with karma: 5 on 2014-01-13
Post score: 0
Original comments
Comment by Tirjen on 2014-01-16:
It is not very clear to me what you are trying to do... Why don't you first try to use gmapping without rosbag? Moreover in your description I'm missing the node who's publishing the laser scan and the one publishing tf. Is your tf tree ok ('rosrun tf view_frames')?
Comment by Yuliang Sun on 2014-01-16:
I just want to run gmapping with real sensor data. And I have no clue about it.
Should I run "rosparam set use_sim_time false at first" then is "rosrun gmapping slam_gmapping scan:=base_scan" . and then? which commend should I enter?
my tf tree is not right. only has /map to /odom. It should be /map -> /odom -> base_link -> base_laser. But I do not know how to change my tf tree. With which commend? Sorry i am not really good at that. And really hope you can help me. thank you so much!