Robotics StackExchange | Archived questions

rosbag play --clock

I record a data.bag using Hokuyo Laser. Then, i use the commad: rosparam set usesimtime true; rosrun gmapping slam_gmapping scan:=scan After that, rosbag play --clock data.bag

Using rosbag info , i obtain thiem@thiem-K42JY:~/catkinws$ rosbag info data.bag path: data.bag version: 2.0 duration: 2:48s (168s) start: Dec 08 2016 09:06:14.93 (1481184374.93) end: Dec 08 2016 09:09:03.80 (1481184543.80) size: 59.2 MB messages: 25319 compression: none [79/79 chunks] types: sensormsgs/LaserScan [90c7ef2dc6895d81024acba2ac42f369] tf2msgs/TFMessage [94810edda583a504dfda3829e70d7eec] topics: /scan 6743 msgs : sensormsgs/LaserScan /tf 18576 msgs : tf2_msgs/TFMessage (2 connections)

But, there is a problem: slam_gmapping dose not print out diagnostic information. So, I can not create a map

Please, help me and show me how can i fix it

Asked by ThiemPHAM on 2016-12-08 03:48:39 UTC

Comments

If you are able to create a map, then what is the problem. Could you update your question with detailed information so that it will be easier to identify the issue.

Asked by Gokul on 2016-12-08 04:11:17 UTC

You don't need diagnostic information to create a map. Can you visualize the creation of map in RVIZ. In RViz ,subscribe to map topic and check the whether a map is created. If you are able to see the visualization of the map creation.Then run the command to save the map.

Asked by Gokul on 2016-12-08 05:23:57 UTC

I run RVIZ, but i do not see the visualization of he map creation and I try another data.bag which is dowload form http://wiki.ros.org/slam_gmapping/Tutorials/MappingFromLoggedData#record , and every thing is okie.

But with my data.bag (24Mb), I do not still create a map. Please, help me

Asked by ThiemPHAM on 2016-12-08 05:58:26 UTC

Play the bag file and echo the topics /scan and /tf to check whether the datas are publishing properly.

Asked by Gokul on 2016-12-08 07:43:01 UTC

I do not understand your reply, please , show more details. I used rostopic echo /scan and /tf . Everything is ok

Asked by ThiemPHAM on 2016-12-08 08:23:18 UTC

Then record the bag file once again and try creating a map using that.

Asked by Gokul on 2016-12-08 23:09:24 UTC

I recorded a data.bag again, then i still meet the situation above and i do not create a map

Asked by ThiemPHAM on 2016-12-09 03:40:57 UTC

Answers