tf time out error : hector slam

asked 2017-08-09 15:30:47 -0500

yun.kim gravatar image

updated 2017-08-10 06:11:37 -0500

I'm suffering tf time out error. I want to use hector slam on a UAV(quad copter) with a Lidar

First, the error output on the terminal looks like the below

[ INFO] [1502340821.590928774]: lookupTransform base_stabilized to laser timed out. Could not transform laser scan into base_frame.
[ INFO] [1502340822.096555365]: lookupTransform base_stabilized to laser timed out. Could not transform laser scan into base_frame.
[ WARN] [1502340822.584208719]: No transform between frames /map and scanmatcher_frame available after 20.002080 seconds of waiting. This warning only prints once.
[ INFO] [1502340822.601611575]: lookupTransform base_stabilized to laser timed out. Could not transform laser scan into base_frame.

I set tf setting as follows.

map -> (scanmatcher_frame , static) -> base_stabilized (odom)

base_stabilized -> base_link (imu_attitude node in order to describe roll,pitch motion)

base_link -> laser (static tf publisher)

I think I've got correct at the tf setting. and all topics have proper time stamps.

I'll let you see the launch file that I use and tf tree.

<launch>

<arg name="geotiff_map_file_path" default="$(find hector_geotiff)/maps"/>
<param name="/use_sim_time" value="false"/>
<node pkg="rviz" type="rviz" name="rviz"
args="-d $(find hector_slam_launch)/rviz_cfg/mapping_demo.rviz"/>

<include file="$(find hector_imu_attitude_to_tf)/launch/example3.launch"/>
<node pkg="tf" type="static_transform_publisher" name="scanmatcher_to_base_stabilized" args="0 0 0 0 0 0 scanmatcher_frame base_stabilized 100"/>
<!-- node pkg="tf" type="static_transform_publisher" name="base_stabilized_to_base_link" args="0 0 0 0 0 0 base_stabilized base_link 100"/ -->
<node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" args="0 0 0 0 0 0 base_link laser 100"/>

<arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
<arg name="base_frame" default="base_stabilized"/>
<arg name="odom_frame" default="base_stabilized"/>
<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 odom_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)"/>
  <param name="pub_map_scanmatch_transform" value="false" />
  <param name="tf_map_scanmatch_transform_frame_name" value="$(arg tf_map_scanmatch_transform_frame_name)" />

  <!-- 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="3" />

  <!-- 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.35"/>
  <param name="map_update_angle_thresh" value="0.5" />
  <param name="laser_z_min_value" value = "-1.0" />
  <param name="laser_z_max_value" value = "1.0" />
  <param name="laser_max_dist" value = "20" />

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

  <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"/>
  -->

  </node>

  <include file="$(find hector_geotiff)/launch/geotiff_mapper.launch">
  <arg name="trajectory_source_frame_name" value="scanmatcher_frame"/>
  <arg name="map_file_path" value="$(arg geotiff_map_file_path)"/>
  </include>

</launch>

the tf tree is given .. here

thanks in advance!

edit retag flag offensive close merge delete

Comments

What is the terminal output?

jayess gravatar image jayess  ( 2017-08-09 17:02:03 -0500 )edit

[ INFO] [1502340822.096555365]: lookupTransform base_stabilized to laser timed out. Could not transform laser scan into base_frame.

yun.kim gravatar image yun.kim  ( 2017-08-09 23:51:06 -0500 )edit

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

yun.kim gravatar image yun.kim  ( 2017-08-09 23:55:56 -0500 )edit

You should update your question with the output rather than posting it as a comment.

jayess gravatar image jayess  ( 2017-08-09 23:56:47 -0500 )edit

looks like that. it seems that it doesn't create any map As you can see in the link , there's no transforam between any frames

yun.kim gravatar image yun.kim  ( 2017-08-09 23:57:48 -0500 )edit

@jayess yes, duly noted. I'll add the outpuot in the question. thanks for your advise

yun.kim gravatar image yun.kim  ( 2017-08-09 23:59:02 -0500 )edit