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

Try this modification of your launch file. Note that I've changed the frame IDs of the laser to match the frame IDs of the static transform broadcasters. You should be able to view both lasers relative to each other by setting your fixed frame in rviz to world.

<launch>
  <node pkg="sicktoolbox_wrapper2" name="lms5xx_110" type="sicklms_5xx">
  <remap from="scan" to="laser1" />
    <param name="ip_add" value="192.168.0.110" />
    <param name="frame_id" value="laser1" />
  </node>


  <node pkg="sicktoolbox_wrapper2" name="lms5xx_111" type="sicklms_5xx">
  <remap from="scan" to="laser2" />
    <param name="ip_add" value="192.168.0.111" />
    <param name="frame_id" value="laser1" />
  </node>

<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 0 0 0 world laser1 100" />

<node pkg="tf" type="static_transform_publisher" name="link2_broadcaster" args="4 0 0 0 0 0 world laser2 100" />

</launch>

Try this modification of your launch file. Note that I've changed the frame IDs of the laser to match the frame IDs of the static transform broadcasters. You should be able to view both lasers relative to each other by setting your fixed frame in rviz to world.

<launch>
  <node pkg="sicktoolbox_wrapper2" name="lms5xx_110" type="sicklms_5xx">
  <remap from="scan" to="laser1" />
    <param name="ip_add" value="192.168.0.110" />
    <param name="frame_id" value="laser1" />
  </node>


  <node pkg="sicktoolbox_wrapper2" name="lms5xx_111" type="sicklms_5xx">
  <remap from="scan" to="laser2" />
    <param name="ip_add" value="192.168.0.111" />
    <param name="frame_id" value="laser1" value="laser2" />
  </node>

<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 0 0 0 world laser1 100" />

<node pkg="tf" type="static_transform_publisher" name="link2_broadcaster" args="4 0 0 0 0 0 world laser2 100" />

</launch>