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

Hi,

For this you need to use PointCloud to LaserScan package. It comes with turtlebot stack. You need to create a launch file say kinect_laser.launch with below nodes:

<launch> <include file="$(find openni_launch)/launch/openni.launch"/>

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

<node pkg="nodelet" type="nodelet" name="pointcloud_throttle" args="load pointcloud_to_laserscan/CloudThrottle openni_manager"> <remap from="cloud_in" to="/camera/depth/points"/> <remap from="cloud_out" to="cloud_throttled"/> </node>

<node pkg="nodelet" type="nodelet" name="kinect_laser" args="load pointcloud_to_laserscan/CloudToScan openni_manager"> <remap from="cloud" to="cloud_throttled"/> </node> </launch>

This will publish /scan topic without the need for gmapping. And then you can use this launch file in your slam.launch.

Hope this helps !!

P.S. Please make sure the name of openni launch file.. In my case it's present as mentioned in the above location.

click to hide/show revision 2
correct display of source code

Hi,

For this you need to use PointCloud to LaserScan package. It comes with turtlebot stack. You need to create a launch file say kinect_laser.launch with below nodes:

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

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

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>

</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="/camera_depth_frame"/> <remap from="cloud" to="cloud_throttled"/> </node> </launch>

</launch>

This will publish /scan topic without the need for gmapping. And then you can use this launch file in your slam.launch.

Hope this helps !!

P.S. Please make sure the name of openni launch file.. In my case it's present as mentioned in the above location.