I’m doing a ROS Basics in 5 days course and in 3.1 when I try to run simple_topic_publisher.py i get:
bash: simple_topic_publisher.py: command not found
I think I did everything exactly as instructions says.
Somebody have any idea how to find a problem? I can paste something from the terminal if it’s needed.
you have two ways to run a script (noetic):
python3 name_of_the_script in your case would be
rosrun name_of_the_package name_of_the_script in your case asumming your package name is
my_package would be:
rosrun my_package simple_topic_publisher.py.
make sure you have set execution permisions of the script, if not, run:
chmod +x simple_topic_publisher.py
Ok, the second solution worked! Thanks a lot! In thin notebook it looked like:
rosrun my_examples_pkg simple_topic_publisher.py
@rtellez shouldn’t here be ‘$’ mark before rosrun in instruction?