Hector mapping can't output the transform from map to odom gazebo

asked 2017-06-22 02:14:01 -0500

scopus gravatar image

updated 2017-06-25 19:52:38 -0500

Hi, all: I want to use turtlebot_gazebo to build a map with hector mapping in simulated environments. For now I use keyboard to control the movement of turtlebot. The turtlebot's movement in gazebo is normal, however, the mapping process failed. The hector slam either can't output the transfrom between the odom and map( so the turtlebot doesn't move in rviz) or the transform between the odom and map drastically changes(so the robot jumps randomly and drastically in rviz) . Can anyone tell me what cause such problem? I have successfully used karto slam with same configuration.

Thank you very much.

The launch files and operation procedures are as follows:

First at all, I use a launch file to invok the simulated and the model of robot:

<?xml version="1.0"?>
    <arg name="world_path" default="worlds/empty.world"/>
    <arg name="robot_ns" default="/"/>
    <include file="$(find evarobot_gazebo)/launch/start_gazebo.launch" >
        <arg name="world_path" value="$(arg world_path)"/>
    <!--include file="$(find evarobot_gazebo)/launch/spawn_evarobot.launch">
        <arg name="robot_ns" value="$(arg robot_ns)"/>
  <include file="$(find turtlebot_gazebo)/launch/includes/kobuki_new.launch.xml">
    <arg name="base" value="kobuki"/>
    <arg name="stacks" value="hexagons"/>
    <arg name="3d_sensor" value="kinect"/>
    <arg name="robot_ns" value="$(arg robot_ns)"/>
   <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
    <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"/>

secondly, launch hector mapping to build a map :

<?xml version="1.0"?>
   <arg name="robot_ns" default="/" />
  <param name="/use_sim_time" value="false"/>
  <node pkg="hector_mapping" type="hector_mapping" name="hector_height_mapping" output="screen">
        <param name="scan_topic" value="/scan" />   
        <param name="base_frame" value="base_footprint" />
        <param name="odom_frame" value="odom" />

        <param name="map_frame" value="map" />
        <param name="output_timing" value="false"/>
        <param name="advertise_map_service" value="true"/>
        <param name="use_tf_scan_transformation" value="true"/>
        <param name="use_tf_pose_start_estimate" value="false"/>
        <param name="pub_map_odom_transform" value="true"/>
        <param name="map_with_known_poses" value="false"/>
        <param name="map_pub_period" value="0.5"/>
        <param name="update_factor_free" value="0.45"/>
        <param name="map_update_distance_thresh" value="0.02"/>
        <param name="map_update_angle_thresh" value="0.1"/>
        <param name="map_resolution" value="0.05"/>
        <param name="map_size" value="1024"/>
        <param name="map_start_x" value="0.5"/>
        <param name="map_start_y" value="0.5"/>     
     <include file="$(find hector_geotiff)/launch/geotiff_mapper.launch">
    <arg name="trajectory_source_frame_name" value="scanmatcher_frame"/>

lastly, I use roslaunch turtlebot_teleop keyboard_teleop.launch to control turtlebot to move around, and use roslaunch turtlebot_rviz_launchers view_navigation.launch to view the results of mapping. The robot either doesn't move or jump drastically.

Can anybody give me a hint? Many thanks!


Fig 1: the gazebo environment is here: image description

Fig 2: The robot's pose changes drastically in rviz.(sorry, I only can upload a static picture). The robot jumps to a position far away from the map. image description

Fig 3: The robot doesn ... (more)

edit retag flag offensive close merge delete


What means a "big beat"?

sihe gravatar image sihe  ( 2017-06-22 09:24:44 -0500 )edit

Thank you for you attention! I just re-edited my question to make it more clear. "big beat" means drastically jumps.

scopus gravatar image scopus  ( 2017-06-22 21:01:23 -0500 )edit