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

Robot jumps after the initial estimate with gmapping

asked 2021-09-13 11:00:58 -0600

AlexandrosNic gravatar image

updated 2021-09-13 11:08:12 -0600

I have a gmapping SLAM method coupled with robot_localization to provide the map-odom, odom-base_footprint transformation respectively (ROS1).

When I power up the system, the generated map is quite accurate, however, after around 10s and without moving the robot, the robot suddenly jumps to another place, destroying the map.

Before: image description

After: image description

Does anyone know where this jump comes from?

Thank you in advance.

gmapping config file:

<launch>
  <arg name="scan_topic" default="scan"/> <!--scan_filtered-->
  <arg name="namespace" default="spraybase"/>

  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">

    <param name="odom_frame" value="$(arg namespace)/odom"/>
    <param name="base_frame" value="$(arg namespace)/base_footprint"/>
    <param name="map_frame" value="$(arg namespace)/map"/>

    <!-- Process 1 out of every this many scans (set it to a higher number to skip more scans)  -->
    <param name="throttle_scans" value="1"/>

    <param name="map_update_interval" value="0.1"/> <!-- default: 5.0 -->

    <!-- The maximum usable range of the laser. A beam is cropped to this value.  -->
    <param name="maxUrange" value="10.0"/>

    <!-- The maximum range of the sensor. If regions with no obstacles within the range of the sensor should appear as free space in the map, set maxUrange < maximum range of the real sensor <= maxRange -->
    <param name="maxRange" value="10.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="minimumScore" value="150.0"/>
    <!-- Number of beams to skip in each scan. -->
    <param name="lskip" 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"/>

    <!-- Process a scan each time the robot translates this far  -->
    <param name="linearUpdate" value="0.1"/>

    <!-- Process a scan each time the robot rotates this far  -->
    <param name="angularUpdate" value="0.05"/>

    <param name="temporalUpdate" value="-1.0"/>
    <param name="resampleThreshold" value="0.5"/>

    <!-- Number of particles in the filter. default 30        -->
    <param name="particles" value="20"/>

    <!-- Initial map size  -->
    <param name="xmin" value="-10.0"/>
    <param name="ymin" value="-10.0"/>
    <param name="xmax" value="10.0"/>
    <param name="ymax" value="10.0"/>

    <!-- Processing parameters (resolution of the map)  -->
    <param name="delta" value="0.1"/>

    <!-- <param name="minimumScore" value="500"/>
    <param name="occ_thresh" value="0.5"/> -->

    <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 namespace)/$(arg scan_topic)"/> -->
    <!-- <param name="base_footprint_frame" value="base_footprint"/> -->
    <!-- <remap from="odom ...
(more)
edit retag flag offensive close merge delete

Comments

What computer are you running gmapping on? Do you have a network setup or are all the scripts run on single computer?

parzival gravatar image parzival  ( 2021-09-13 12:10:06 -0600 )edit

I am running them on an OnLogic i5 8th gen PC (https://www.onlogic.com/de-de/ml100g-...)

I run all the scripts on a single computer. I only use my laptop (i5, 8ram) to visualize rviz and access the OnLogic's terminal, by using the "ssh -X ..." command

AlexandrosNic gravatar image AlexandrosNic  ( 2021-09-14 04:43:18 -0600 )edit
1

What is your odometry source?

parzival gravatar image parzival  ( 2021-09-14 07:25:47 -0600 )edit

Indeed the mistake was hiding in the odometry source. Thanks for your guidance. I will post it as an answer ;)

AlexandrosNic gravatar image AlexandrosNic  ( 2021-09-14 14:58:00 -0600 )edit

Glad I could help :)

parzival gravatar image parzival  ( 2021-09-16 05:01:47 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-14 15:00:59 -0600

AlexandrosNic gravatar image

The error was in the init_pose_from_topic parameter of the rf2o package. I fuse wheel-encoded and rf2o odometry with SLAM using robot_localization package.

I set the init_pose_from_topic parameter of rf2o package to the topic of the wheel encoded odometry, but that result to this jump. I had to set it to empty ( "" )

edit flag offensive delete link more

Comments

Glad you were able to fix it.

osilva gravatar image osilva  ( 2021-09-15 12:10:26 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2021-09-13 11:00:58 -0600

Seen: 184 times

Last updated: Sep 14 '21