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

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: 2018-06-25 01:57:53 -0500

Seen: 88 times

Last updated: Jun 25 '18