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

Error with rosbag record

asked 2012-07-06 05:24:03 -0600

atmiguel gravatar image

When I try to record any topic with rosbag, such as:

rosbag record /camera/depth/points

I get this error:

Error writing: Error opening file:

Possibly extraneous info: I'm running this on my laptop that is physically attached to my turtlebot and I know for a fact that the topics I'm trying to subscribe to are being published.

edit retag flag offensive close merge delete


wow i feel silly. I was trying to do this in my ros workspace where apparently i don't have permissions. it worked perfectly in my home directory. Thanks allenh1!

atmiguel gravatar image atmiguel  ( 2012-07-06 06:10:46 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-07-06 05:53:50 -0600

allenh1 gravatar image

Ok. This could be a couple things. You didn't finish a bag file, so fix the bag:

rosbag reindex

To take the bag file and make it record to a different name, try this:

rosbag record /camera/depth/points -O Camera.bag

The first command makes the bag file playable (the laptop probably shut down in the middle of a run).

The second one tells rosbag to record to a different file name.

This could also be a problem with your version of rosbag. Which rosbag are you using? Which OS? Ros version?

Or, you could be recording your bag file in a place you don't have write permissions. Try recording it in the home directory.

Hope this helps!

edit flag offensive delete link more

Question Tools


Asked: 2012-07-06 05:24:03 -0600

Seen: 9,812 times

Last updated: Jul 06 '12