Ask Your Question

Can I use the Python Ros bag API without making a workspace?

asked 2017-03-28 16:54:12 -0500

cpagravel gravatar image

updated 2017-03-28 16:58:39 -0500

I'm using roscpp, but I'd like to make a transferrable python script for working with bag files. However, the docs only tell me how to do it through a catkin workspace. Is there a way to import the necessary libraries without first making a workspace?

I'm referring to the error mentioned in this post

The proposed solution was to change a manifest file. I'd like to be able to do this without going through a workspace so I can share the script with others.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-03-29 02:47:50 -0500

Procópio gravatar image

yes, you can.

to avoid that error you have to make sure you have properly set the ROS path in your current terminal window, which is normally accomplished by doing:

source /opt/ros/ROSVERSION/setup.bash
edit flag offensive delete link more


Ah hah! I did this already, but I found that the problem is actually that I was trying to execute the python program through my Sublime editor. For anyone that might have had the same problem, I just needed to change the python build file to include the ros folders in PYTHONPATH and PATH.

cpagravel gravatar image cpagravel  ( 2017-03-29 11:02:28 -0500 )edit

Your answer gave put me on the right track and is correct, thank you.

cpagravel gravatar image cpagravel  ( 2017-03-29 11:04:39 -0500 )edit

Your Answer

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

Add Answer

Question Tools



Asked: 2017-03-28 16:54:12 -0500

Seen: 278 times

Last updated: Mar 29 '17