Ask Your Question
0

Launch file for package not running with rosrun

asked 2015-03-11 18:41:38 -0600

luketheduke gravatar image

Hi, I am making a package to communicate with an Arduino that I have on my robot to control it. I have the package on github here. When I run rosrun ros_arduino_python arduino.launch I get the following error:

/home/lukas/catkin_ws/install/share/ros_arduino_python/ros_arduino_python/launch/arduino.launch: line 1: syntax error near unexpected token newline' /home/lukas/catkin_ws/install/share/ros_arduino_python/ros_arduino_python/launch/arduino.launch: line 1:<launch>'

Sorry about the formatting, I gues ros like using the little backwards quotes... Anyway, here is my launch file, arduino.launch:

     <launch>
     <node name="arduino" pkg="ros_arduino_python"
 type="arduino_node.py"
 output="screen">
     <rosparam file="$(find ros_arduino_python)/config/my_arduino_params.yaml"
 command="load" />
     </node>
     </launch>

The rest of the code is on github. I am only 13 so the more help I can get the better. Thanks, L

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-03-11 18:58:44 -0600

Thomas D gravatar image

Try the command

roslaunch ros_arduino_python arduino.launch

The rosrun command is for starting individual nodes and the roslaunch command is for kicking off launch files.

edit flag offensive delete link more

Comments

Thanks for the answer, that solved it. I also found that I needed to chmod +x the python file so it would execute... Thanks, L

luketheduke gravatar imageluketheduke ( 2015-03-12 18:54:50 -0600 )edit

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: 2015-03-11 18:41:38 -0600

Seen: 1,159 times

Last updated: Mar 11 '15