Ask Your Question
0

Hector_slam and frames ?!!! I'm lost...

asked 2012-07-04 09:33:23 -0600

psykokwak gravatar image

updated 2012-07-04 10:09:37 -0600

mjcarroll gravatar image

Hi all. I have a wheeled robot that provide odometry, ahrs and a laser. I'm trying to use hector_slam but I don't understand the frame and transform system.

My base robot package provide an "/odom" topic and frame. This frame has the "/base_link" frame as child : driver code

I set up my launch file as follow :

<node pkg="hector_imu_attitude_to_tf" type="imu_attitude_to_tf_node" name="imu_attitude_to_tf_node" output="screen">
  <remap from="imu_topic" to="/imu" />
  <param name="base_stabilized_frame" type="string" value="/base_stabilized" />
  <param name="base_frame" type="string" value="/base_frame" />
</node>

<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="/base_footprint" />
  <param name="odom_frame" value="/odom" />

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

  <!-- Map size / start point -->
  <param name="map_resolution" value="0.050"/>
  <param name="map_size" value="2048"/>
  <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="5"/>
  <param name="scan_topic" value="/laser/scan"/>

  <param name="tf_map_scanmatch_transform_frame_name" value="scanmatcher_frame" />
</node>
<node pkg="tf" type="static_transform_publisher" name="laser_link" args="0.031 0.0 0.251 0.0 0.0 0.0 /base_link /laser 50" />
<node pkg="tf" type="static_transform_publisher" name="imu_link" args="-0.049 0.0 0.180 0.0 0.0 0.0 /base_link /imu 50" />

When I launch my launch file I have the following errors :

[ INFO] [1341430193.896364275]: lookupTransform /base_footprint to /laser timed out. Could not transform laser scan into base_frame.
[ERROR] [1341430193.945936734]: Trajectory Server: Transform from /map to /base_link failed: Frame id /map does not exist! Frames (9): Frame /base_link exists with parent /odom.
Frame /odom exists with parent NO_PARENT.
Frame /base_frame exists with parent /base_stabilized.
Frame /base_stabilized exists with parent NO_PARENT.
Frame /laser exists with parent /base_link.
Frame /imu exists with parent /base_link.

One week I'm trying to understand the frame and transform system without success :/ Is there an exemple that exmplain how to use hector_slam from scratch ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2012-07-04 09:54:18 -0600

updated 2012-07-04 10:11:26 -0600

[ INFO] [1341430193.896364275]: lookupTransform /base_footprint to /laser timed out. Could not transform laser scan into base_frame.
[ERROR] [1341430193.945936734]: Trajectory Server: Transform from /map to /base_link failed: Frame id /map does not exist! Frames (9): Frame /base_link exists with parent /odom.

This tells you that there is no link between /base_link and /laser and that there is a transform /base_footprint which was not resolveable to /laser. You can solve this by changing

<param name="base_frame" value="/base_footprint" />

to

<param name="base_frame" value="/base_stabilized" />

or change your static_tranform_publischers to /base_stabilized .

For more infos check this How-To-Setup.

edit flag offensive delete link more

Comments

1
weiin gravatar imageweiin ( 2012-07-04 14:58:35 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-07-04 09:33:23 -0600

Seen: 3,753 times

Last updated: Jul 04 '12