include a custom message outside a catkin workspace

asked 2020-03-22 10:15:11 -0500

Joey gravatar image

I have a workspace which has a couple of custom messages defined. I want to use these for a python program outside the workspace. Basically the python program is used to read a csv file and create a bag file in the custom message format with header and timestamp information. I need to access those message fields to populate my bag file. Is this possible or do I have to write my python parser inside the workspace?

edit retag flag offensive close merge delete

Comments

A ROS message gets transformed into a module in a Python package. As long as the PYTHONPATH contains the directory where that is stored, you should be able to use it "outside the workspace" as well.

You may actually be interested in rospypi/simple.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-22 12:20:33 -0500 )edit

Thank you, this worked. After sourcing the devel/setup.bash, I could search for the package and add it outside of workspace.

Joey gravatar image Joey  ( 2020-03-26 08:56:23 -0500 )edit