ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
0

why my Python code is running?

asked 2017-03-24 11:41:09 -0500

LbrRobix gravatar image

I playing alot with :::ROS and I realize this:

I can modify my Python app and start it again by doing:

$rosrun mypkg mypython.py

no need to go back to catkin workspace and do catkin_make

but if I do that (catkin_make) everything works too...

then what is the sense behind the catkin_make command

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2017-03-24 12:54:56 -0500

You can for sure run the code iwthout making it since that is python (a script language) BUT:

if you are using messages and services you will need a new autogenerated python code...

look the doc in the ros page

3rd parragraph

We use CMake as our build system and, yes, you have to use it even for Python nodes. This is to make sure that the autogenerated Python code for messages and services is created.

edit flag offensive delete link more
0

answered 2017-03-24 12:02:20 -0500

gvdhoorn gravatar image

then what is the sense behind the catkin_make command

catkin_make drives your compiler.

Python is not a compiled language.

So as soon as you have run catkin_make once (to have it setup your PYTHONPATH and other things), you don't need to run it anymore for non-compiled languages (such as Python).

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

1 follower

Stats

Asked: 2017-03-24 11:41:09 -0500

Seen: 63 times

Last updated: Mar 24 '17