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

asked 2018-12-31 11:46:24 -0500

q8wwe gravatar image

updated 2019-01-03 22:00:11 -0500

I'm truing to use Kinect camera with depthimage_to_laserscan 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 + depthimage_to_laserscan : https://www.youtube.com/watch?v=rkPgE...

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

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

my gmapping launch file, itried to remove all the parameter and kept scan_topic , base_frame 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 .

edit retag flag offensive close merge delete

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

billy gravatar image billy  ( 2018-12-31 19:06:29 -0500 )edit

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

q8wwe gravatar image q8wwe  ( 2019-01-01 13:23:53 -0500 )edit

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?

billy gravatar image billy  ( 2019-01-01 20:36:11 -0500 )edit

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 .

q8wwe gravatar image q8wwe  ( 2019-01-02 13:49:46 -0500 )edit

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 .

q8wwe gravatar image q8wwe  ( 2019-01-02 16:02:24 -0500 )edit

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...

billy gravatar image billy  ( 2019-01-02 16:43:27 -0500 )edit

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..

billy gravatar image billy  ( 2019-01-02 16:47:41 -0500 )edit

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

q8wwe gravatar image q8wwe  ( 2019-01-02 17:25:56 -0500 )edit