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

You cannot have 2 or more nodes with the same name. So you need to change the name of one of your rosserial nodes, eg:

rosrun rosserial_python serial_node.py name="node2" ... etc

You cannot have 2 or more nodes with the same name. So you need to change the name of one of your rosserial nodes, eg:

rosrun rosserial_python serial_node.py name="node2" _name:="node2" ... etc

You cannot have 2 or more nodes with the same name. So you need to change the name of one of your rosserial nodes, eg:

rosrun rosserial_python serial_node.py _name:="node2" __name:="node2" ... etc

Note the double underscore preceding name.

You cannot have 2 or more nodes with the same name. So you need to change the name of one of your rosserial nodes, eg:

rosrun rosserial_python serial_node.py __name:="node2" ... etc

Note the double underscore preceding name.

Or, as suggested, using a launch file:

<launch>
<!-- Launch 2 Arduino boards -->

    <node
        pkg="rosserial_python"
        type="serial_node.py"
        name="ArduinoOne"
        args="/dev/ttyACM0"
    ></node>

    <node
        pkg="rosserial_python"
        type="serial_node.py"
        name="ArduinoTwo"
        args="/dev/ttyACM1"
    ></node>
</launch>

The above requires the Arduino boards to be /dev/ttyACM0 and /dev/ttyACM1. This can be avoided by using udev rules to give each board a unique symbolic name, eg:

<launch>
<!-- Launch the Arduino Board with Adafruit 9-DOF IMU -->

<node
    pkg="rosserial_python"
    type="serial_node.py"
    name="arduino_imu_9dof"
    args="/dev/elegooOne"
    respawn="true"
></node>

</launch>

So above we've given the Arduino board the symbolic name elegooOne. Larger Arduino boards, eg Uno, Mega, have a unique serial number that good for udev rules.

You cannot have 2 or more nodes with the same name. So you need to change the name of one of your rosserial nodes, eg:

rosrun rosserial_python serial_node.py __name:="node2" ... etc

Note the double underscore preceding name.

Or, as suggested, using a launch file:

<launch>
<!-- Launch 2 Arduino boards -->

    <node
        pkg="rosserial_python"
        type="serial_node.py"
        name="ArduinoOne"
        args="/dev/ttyACM0"
    ></node>

    <node
        pkg="rosserial_python"
        type="serial_node.py"
        name="ArduinoTwo"
        args="/dev/ttyACM1"
    ></node>
</launch>

The above requires the Arduino boards to be /dev/ttyACM0 and /dev/ttyACM1. This can be avoided by using udev rules to give each board a unique symbolic name, eg:

<launch>
<!-- Launch the Arduino Board with Adafruit 9-DOF IMU -->

<node
    pkg="rosserial_python"
    type="serial_node.py"
    name="arduino_imu_9dof"
    args="/dev/elegooOne"
    respawn="true"
></node>

</launch>

So above we've given the Arduino board the symbolic name elegooOne. Larger Arduino boards, eg Uno, Mega, have a unique serial number that that's good for udev rules.