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

Can I play a rosbag to simulate data originally recorded from a remote ros master? [closed]

asked 2016-02-09 15:08:20 -0500

toddwf gravatar image

I have data recorded into a bag file on my "local" machine that was generated from a remote ros master. When I issue a rosbag play command on the file (which I checked and is ok), nothing happened. When I issue a rostopic echo <topic> for the data I'm looking for, I get "unable to communicate with master", which is true, I want to be able to work on the data at times when I don't have network access to the robot sensors generating it.

Is this possible? Is it possible some other way to simulate the robot? Do I need to temporarily set ros master to my local machine when I'm doing this? Or is this what Gazebo can be used for? (even though the data in the bag is relatively simple, just xyz positional data?)

Thanks

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Procópio
close date 2016-02-15 04:18:30.209555

Comments

update: just tried setting ROS_MASTER_URI to https://0.0.0.0:11311 and running roscore instance. rosbag play results in unable to contact ros master message.

toddwf gravatar image toddwf  ( 2016-02-09 15:43:23 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-02-09 15:58:41 -0500

toddwf gravatar image

Ok, got it working. Yes, I need a roscore running. I had some trouble because I incorrectly set the ROS_HOSTNAME. Once I got a roscore running, the rosbag play <bag> worked and I was able to run my code against the replayed topic.

Maybe it should've been obvious to me, but I would suggest noting in the docs that a roscore must be running for the bag to properly play. Since I'm using this to simulate output from a normally remote ros master, it was confusing to me.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-02-09 15:07:32 -0500

Seen: 746 times

Last updated: Feb 09 '16