ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Rosbag as a workspace

asked 2013-12-17 05:42:49 -0600

Phorce gravatar image

updated 2014-01-28 17:18:51 -0600

ngrennan gravatar image


I'm creating a rosbag and want to record two topics into a .bag file. I am using a Python script to create this. The problem being is that I don't know whether or not I need to create a workspace, so then I could have the following command: rosrun project bag which would then record the topics or just have a script that I can run from terminal manually?


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-12-17 05:51:53 -0600

David Galdeano gravatar image

updated 2013-12-17 21:54:57 -0600

Hello, use the command tool rosbag record -a to record in a bag file.


If you really need the API for python, see: where read and write from python to a bag file are detailled.

edit flag offensive delete link more

answered 2013-12-17 21:11:18 -0600

tfoote gravatar image

If you're just writing a single script you can use the default environments from your installation. By sourcing /opt/ros/DISTRO/setup.bash for the appropriate DISTRO.

If you're doing more you should create a workspace for your work.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-12-17 05:42:49 -0600

Seen: 245 times

Last updated: Dec 17 '13