ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Hi Tom,

This does not answer your gmapping question, but the launch file you posted above does not work for me. It runs without error but it does not produce a "/scan" topic for the fake laser scan. In other words, run your launch file, then in a separate terminal run the command "rostopic list | grep scan". It should return "/scan" but in my case it returns nothing.

The following modified version of your launch file does work for me:

<launch>
  <!-- kinect and frame ids -->
  <include file="$(find openni_camera)/launch/openni_node.launch"/>

  <!-- openni manager -->
  <node pkg="nodelet" type="nodelet" name="openni_manager" output="screen" respawn="true" args="manager"/>

  <!-- throttling -->
  <node pkg="nodelet" type="nodelet" name="pointcloud_throttle" args="load pointcloud_to_laserscan/CloudThrottle openni_manager">
    <param name="max_rate" value="2"/>
    <remap from="cloud_in" to="/camera/depth/points"/>
    <remap from="cloud_out" to="cloud_throttled"/>
  </node>

  <!-- fake laser -->
  <node pkg="nodelet" type="nodelet" name="kinect_laser" args="load pointcloud_to_laserscan/CloudToScan openni_manager">
    <param name="output_frame_id" value="/openni_depth_frame"/>
    <remap from="cloud" to="cloud_throttled"/>
  </node>
</launch>

The important difference is that the two nodelets now wait on openni_manager rather than openni_camera.

Using this launch file, I can add a Laser Scan display in RViz and select the "scan" topic and see the scan points.

Regarding your gmapping question, you don't mention what kind of robot you are using. Is it an iRobot Create? If so, are you using an IMU with it? Also, have you run through all the Navigation tutorials starting here: http://www.ros.org/wiki/navigation/Tutorials?

--patrick