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

It looks like setting the parameters in the wrong namespace. Since the driver is looking for the parameters in it's private namespace, they need to be in the namespace of the node name (sick_lms_scan_publisher).

Roslaunch can help you avoid errors like this by doing the namespacing automatically, if you nest the param tags inside the node tag in your launch file:

<launch>
  <!--launch the sicktoolbox_wrapper node. -->
  <node 
      pkg="sicktoolbox_wrapper" 
      type="sicklms" 
      name="sick_lms_scan_publisher"
      output="screen">
    <!--define the serial port for the PC to LMS comm in parameter server-->
    <param name="port" value="/dev/ttyUSB0">
    <!--define the lms comm baud rate in parameter server-->
    <param name="baud" value="500000"/>
  </node>
</launch>

You can also do this with param tags outside of the node tag, but it's more error-prone because you're duplicating the node name in many places:

<launch>

    <!--define the serial port for the PC to LMS comm in parameter server-->
    <param 
        name="sick_lms_scan_publisher/port" 
        value="/dev/ttyUSB0">
    </param>

    <!--define the lms comm baud rate in parameter server-->
    <param 
        name="sick_lms_scan_publisher/baud" 
        value="500000">
    </param>

    <!--launch the sicktoolbox_wrapper node. -->
    <node 
        pkg="sicktoolbox_wrapper" 
        type="sicklms" 
        name="sick_lms_scan_publisher"
        output="screen">
    </node>

</launch>