How to create a ros launch file for arduino node?
Hey I wanted to open up the arduino node by using the ros launch file is there is any way to do that??
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Hey I wanted to open up the arduino node by using the ros launch file is there is any way to do that??
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
Asked: 2017-01-21 23:57:06 -0600
Seen: 4,299 times
Last updated: Jun 28 '18
What package are you using to talk to the Arduino? Both
rosserial
andros_arduino_bridge
are appropriate choices. You'll start nodes in those packages. Those nodes will open up the communication channel to the Arduino sketch.