Ask Your Question
0

HECTOR SLAM + SICK LMS 200: Map not appearing

asked 2016-05-23 05:21:43 -0600

Omair Khalid gravatar image

We are trying to implement Hector SLAM (without odom) using SICK LMS 200 laser range finder and we desperately need help. We are unable to display the map despite adding the /map topic in the Rviz displays.

One error that we are persistently getting is "lookupTransform base_footprint to /camera_link timed out. Could not transform laser scan into base_frame."

Here is the launch file we are using:

mapping2.launch

<launch>

    <node pkg="tf" type="static_transform_publisher" name="map_to_scanmatcher" args="0 0 0 0 0 0 /map /hector_mapping 100"/>
   <node pkg="tf" type="static_transform_publisher" name="map_to_base_footprint" args="0 0 0 0 0 0 /map /base_footprint 100"/>
  <node pkg="tf" type="static_transform_publisher" name="base_footprint_to_laser_link" args="0 0 0 0 0 0 /base_footprint /camera_link 100"/>
  <node pkg="tf" type="static_transform_publisher" name="base_footprint_to_base_link" args="0 0 0 0 0 0 /base_footprint /base_link 100"/>
 <node pkg="tf" type="static_transform_publisher" name="base_link_to_base_stabilized" args="0 0 0 0 0 0 /base_link /base_stabilized 100"/>
 <node pkg="tf" type="static_transform_publisher" name="base_stablized_to_base_frame" args="0 0 0 0 0 0 /base_stabilized /base_frame 100"/>
 <node pkg="tf" type="static_transform_publisher" name="base_frame_to_laser_link" args="0 0 0 0 0 0 /base_frame /camera_link 100"/>
 <node pkg="tf" type="static_transform_publisher" name="base_to_nav_link" args="0 0 0 0 0 0 /base_frame /nav 100"/>

  <arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
  <arg name="base_frame" default="base_footprint"/>
   <param name="pub_map_odom_transform" value="true"/>
   <param name="map_frame" value="map" />
     <param name="base_frame" value="base_frame" />
      <param name="odom_frame" value="base_frame" />

     <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="sicktoolbox_wrapper"
     type="sicklms"
     name="sicklms"
  >
    <rosparam command="load" file="./Packages/hectorslam/launch/lms200_config.yaml" />
  </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="$(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)"/>

<!-- 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="/scan"/>
<param name="tf_map_scanmatch_transform_frame_name" value="$(arg tf_map_scanmatch_transform_frame_name)" />

  </node>

   <include file="$(find hector_geotiff)/launch/geotiff_mapper.launch"/>

   </launch>

Here is the configuration file that we are using for the SICK LMS 200 LIDAR:

 port: /dev/ttyS2 
 baud: 38400
 connect_delay: 35 
 scan_duration: 0.025 #no info about that in SICK-docu, but 0.025 is believable and looks good in rviz
 scan_cycle_time: 0.040 #SICK-docu says S300 scans every 40ms
 inverted: false
  scan_id: 7
  frame_id: /camera_link
  scan_intervals: [[-1.5708, 1.5708]] #[rad] these intervals are included to the scan
  fields: 
  '1':
  scale ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-05-24 00:46:22 -0600

gp gravatar image

updated 2016-05-26 06:48:59 -0600

In your launch file, you are adding two transforms first "base_footprint_to_laser_link" and also "base_frame_to_laser_link" doing this is not correct because in tf each leaf can have only one parent.

Have a look at this project hector_slam_example. You can use the launch file "hector_hokuyo.launch" in the launch folder. Modify this file to use SICK laser in place of hokuyo.

edit flag offensive delete link more

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: 2016-05-23 05:21:43 -0600

Seen: 501 times

Last updated: May 26 '16