Robotics StackExchange | Archived questions

DepthImage_to_laserscan+Kinect+ gmapping give error :(Scan Matching Failed, using odometry. Likelihood=0)

I'm truing to use Kinect camera with depthimagetolaserscan package and create image using gmapping . I tried in many way but what ever I try I always end to this error in gmapping : Scan Matching Failed, using odometry. Likelihood=0. I use ros kinetic .

video 1: kinect + depthimagetolaserscan : https://www.youtube.com/watch?v=rkPgEIGGrhQ

video 2: kinect + depthimagetolaserscan +gmapping : https://www.youtube.com/watch?v=s3ra_RRtdos

I uploade URDF file + robot spawn launch file (evasmallmaz.launch) + depthimagetolaserscan launch file(depthtolaser.launch) +slamgmapping launch file(slamgmapping.launch) on:- https://github.com/q8wwe/evarobot

my gmapping launch file, itried to remove all the parameter and kept scantopic , baseframe and odom_frame but same error :

<launch>
<arg name="scan_topic" default="depth_scan" />

<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
    <param name="base_frame" value="base_footprint"/>
    <param name="odom_frame" value="odom_combined"/>
    <param name="map_update_interval" value="0.20"/>
    <param name="maxUrange" value="4.5"/>
    <param name="maxRange" value="5.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="10"/>
    <param name="lsigma" value="0.075"/>
    <param name="ogain" value="3.0"/>
    <param name="lskip" value="0"/>
    <param name="minimumScore" value="100"/>
    <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.3"/>
    <param name="angularUpdate" value="0.5"/>
    <param name="temporalUpdate" value="2.0"/>
    <param name="resampleThreshold" value="0.5"/>
    <param name="particles" value="100"/>
    <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.25"/>
    <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>

My depthimage to laserscan launch file:

<launch>

<node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan">
    <param name="scan_height" value="3"/>
    <param name="range_min" value="0.45"/>
    <param name="range_max" value="8.0"/>
    <param name="output_frame_id" value="camera_depth_frame"/>
    <remap from="image" to="/camera/depth/image_raw"/>
    <remap from="scan" to="depth_scan"/>
    <remap from="camera_info" to="/camera/depth/camera_info"/>

  </node>
</launch>

I appreciate any help , support I tried so many approaches .

Asked by q8wwe on 2018-12-31 12:46:24 UTC

Comments

Just ideas:

Have you confirmed the scan topic looks correct when viewed through RVIZ?

Verify proper TFs?

ODOM viewed in RVIZ correct?

If your ODOM doesn't match up with laserscan it can cause issues. Like if ODOM rotates to the right but scan thinks rotated to the left, scan matching can fail

Asked by billy on 2018-12-31 20:06:29 UTC

gmapping is working with scan topic from the simulated laser and it worked with rviz. gmapping :the depth_scan topic from depthimage_to_laserscan is working with RVIZ ,but when launch gmapping node the robot start to jump and give the mentioned error .

I'm not sure where is the problem

Asked by q8wwe on 2019-01-01 14:23:53 UTC

Let me explain my points further. When I say looks correct, I mean to verify that what you see on RVIZ makes sense as you move the robot around. Forget gmapping for a minute. With laser on and features(room corner) present in scan, does rotating robot result in room corner moving or stay in place?

Asked by billy on 2019-01-01 21:36:11 UTC

i launched the environment world and depthimage to laserscan node without gmapping , i run RVIZ with odom frame , checked odom topic , viewed depth_scan topic , i moved the robot using teleop and there was no jumping also the depth_scan topic was working fines detecting walls and obstacles .

Asked by q8wwe on 2019-01-02 14:49:46 UTC

updated the question with videos .do i have to add fake laser or update parameters. until now I cant understand from where is the issue. why the robot keep jumping as you mentioned Billy it can be from odometry but how to debugged it .I'm new in ros appreciate any help .

Asked by q8wwe on 2019-01-02 17:02:24 UTC

The video helps me understand the issue. Thanks for posting that. For some reason I thought you were running real robot when gmapping.

Either plot or echo the odom topic to see if there are jumps in ODOM.

Make sure no other localization(AMCL) is running while gmapping. continued...

Asked by billy on 2019-01-02 17:43:27 UTC

Since the movement is smooth when RVIZ is in ODOM frame, I'm guessing no jumps in ODOM. Leaves another node is updating a TF that impacts position. Could be AMCL.. maybe a second TELOP node left running?

Confirm 'rosnode list' is as expected and nothing more than required for gmapping..

Asked by billy on 2019-01-02 17:47:41 UTC

after running gmapping and when start moving the robot echo odom topic show jumps . rosnode liast show the below list :- /depthimage_to_laserscan /gazebo /gazebo_gui /gmapping_node /robot_state_publisher /rosout /teleop_twist_keyboard /twist_marker_server

Asked by q8wwe on 2019-01-02 18:25:56 UTC

Can you run 'rostopic info /odom' and report back so we can see if two nodes are publishing to ODOM topic? I'm not 100% sure 'info' will tell us that but it may.

Asked by billy on 2019-01-02 20:37:31 UTC

$ rostopic info /odom

Type: nav_msgs/Odometry

Publishers: * /gazebo

Subscribers: None

Asked by q8wwe on 2019-01-02 21:39:18 UTC

~minimumScore (float, default: 0.0) Minimum score for considering the outcome of the scan matching good. Can avoid jumping pose estimates in large open spaces when using laser scanners with limited range (e.g. 5m). Scores go up to 600+, try 50 for example when experiencing jumping estimate issues.

Asked by billy on 2019-01-02 23:15:42 UTC

gmapping is doing localization itself so check proper parameter setup.

Asked by billy on 2019-01-02 23:16:39 UTC

tried to set minimumScore to 50 but same issue robot jump and change position , also i tried to play with parameters. I'm always getting the same error :Scan Matching Failed, using odometry. Likelihood=0

Asked by q8wwe on 2019-01-03 00:02:33 UTC

i updated the question with urdf file and all launch files i use. appreciate any help .

Asked by q8wwe on 2019-01-03 15:34:13 UTC

Can you upload to GitHub, Bitbucket, or some other site that's meant to share code? Dropbox makes you download these files to even view them. This is something that I don't do from unknown sources.

Asked by jayess on 2019-01-03 21:39:43 UTC

I uploaded the files on github.(question updated) .

Asked by q8wwe on 2019-01-03 23:00:45 UTC

still no good luck on making this work with gmapping even i can see the laser topic publish , is it problem in gmapping .

Asked by q8wwe on 2019-01-05 15:23:16 UTC

did u solve this problem ?

Asked by iimata on 2022-09-02 08:38:50 UTC

Answers