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

Trouble with python nodes in launchfile

asked 2016-05-12 04:05:12 -0500

ebaumert gravatar image

Hi everyone!

I am trying to start some additional nodes together with the minimal.launch file, so I made the following additions for my nodes.

I sourced the devel/setup.bash file so the package can be found and made sure the py files are executable using chmod +x. Nonetheless, when I try to run the launch file, I get the following errors. It does seem quite generic to me, has someone experienced this before and has an idea?

Thank you!

The lines I added:

  <node name="webcam_pub" pkg="webcam_pub" type="webcam_pub.py" />
  <node name="pos_pub" pkg="stop_snap" type="pos_pub.py" />
  <node name="go_to_goal_v5" pkg="stop_snap" type="go_to_goal_v5.py" />

What I get as output in the console (log files are empty).

process[webcam_pub-14]: started with pid [6036]
: No such file or directory
failed to start local process: /home/turtlebot/library_ws/src/stop_snap/src/pos$
local launch of stop_snap/pos_pub.py failed
[pos_pub-15] process has died [pid -1, exit code 127, cmd /home/turtlebot/libra$
log file: /home/turtlebot/.ros/log/69123a30-181f-11e6-bce9-54353050d249/pos_pub$
process[go_to_goal_v5-16]: started with pid [6061]
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-05-12 04:32:28 -0500

gvdhoorn gravatar image

I sourced the devel/setup.bash file so the package can be found and made sure the py files are executable using chmod +x. Nonetheless, when I try to run the launch file, I get the following errors.

Do you have the required shebang for Python at the top of your file? If not, roslaunch cannot start it, as it tries to start your scripts directly (ie: it doesn't prefix it with python /path/to/your/script.py).

If you have it, make sure your files have the proper Unix line-endings. If you have edited thins under Windows (fi because you have ROS in a VM), they can be changed / mixed, which will lead to all sorts of strange errors (they're not actually 'strange', but the symptoms can be confusing).

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-05-12 04:05:12 -0500

Seen: 1,058 times

Last updated: May 12 '16