Error in creating 2D global map of the Environment [closed]
Hi, I am going through the [slam_gmapping](http://wiki.ros.org/slam_gmapping/Tutorials/MappingFromLoggedData) I can move my P3AT in the environment through keyboard. I try to follow the steps mentioned in the tutorial but unable to generate the map.
step:1 terminal:1 rosparam set use_sim_time true
step:2 terminal:2 rosrun gmapping slam_gmapping scan:=lms200 _odom frame:=odom
step:3 terminal:3 rosbag record -O mylaserdata.bag /lms200 /tf
INFO 1383223128.547387984: Subscribing to /lms200 INFO 1383223128.548429961: Subscribing to /tf INFO 1383223128.549742465: Recording to mylaserdata.bag.
WARN 1383223128.549933629: Less than 5GB of space free on disk with mylaserdata.bag.active.
After step 3 the mylaserdata.bag should be created.ATLAST BAG IS CREATED.
small success
step:4 terminal:4 rosbag play mylaserdata.bag
INFO 1383224702.381804366: Opening mylaserdata.bag
Waiting 0.2 seconds after advertising topics... done.
Hit space to toggle paused, or 's' to step.
RUNNING Bag Time: 1383223567.472784 Duration: 438.600031 / 438.658882
Done.
command list
Start-up roscore
rosbag record -O mylaserdata.bag /lms200 /tf
INFO 1383223128.547387984: Subscribing to /lms200
INFO 1383223128.548429961: Subscribing to /tf
INFO 1383223128.549742465: Recording to mylaserdata.bag.
WARN 1383223128.549933629: Less than 5GB of space free on disk with mylaserdata.bag.active
Start-up USARSim on the windows pc environment started in usarsim
Start-up the ROS interface, roslaunch usarsim_inf usarsim.launch(robot placed in environment)
5.Run the tele-op keyboard which should allow you to drive the robot around.:
$ rosrun teleop_twist_keyboard teleop_twist_keyboard.py
6.$ rosrun gmapping slam_gmapping scan:=lms200 _odom_frame:=odom
- rosbag play mylaserdata.bag
successfully completed.
- rosrun map_server map_saver
o/p=MAP GENERATED BUT IT IS EMPTY:)
MAP.YAML FILE
image: map.pgm
resolution: 0.050000
origin: [-100.000000, -100.000000, 0.000000]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196
//////////END OF MAP.YAML///////////////////
- then I run
rosrun rviz rviz
Now laser messages are properly published and the tf tree looks ok. But no transform from [/GrndTruth] to frame[/map] and no transform from [/base_GrndTruth to frame[/map].
Thanks in advance
It seems that the problem is in opening bag file. First I would suggest you to just run rosbag play ..file.name and see if its running...Look here http://wiki.ros.org/rosbag/Commandline for more details. Try rosbag -fix parameter and see if theat changes or solves ur problem
rosbag record -O mylaserdata.bag /lms200 /tf It should generate the mylaserdata.bag and after moving the robot related information must be included here. Am I right?
yes...still not solved?
mylaserdata.bag has not been generated. Whats's the problem I can't figure out.
rosbag record -a
It will record all topics, I think. Will it help in creating the map?
Yes, having all topics will be able to create map. you can map even without using the logged data, for that you must use the data from laser and wheel odom online.
Hello Sai, can you mention the procedure what should be done after rosbag record -a. As you have said map can be obtained using online how it is possible. I have not found out any tutorial.