Robotics StackExchange | Archived questions

laser_scan_matcher error

Hey guys! I'm trying to localize in known map using amcl with laserscanmatcher package for odometry using 2D Lidar SICK NAV 310 with its driver. I already made a map using hector_slam package. And here is my amcl launch file:

<launch>

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

    <node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" args="0.0 0.0 0.0 0.0 0.0 0.0 base_link cloud 100" />

    <node pkg="laser_scan_matcher" type="laser_scan_matcher_node" name="laser_scan_matcher_node" output="screen">
        <param name="fixed_frame" value = "odom"/>
        <param name="base_frame" value = "base_link"/>
        <param name="publish_tf" value="true"/>
        <param name="publish_odom" value="true"/>
        <param name="use_alpha_beta" value="true"/>
        <param name="max_iterations" value="10"/>

        <remap from="scan" to="/sick_nav_3xx/scan" />

    </node>

    <node name="map_server" pkg="map_server" type="map_server" args="/home/hilmi/catkin/data/maps/lab_ica_1.yaml"/>
    <!-- <node name="map_server" pkg="map_server" type="map_server" args="/home/hilmi/catkin/data/maps/lab_ica_2_ascii.yaml"/> -->

    <node pkg="amcl" type="amcl" name="amcl" output="screen" >
        <!-- Publish scans from best pose at a max of 10 Hz -->
        <param name="odom_model_type" value="diff-corrected"/>
        <param name="odom_alpha5" value="0.1"/>
        <param name="transform_tolerance" value="0.2" />
        <param name="gui_publish_rate" value="10.0"/>
        <param name="laser_max_beams" value="30"/>
        <param name="min_particles" value="500"/>
        <param name="max_particles" value="5000"/>
        <param name="kld_err" value="0.05"/>
        <param name="kld_z" value="0.99"/>
        <param name="odom_alpha1" value="0.2"/>
        <param name="odom_alpha2" value="0.2"/>
        <!-- translation std dev, m -->
        <param name="odom_alpha3" value="0.8"/>
        <param name="odom_alpha4" value="0.2"/>
        <param name="laser_z_hit" value="0.5"/>
        <param name="laser_z_short" value="0.05"/>
        <param name="laser_z_max" value="0.05"/>
        <param name="laser_z_rand" value="0.5"/>
        <param name="laser_sigma_hit" value="0.2"/>
        <param name="laser_lambda_short" value="0.1"/>
        <param name="laser_lambda_short" value="0.1"/>
        <param name="laser_model_type" value="likelihood_field"/>
        <!-- <param name="laser_model_type" value="beam"/> -->
        <param name="laser_likelihood_max_dist" value="2.0"/>
        <param name="update_min_d" value="0.2"/>
        <param name="update_min_a" value="0.5"/>
        <param name="odom_frame_id" value="odom"/>
        <param name="base_frame_id" type="str" value="base_link" />
        <param name="global_frame_id" type="str" value="map" />
        <param name="resample_interval" value="1"/>
        <param name="transform_tolerance" value="0.1"/>
        <param name="recovery_alpha_slow" value="0.0"/>
        <param name="recovery_alpha_fast" value="0.0"/>
        <param name="use_map_topic" value="true" />
        <param name="first_map_only" value="true" />

        <remap from="scan" to="/sick_nav_3xx/scan" />

    </node>
</launch>

But, i got this error when launching it:

[ WARN] [1679891634.121426056]: Error in scan matching
:err: Strange FOV: -6.278822 rad = -359.750011 deg

Hope anyone can help! Thanks!

Asked by hilmi_ica on 2023-03-26 23:42:28 UTC

Comments

Hi,

My guess is that this has something to do with the driver for the scanner. There are a number of similar issues:

e.g. https://answers.ros.org/question/211985/laser_scan_matcher-error/

How are you bringing the laser up?

Asked by MarkyMark2012 on 2023-03-27 16:31:57 UTC

Hey thanks for the reply, I thought the same too. But, i'm not good or proficient enough to look for the problem. For the simulation i only use a 2D Lidar (SICK NAV310) that connected to the computer by ethernet cable. To get the scan data, i build the driver on ros env and run this command:

roslaunch sick_scan sick_nav_3xx.launch hostname:=(lidar_ip_adress)

Asked by hilmi_ica on 2023-03-28 01:20:59 UTC

Just looked at https://github.com/SICKAG/sick_scan/blob/master/launch/sick_nav_3xx.launch.

Do you get the same issue if you reduce the range of the min_ang and max_ang? i.e. instead of "-3.14159265359" try "-3.141"

Asked by MarkyMark2012 on 2023-03-28 07:43:05 UTC

Oh, that repo is an old driver. In this problem i'm using this new driver with launch file link: https://github.com/SICKAG/sick_scan_xd/blob/master/launch/sick_nav_3xx.launch and there is no parameter setting like that. Maybe i will try the old driver

Asked by hilmi_ica on 2023-03-28 09:22:06 UTC

It doesn't work. It still give the same error:

[ WARN] [1680060785.944776728]: Error in scan matching
:err: Strange FOV: -6.270096 rad = -359.250014 deg

I think the angle parameter set in the launch file doesn't actually change the FOV. I even used a range of -1.57 to 1.57 (-90 to 90):

rosparam get /sick_nav_3xx/min_ang
-1.57

and give the same erroe as the above

Asked by hilmi_ica on 2023-03-28 22:48:25 UTC

Answers