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

How to fix problem searchDir angle change too large

asked 2015-10-04 22:42:55 -0600

Chaiyakit gravatar image

updated 2020-08-20 15:42:16 -0600

jayess gravatar image

I found this problem, which I used hector_slam with RPLidar ran on Ubuntu desktop 14.04 lts don't know anyone ever had. It show that message. "SearchDir angle change too large" makes the map that was created is distorted. By what the leap of the position or direction is distorted. As shown in the figure, ( and ( which maps should be shown. ( and ( Can anybody help? Or this problem caused by setting parameters, I set my right, parameters are as follows


<?xml version="1.0"?>


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

    <!-- Frame names -->
    <param name="pub_map_odom_transform" value="true"/>
    <param name="map_frame" value="map" />
    <param name="base_frame" value="base_link" />
    <param name="odom_frame" value="base_link" />

    <!-- Tf use -->
    <param name="use_tf_scan_transformation" value="true"/>
    <param name="use_tf_pose_start_estimate" value="false"/>

    <!-- Map size / start point -->
    <param name="map_resolution" value="0.025"/>
    <param name="map_size" value="2048"/>
    <param name="map_start_x" value="0.5"/>
    <param name="map_start_y" value="0.5" />
    <param name="laser_z_min_value" value = "-1.0" />
    <param name="laser_z_max_value" value = "1.0" />
    <param name="map_multi_res_levels" value="2" />

    <param name="map_pub_period" value="2" />
    <param name="laser_min_dist" value="0.4" />
    <param name="laser_max_dist" value="5.5" />
    <param name="output_timing" value="false" />
    <param name="pub_map_scanmatch_transform" value="true" />
    <!--<param name="tf_map_scanmatch_transform_frame_name" value="scanmatcher_frame" />-->

    <!-- Map update parameters -->
    <param name="update_factor_free" value="0.4"/>
    <param name="update_factor_occupied" value="0.7" />    
    <param name="map_update_distance_thresh" value="0.2"/>
    <param name="map_update_angle_thresh" value="0.06" />

    <!-- Advertising config --> 
    <param name="advertise_map_service" value="true"/>
    <param name="scan_subscriber_queue_size" value="5"/>
    <param name="scan_topic" value="scan"/>


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



Thank you for your answer soon. I just learned to use,Sorry about my grammar.

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2015-10-07 04:03:52 -0600

This error indicates that the scanmatcher failed to find a plausible solution. Given that many people reported good results with the RPLidar I suspect the parameters you chose cause the lower performance. I haven't tried the RPLidar myself, but on a quick glance I'd set the map resolution to 0.05 (as opposed to 0.025) and try again.

edit flag offensive delete link more


Thank you, I will test again.

Chaiyakit gravatar image Chaiyakit  ( 2015-10-07 04:21:06 -0600 )edit

@Chaiyakit: did Stefan's recommendation fix your issue? I too am seeing this error every so often, usually caused by moving or turning too quickly. Thanks!

dchang0 gravatar image dchang0  ( 2016-02-09 02:03:32 -0600 )edit

@dchang0,Hi,Are your problem fixed?

little_bob gravatar image little_bob  ( 2017-05-31 02:30:17 -0600 )edit

Yes, sort of. The fix was to upgrade from an RPLidar unit to a Hokuyo UTM-30LX lidar unit. With this superior unit, it could handle the much higher scan rate with far fewer map errors. (It was still possible to break the map when other people moved on the map.)

dchang0 gravatar image dchang0  ( 2017-05-31 02:34:30 -0600 )edit

谢谢。Thank you!

little_bob gravatar image little_bob  ( 2017-05-31 05:11:07 -0600 )edit

hello i am using utm-30lx and i still got the same error.

mgrallos gravatar image mgrallos  ( 2022-03-22 05:03:45 -0600 )edit

answered 2020-08-20 12:50:56 -0600

parzival gravatar image

Something which recently happened to me, the issue turned out to be the LiDaR had become inaccurate. Replacing the old worn LiDaR with a new one solved the issue with same parameters

edit flag offensive delete link more

answered 2019-10-31 09:18:27 -0600

Behzad McKizade gravatar image

updated 2019-10-31 09:19:53 -0600

Hi, In my experience this massage comes from bad tuning if your parameters I mean
param name="map_update_distance_thresh" value="0.2"/
param name="map_update_angle_thresh" value="0.06" /
this massage shows you that you didnt tune your param well and you cross over your limit of your params

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-10-04 22:42:55 -0600

Seen: 4,458 times

Last updated: Aug 20 '20