Problem with hector_slam

asked 2014-11-23 07:29:06 -0500

Morpheus gravatar image

updated 2014-12-08 15:28:30 -0500

bvbdort gravatar image

I am getting a warning with hector_slam tutorial.launch

: [ WARN] [1416748437.266266949]: No transform between frames /map and scanmatcher_frame available after 20.005297 seconds of waiting. This warning only prints once.

I am trying to run a laser scan with out odometer. Here is the copy of my launch file:

<?xml version="1.0" encoding="UTF-8"?>
<launch>
  <arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
  <arg name="base_frame" default="base_footprint"/>
  <arg name="odom_frame" default="nav"/>
  <arg name="pub_map_odom_transform" default="true"/>
  <arg name="scan_subscriber_queue_size" default="5"/>
  <arg name="scan_topic" default="scan"/>
  <arg name="map_size" default="2048"/>

  <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

    <!-- Frame names -->
    <param name="map_frame" value="map"/>
    <param name="base_frame" value="$(arg base_frame)"/>
    <param name="odom_frame" value="$(arg base_frame)"/>

    <!-- Tf use -->
    <param name="use_tf_scan_transformation" value="true"/>
    <param name="use_tf_pose_start_estimate" value="false"/>
    <param name="pub_map_odom_transform" value="$(arg pub_map_odom_transform)"/>

    <!-- Map size / start point -->
    <param name="map_resolution" value="0.050"/>
    <param name="map_size" value="$(arg map_size)"/>
    <param name="map_start_x" value="0.5"/>
    <param name="map_start_y" value="0.5"/>
    <param name="map_multi_res_levels" value="2"/>

    <!-- Map update parameters -->
    <param name="update_factor_free" value="0.4"/>
    <param name="update_factor_occupied" value="0.9"/>    
    <param name="map_update_distance_thresh" value="0.4"/>
    <param name="map_update_angle_thresh" value="0.06"/>
    <param name="laser_z_min_value" value="-1.0"/>
    <param name="laser_z_max_value" value="1.0"/>

    <!-- Advertising config --> 
    <param name="advertise_map_service" value="true"/>

    <param name="scan_subscriber_queue_size" value="$(arg scan_subscriber_queue_size)"/>
    <param name="scan_topic" value="$(arg scan_topic)"/>

    <!-- Debug parameters -->
    <!--
      <param name="output_timing" value="false"/>
      <param name="pub_drawings" value="true"/>
      <param name="pub_debug_output" value="true"/>
    -->
    <param name="tf_map_scanmatch_transform_frame_name" value="$(arg tf_map_scanmatch_transform_frame_name)"/>
  </node>

  <!--<node pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster" args="0 0 0 0 0 0 map nav 100"/>-->
</launch>

Thank you for your help.

edit retag flag offensive close merge delete

Comments

may be problem with laser topic name or clock option in rosbag play

bvbdort gravatar imagebvbdort ( 2014-12-08 15:35:03 -0500 )edit

The problem is that there's nothing in my rosbag after recording my laser scan. I can view the real time actual scan with rviz.

Morpheus gravatar imageMorpheus ( 2014-12-11 21:17:17 -0500 )edit

just try with recording bag again

bvbdort gravatar imagebvbdort ( 2014-12-12 00:51:56 -0500 )edit

With rosbag record -a, I get:[ WARN] [1418565044.601012694]: /use_sim_time set to true and no clock published. Still waiting for valid time...

Morpheus gravatar imageMorpheus ( 2014-12-14 07:58:35 -0500 )edit

do rosparam set use_sim_time true before starting record.

bvbdort gravatar imagebvbdort ( 2014-12-14 10:11:07 -0500 )edit

I did get a map made, and could play it back. I set rosparam set use_sim_time false. I don't know if my robot can use it, though.

Morpheus gravatar imageMorpheus ( 2014-12-14 16:05:27 -0500 )edit

sorry, can you tell me what is the problem now?

bvbdort gravatar imagebvbdort ( 2014-12-15 10:08:05 -0500 )edit