A few questions about Exercise 3.1

I have manage to move the robot in exercise 3.1 I have a few questions

1 - Do I have to use roslaunch everytime when I want to rosrun a script ?
2- My python script doesn’t show up at ps faux command like below. How can i kill it ?
3- Also when I try to make a package on my local (melodic) when I try to run rospack list | grep loca_package It doesn’t show up anything. Eventhough I tried to run rospack profile

Thanks for your responses.

Hi @fkaan ,

roslaunch and rosrun are two different concepts.
rosrun will run the python file only, all the nodes that are in this python file.
roslaunch will launch all the nodes from all the files you have specified as a node.
With roslaunch you can launch multiple python files (that has ros nodes defined) at once.
You can do rosrun without a launch file created. But roslaunch works only when you have a launch file defined.

If your python file is a ROS program that starts a ros node, you can kill the ros node by calling rosnode kill ... command.
Also when you do ps faux you need to scroll down to check if your python program exists.

You seem to have a typo there, loca_package instead of local_package.
If typo is not the problem, try rospack list if you get all the packages installed, then try rospack list | grep my_package. If my_package does not show up, then my_package is not compiled with catkin_make.

Hope this clarifies your doubts.

Regards,
Girish

1 Like