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

Just run both an remap the output topic. You might need to set the frame id too.

Here is an excerpt from the launch file that we use:

 <rosparam command="load" file="$(find matilda_bringup)/config/sensors.yaml" />

  <!-- Base Laser -->
  <group unless="$(arg disable_base_laser)" >
  <node pkg="hokuyo_node" type="hokuyo_node" name="base_hokuyo_node">
    <remap from="scan" to="base_scan" />
    <param name="frame_id" type="string" value="base_laser_link" />
    <param name="min_ang" type="double" value="-2.35619449019234492883" />
    <param name="max_ang" type="double" value="2.35619449019234492883" />
    <param name="skip" type="int" value="0" />
    <param name="intensity" value="false" />

  <!-- Vertical Laser -->
  <group unless="$(arg disable_vertical_laser)" >
  <node pkg="hokuyo_node" type="hokuyo_node" name="vertical_hokuyo_node">
    <remap from="scan" to="vertical_scan" />
    <param name="frame_id" type="string" value="vertical_laser_link" />
    <param name="min_ang" type="double" value="-2.09439510239319549227" />
    <param name="max_ang" type="double" value="2.09439510239319549227" />
    <param name="skip" type="int" value="0" />
    <param name="intensity" value="false" />

The sensors.yaml defines the ports to use, you could also symlink those if you like:

base_hokuyo_node/port: /dev/sensors/hokuyo_H0904092
vertical_hokuyo_node/port: /dev/sensors/hokuyo_H0507257

To get the names with serials for the Hokuyos you can use the following udev rules (using the getID node from the hokuyo driver package):

# Hokuyos
SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ATTRS{manufacturer}=="Hokuyo Data Flex for USB", ATTRS{product}=="URG-Series USB Driver", MODE="0666", GROUP="dialout", PROGRAM=="/etc/ros/ hokuyo_node getID %N q", SYMLINK+="sensors/hokuyo_%c"

The run script needs to be available system-wide. It just sources and rosruns the program:

. /etc/ros/ 
rosrun $@