ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It should be possible to use two Arduino's simultaneously by assigning each node a distinct name and config file in your launch file(s). I don't have my Arduinos in front of me to test, but something like this should work:
<launch>
<node name="arduino1" pkg="ros_arduino_python" type="arduino_node.py" output="screen" clear_params="true">
<rosparam file="$(find my_arduino_pkg)/config/arduino1_params.yaml" command="load" />
</node>
<node name="arduino2" pkg="ros_arduino_python" type="arduino_node.py" output="screen" clear_params="true">
<rosparam file="$(find my_arduino_pkg)/config/arduino2_params.yaml" command="load" />
</node>
</launch>
Of course, you need to change the paths to your config files. When subscribing to sensor data connected to arduino1, you would look under the namespace /arduino1/sensor and for arduino2, /arduino2/sensor.