Turtlebot not publishing to /scan topic in custom world

asked 2020-06-16 12:34:17 -0600

wric gravatar image

I am trying to do some gmapping with turtlebot2. I can successfully run the tutorials presented in the wiki.

I have created a package for the gmapping in a new workspace, and I have copied and pasted the launch file from the wiki into my workspace. The gmapping node doesn't work because the turtlebot has stopped publishing to the /scan topic which is required for gmapping.

I have also looked at this link and this link.

 <group ns="turtlebot">

  <arg name="base"      value="$(optenv TURTLEBOT_BASE kobuki)"/> <!-- create, roomba -->
  <arg name="battery"   value="$(optenv TURTLEBOT_BATTERY /proc/acpi/battery/BAT0)"/>  <!-- /proc/acpi/battery/BAT0 -->
  <arg name="gui" default="true"/>
  <arg name="stacks"    value="$(optenv TURTLEBOT_STACKS hexagons)"/>  <!-- circles, hexagons -->
  <arg name="3d_sensor" value="$(optenv TURTLEBOT_3D_SENSOR kinect)"/>  <!-- kinect, asus_xtion_pro -->

  <include file="$(find turtlebot_gazebo)/launch/includes/$(arg base).launch.xml">

    <arg name="base" value="$(arg base)"/>
    <arg name="stacks" value="$(arg stacks)"/>
    <arg name="3d_sensor" value="$(arg 3d_sensor)"/>

  <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher_turtlebot">
    <param name="publish_frequency" type="double" value="30.0" />

  <!-- Fake laser -->
  <node pkg="nodelet" type="nodelet" name="laserscan_nodelet_manager" args="manager"/>
  <node pkg="nodelet" type="nodelet" name="depthimage_to_laserscan"
        args="load depthimage_to_laserscan/DepthImageToLaserScanNodelet laserscan_nodelet_manager">
    <param name="scan_height" value="10"/>
    <param name="output_frame_id" value="/camera_depth_frame"/>
    <param name="range_min" value="0.45"/>
    <remap from="image" to="/camera/depth/image_raw"/>
    <remap from="scan" to="/scan"/>
edit retag flag offensive close merge delete


What are your sensors?

kosmastsk gravatar image kosmastsk  ( 2020-06-17 08:32:37 -0600 )edit