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

Revision history [back]

click to hide/show revision 1
initial version

First you could try with a simple command line and make sure everything works:

$ rosrun rosserial_python serial_node.py _baud:=57600 _port:=/dev/ttyACM0

Then you make a catkin package in your catkin workspace, add a folder with a name launch in your package.

Inside your launch folder, your launch file run_arduino.launch should be created (right click -> new document -> empty document)

Here's the corresponding launch file:

<launch>
    <node name="serial_node"        pkg="rosserial_python"      type="serial_node.py">
    <param name="port"              type="string"               value="/dev/ttyACM0"/>
    <param name="baud"              type="int"                  value="57600"/>
    </node>
</launch>

After creating a launch file, what you simply do is going to your package directory, where you have you launch file and use the following command to start the arduino node:

$ roslaunch /your_catkinpackage/launchFolder/run_arduino.launch