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

I can't do mapping with my LiDar

asked 2021-01-27 13:11:23 -0500

lucasalbini gravatar image

Hi guys! I'm trying to map my workplace, but I'm not getting it, the map that is made rotates together with the robot and is unable to map effectively, as in the figure below.

https://imgur.com/4KYBKbs

My laser is Keyence's SZ-16D model with 270-degree coverage with 0.36-degree resolution.

Our old lidar was an XV11 and it worked perfectly with the same settings, with the difference that it had a 360-degree field of view.

We have already tried with Gmapping and Hector Slam and both are problematic, the configuration files are shown below.

Keyence launch file

 <launch>
    <node pkg="tf" type="static_transform_publisher" name="laser_broadcaster" 
          args="0 0 0 0 0 0 base_link keyence_laser 100">
    </node>
    <!--node pkg="tf" type="static_transform_publisher" name="odom_map_broadcaster" args="0 0 0 0 0 0 /map /odom 100" /-->
    <node pkg="nav_hub" type="LaserScan_SZ-16D.py" name="laserscan_sz16D_node" output="screen" />
</launch>

Gmapping launch file

<launch>
  <arg name="scan_topic"  default="scan" />
  <arg name="base_frame"  default="base_link"/>
  <arg name="odom_frame"  default="odom"/>

  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
    <param name="base_frame" value="$(arg base_frame)"/>
    <param name="odom_frame" value="$(arg odom_frame)"/>
    <param name="map_update_interval" value="5.0"/>
    <param name="maxUrange" value="14.0"/>
    <param name="maxRange" value="16.0"/>
    <param name="sigma" value="0.05"/>
    <param name="kernelSize" value="1"/>
    <param name="lstep" value="0.05"/>
    <param name="astep" value="0.05"/>
    <param name="iterations" value="5"/>
    <param name="lsigma" value="0.075"/>
    <param name="ogain" value="3.0"/>
    <param name="lskip" value="0"/>
    <param name="minimumScore" value="0"/>
    <param name="srr" value="0.01"/>
    <param name="srt" value="0.02"/>
    <param name="str" value="0.01"/>
    <param name="stt" value="0.02"/>
    <param name="linearUpdate" value="0.5"/>
    <param name="angularUpdate" value="0.436"/>
    <param name="temporalUpdate" value="-1.0"/>
    <param name="resampleThreshold" value="0.5"/>
    <param name="particles" value="80"/>
    <param name="xmin" value="-10.0"/>
    <param name="ymin" value="-10.0"/>
    <param name="xmax" value="10.0"/>
    <param name="ymax" value="10.0"/>

    <param name="delta" value="0.036"/>
    <param name="llsamplerange" value="0.01"/>
    <param name="llsamplestep" value="0.01"/>
    <param name="lasamplerange" value="0.005"/>
    <param name="lasamplestep" value="0.005"/>
    <remap from="scan" to="$(arg scan_topic)"/>
  </node>
</launch>

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-01-29 06:40:55 -0500

miura gravatar image

I have three ideas. I hope one of them will improve the situation.

1

args="0 0 0 0 0 0 base_link keyence_laser 100">

It is possible that the LiDAR mounting direction does not match the settings. It is recommended to view the /scan topic in rviz and observe the reaction when you move the robot.

2

maxUrange < maximum range of the real sensor <= maxRange

It is possible that this is not met.

3

<param name="map_update_interval" value="5.0"/> > <param name="map_update_interval" value="5.0

If the processing can keep up, reducing the value may improve the map creation.

edit flag offensive delete link more

Comments

Altering the base_link parameters gave us some help! We've altered the base link yaw, and it helped us a lot. Turns out the LIDAR was seemingly a bit rotated in regards to the actual robot.

Now it can actually map our place, and we've been getting really good maps, but there's still a problem - it only maps if the robot goes astoundingly slow. If there's only a semblance of it going fast, the map goes to something completely absurd.

Do you know if there's anything we can change so the robot can map in faster velocities?

Thanks in advance, and thank you so much for the help!

lucasalbini gravatar image lucasalbini  ( 2021-02-01 07:47:32 -0500 )edit

I don't know much about it, but it is possible that the faster the robot moves, the more likely the odometry will be off, and the more likely the scan results will be off. Therefore, increasing the srr, srt, str, and stt may help. Since this is changing from the original question, someone may be able to answer it if you post it as a separate question.

miura gravatar image miura  ( 2021-02-04 06:00:09 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-01-27 13:08:48 -0500

Seen: 167 times

Last updated: Jan 29 '21