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

Launch file for package not running with rosrun

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

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 -0500

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 image luketheduke  ( 2015-03-12 18:54:50 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-03-11 18:41:38 -0500

Seen: 1,957 times

Last updated: Mar 11 '15