Slam gmapping map doesn't update in RViz after the first laser scan
I am trying to implement gmapping SLAM into my current project, visualising the map in RViz. However, the slam gmapping only shows the map from the first laser scan and doesn't update when i move the robot. My set up is:
- custom robot simulated in CopelliaSim (V-REP)
- hokuyo sensor attached to robot
- all position info published to tf from CopelliaSim
- run simulation with usesimtime set to true
run gmapping slam with the following launch file:
<?xml version="1.0"?>
<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_frame" value="$(arg map_frame)"/>
<param name="throttle_scans" value="1"/>
<param name="map_update_interval" value="2.0"/>
<param name="maxUrange" value="5.0"/>
<param name="maxRange" value="40.0"/>
<remap from="scan" to="$(arg scan_topic)"/>
</node>
When running the simulation I can see that the laser scan is visualised correctly in RViz and moves when the robot is driven.
The commandline output from gmappong also seems to be responding correctly to the laser scan, i've shown the first couple of responses below:
[ INFO] [1587041207.501683282]: Laser is mounted upwards. -maxUrange 5 -maxUrange 40 -sigma 0.05 -kernelSize 1 -lstep 0.05 -lobsGain 3 -astep 0.05 -srr 0.01 -srt 0.02 -str 0.01 -stt 0.02 -linearUpdate 0.1 -angularUpdate 0.05 -resampleThreshold 0.5 -xmin -10 -xmax 10 -ymin -10 -ymax 10 -delta 0.02 -particles 10 [ INFO] [1587041207.503198686]: Initialization complete update frame 0 update ld=0 ad=0 Laser Pose= 0.363947 0.00158579 -0.00387078 mcount 0 Registering First Scan update frame 28 update ld=0.117944 ad=0.0368429 Laser Pose= 0.478733 0.0186419 0.0327192 mcount 1 Average Scan Matching Score=675.004 neff= 7.59408 Registering Scans:Done update frame 31 update ld=0.115139 ad=0.00576534 Laser Pose= 0.593606 0.026421 0.0384845 m_count 2 Average Scan Matching Score=679.28 neff= 7.797 Registering Scans:Done
Has anyone got any ideas why it isn't updating the map in RViz?
Asked by anonymous49656 on 2020-04-16 07:51:34 UTC
Answers
I once had this issue and I solved it by increasing the temporal update in the gmapping launch file above 0 .
Asked by Davies Ogunsina on 2022-05-13 12:43:45 UTC
Comments