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

Consequence of

asked 2018-06-25 01:57:53 -0500

JayDe gravatar image


I am currently setting up my first python based node. I have included a into my project and added the "catkin_python_setup()" macro in my CMakeLists.txt. I am now wondering, what the consequence of this is. Or, said differently, where can I see the result of adding and the macro?

I have checked the $PYTHONPATH and found that my python package can be found in /path_to_workspace/devel/lib/python2.7/dist-packages/mypackage. Am I right that this folder has been generated by catkin when running Are the modules of my package mypackage made available through /path_to_workspace/devel/lib/python2.7/dist-packages/mypackage/

Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-25 10:15:30 -0500

pgorczak gravatar image

Correct! As long as you're using the devel space, catkin generates the file you mentioned via a cmake macro. When it is imported at runtime, it adds your source files (src/...) to the Python module path. As a consequence, you don't have to re-build your workspace unless you change itself.

edit flag offensive delete link more

Question Tools



Asked: 2018-06-25 01:57:53 -0500

Seen: 130 times

Last updated: Jun 25 '18