ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Make a 2D map

asked 2016-12-07 03:31:48 -0500

ThiemPHAM gravatar image

I have another problem that need your help,

I built a data.bag using rosbag as tutorial with transform

Heading

#include <ros ros.h=""> #include <tf transform_broadcaster.h="">

int main(int argc, char** argv){ ros::init(argc, argv, "urca_hokuyo_tf"); ros::NodeHandle n;

ros::Rate r(100);

tf::TransformBroadcaster broadcaster;

while(n.ok()){ broadcaster.sendTransform( tf::StampedTransform( tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.1, 0.0, 0.2)), ros::Time::now(),"base_link", "hokuyo_scan")); r.sleep(); } }

, but when i use rosrun gmapping slam.. and rosbag play and rosrun map_sever map_saver. I do not create a map.

Please, show me how can i fix it

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-12-07 07:10:28 -0500

Gokul gravatar image

First, make sure whether the bag file you have recorded has data or it is empty. This can be done by

rosbag play --clock data.bag

Then echo the topic to check whether the bag file is publishing data.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-07 03:31:48 -0500

Seen: 291 times

Last updated: Dec 07 '16