rosbag play --clock

asked 2016-12-08 02:48:39 -0500

ThiemPHAM gravatar image

updated 2016-12-08 04:11:30 -0500

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

Using rosbag info , i obtain thiem@thiem-K42JY:~/catkin_ws$ 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: sensor_msgs/LaserScan [90c7ef2dc6895d81024acba2ac42f369] tf2_msgs/TFMessage [94810edda583a504dfda3829e70d7eec] topics: /scan 6743 msgs : sensor_msgs/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

edit retag flag offensive close merge delete


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.

Gokul gravatar image Gokul  ( 2016-12-08 03:11:17 -0500 )edit

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.

Gokul gravatar image Gokul  ( 2016-12-08 04:23:57 -0500 )edit

I run RVIZ, but i do not see the visualization of he map creation and I try another data.bag which is dowload form , and every thing is okie.

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

ThiemPHAM gravatar image ThiemPHAM  ( 2016-12-08 04:58:26 -0500 )edit

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

Gokul gravatar image Gokul  ( 2016-12-08 06:43:01 -0500 )edit

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

ThiemPHAM gravatar image ThiemPHAM  ( 2016-12-08 07:23:18 -0500 )edit

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

Gokul gravatar image Gokul  ( 2016-12-08 22:09:24 -0500 )edit

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

ThiemPHAM gravatar image ThiemPHAM  ( 2016-12-09 02:40:57 -0500 )edit