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

Let's see: After running your launch file, I checked the parameters:

[/tmp] rosparam list 
/baud
/port
(...)

So somehow there is a port argument, it's just in the global namespace instead of the local namespace of the node. XML is not python, so indentations have no meaning, the relevant part of your launch file therefore looks like

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

There is nothing that tell ROS that the port-parameter has something to do with the serial_node. Your mistake was to close the node-tag "serial_node.py"/> If you want the parameters to be in your local namespace, it should look like this:

<launch>
    (...)
    <node pkg="rosserial_python" name="serial_node" type="serial_node.py">
        <param name="port" value="/dev/ttyACM0"/>
        <param name="baud" value="115200"/>
    </node>
</launch>

And the your parameters will look like this:

[/tmp] rosparam list /serial_node/baud /serial_node/port (...)

So that the parameters are in the right namespaces.

Let's see: After running your launch file, I checked the parameters:

[/tmp] rosparam list 
/baud
/port
(...)

So somehow there is a port argument, it's just in the global namespace instead of the local namespace of the node. XML is not python, so indentations have no meaning, the relevant part of your launch file therefore looks like

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

There is nothing that tell ROS that the port-parameter has something to do with the serial_node. Your mistake was to close the node-tag "serial_node.py"/> If you want the parameters to be in your local namespace, it should look like this:

<launch>
    (...)
    <node pkg="rosserial_python" name="serial_node" type="serial_node.py">
        <param name="port" value="/dev/ttyACM0"/>
        <param name="baud" value="115200"/>
    </node>
</launch>

And the your parameters will look like this:

[/tmp] rosparam list 
/serial_node/baud
/serial_node/port
(...)

(...)

So that the parameters are in the right namespaces.

namespaces.

Let's see: After running your launch file, I checked the parameters:

[/tmp] rosparam list 
/baud
/port
(...)

So somehow there is a port argument, it's just in the global namespace instead of the local namespace of the node. XML is not python, so indentations have no meaning, the relevant part of your launch file therefore looks like

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

There is nothing that tell tells ROS that the port-parameter has something to do with the serial_node. (order within a launch file has also no meaning) Your mistake was to close the node-tag "serial_node.py"/> If you want the parameters to be in your local namespace, it should look like this:move them inside your node-tag:

<launch>
    (...)
    <node pkg="rosserial_python" name="serial_node" type="serial_node.py">
        <param name="port" value="/dev/ttyACM0"/>
        <param name="baud" value="115200"/>
    </node>
</launch>

And the your parameters will look like this:better:

[/tmp] rosparam list 
/serial_node/baud
/serial_node/port
(...)

So that the parameters are in the right namespaces.

Let's see: After running your launch file, I checked the parameters:

[/tmp] rosparam list 
/baud
/port
(...)

So somehow there is a port argument, it's just in the global namespace instead of the local namespace of the node. XML is not python, so indentations have no meaning, the relevant part of your launch file therefore looks like

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

There is nothing that tells ROS that the port-parameter has something to do with the serial_node. (order within a launch file has also no meaning) Your mistake was to close the node-tag "serial_node.py"/> If you want the parameters to be in your local namespace, move them inside your node-tag:

<launch>
    (...)
    <node pkg="rosserial_python" name="serial_node" type="serial_node.py">
        <param name="port" value="/dev/ttyACM0"/>
        <param name="baud" value="115200"/>
    </node>
</launch>

And the then your parameters will look better:

[/tmp] rosparam list 
/serial_node/baud
/serial_node/port
(...)

So that the parameters are in the right namespaces.