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

Revision history [back]

click to hide/show revision 1
initial version

This will sounds 'strange', but just don't run catkin_make install. Catkin only installs things when you ask it to. In a non-install run, it will compile things that need to be compiled (ie: C++, other languages), copy the output to the devel space, but Python modules and scripts are actually (almost) untouched.

It then places the path to the package containing the Python module(s) and script(s) in the src space on the PYTHONPATH and ROS_PACKAGE_PATH and after you source $CATKIN_WS/devel/setup.bash you should be able to run everything. The install space is actually not needed for that.

You end up with a situation that is analogous to setup.py develop (analogous, not identical): just edit the files in your srcspace and after having run catkin_make the first time, you don't need to do it again.

Unless you add or remove packages, or msg, service or action definitions, or any other part of packages that require code generation or building of some form.

This will sounds 'strange', but just don't run catkin_make install. Catkin only installs things when you ask it to. In a non-install run, it will compile things that need to be compiled (ie: C++, other languages), copy the output to the devel space, but Python modules and scripts are actually (almost) untouched.

It then places the path to the package containing the Python module(s) and script(s) in the src space on the PYTHONPATH and ROS_PACKAGE_PATH and after you source $CATKIN_WS/devel/setup.bash you should be able to run everything. The install space is actually not needed for that.

You end up with a situation that is analogous to setup.py develop (analogous, not identical): just edit the files in your srcspace and after having run catkin_make the first time, you don't need to do it again.

Unless you add or remove packages, or msg, service or action definitions, or any other part of packages that require code generation or building of some form.


Edit:

If I have a catkin_install_python, then I can rosrun mypkg myscript, otherwise myscript isn't available to rosrun.

I don't know about catkin_install_python, but rosrun will only show and start executable files. I've had this problem when forgetting to make my scripts executable.