ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

hector slam problem

asked 2015-06-17 06:52:33 -0500

Kartierung_ss15 gravatar image

updated 2015-06-17 06:53:47 -0500

I want to create a map only with my Laserscanner SICK TIM551. So I started my laserscanner and hector slam with roslaunch hector_mapping sick_mapping.launch

I noticed this warning

lookupTransform base_link to laser timed out. Could not transform laser scan into base_frame.

My launch file

<launch>

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



    <param name="base_frame" value="base_link"/>
    <param name="odom_frame" value="laser_mount_link"/>
    <param name="pub_map_odom_transform" value="true"/>
    <param name="scan_subscriber_queue_size" value="20"/>

<param name="/use_sim_time" value="false" />

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

<node pkg="rviz" type="rviz" name="rviz" args="-d $(find hector_mapping)/rviz_cfg/rviz_sick.rviz"/>

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

<node pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster" args="0 0 0 0 0 0 base_link laser 100"/>

</launch>

here is a pic of my frames:

http://www.pic-upload.de/view-2739040...

Can anyone help me??

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-06-18 05:14:21 -0500

jacobsolid gravatar image

updated 2015-06-18 05:17:46 -0500

hi, maybe you have problems with frames, you have to check how to set frames in your launch file, i remener i had issues like this and i changes my launch file to this and it orks just fine

... <arg name="map_size" default="450"/>
<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

<!-- Map size / start point -->
<param name="map_resolution" value="0.030"/>
<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>

edit flag offensive delete link more
1

answered 2016-04-11 07:46:18 -0500

updated 2016-04-11 07:47:36 -0500

As this is 10 months old I don't know if you still need this, but for anyone else having this problem it is because the base_frame is set to base_link but the robot state publisher is not publishing the base_link. There are two ways to fix this. The quick and dirty way is to change the base_link parameter in the launch file to laser_mount_link. The better way would be to add a base_link-->laser_mount_link transform to the robot state publisher. If the second method is followed you should also set the odom_frame to base_link as well.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-06-17 06:52:33 -0500

Seen: 793 times

Last updated: Apr 11 '16