husky SLAM demo produces bad map

asked 2019-03-07 20:07:00 -0500

kitkatme gravatar image

updated 2019-03-08 09:49:25 -0500

When I run the Husky gmapping/SLAM demo, the resulting map is terrible. It's piecey, not completely filling in the clear space, and the vehicle immediately accrues a lot of drift in its pose estimation. So the map looks totally haywire, as you can see below. Note the map alignment error too: in the upper left hand/middle corner you can see the scan of the circles, which have been mapped in the lower right.

husky_map

The only hint I have to go off of is maybe it's related to this error I get when gazebo loads (which I get for all 4 wheels):

[ERROR] [1552009842.749406803, 1298.710000000]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/front_left_wheel

However, when I publish commands to cmd_vel and watch how the scans align, they look fine, so it doesn't really seem like odometry is the problem. Has anyone else encountered and resolved this issue with Husky gmapping?

Edit: Ran the gmapping demo and drove the husky into a wall and it does not seem to recognize that it is no longer moving, since it keeps mapping the wall in a new place:

husky_wall

So it seems like the error mentioned above really could be the problem. I'm fairly new to ROS and I've been trying to figure out where to specify the p gain, but it's not clear. Anyone else know how to specify it?

BTW, running ROS Melodic on Ubuntu 18.04.

edit retag flag offensive close merge delete

Comments

I've bumped your karma, so you should be able to upload images now.

ahendrix gravatar image ahendrix  ( 2019-03-07 22:18:36 -0500 )edit

thanks!! uploaded the image

kitkatme gravatar image kitkatme  ( 2019-03-08 09:10:51 -0500 )edit

It works perfectly with ROS kinetic, but I have the same problem with ROS melodic packages, the map is a big mess. Did you ever solve this? any updates?

Jasmin gravatar image Jasmin  ( 2019-07-23 05:57:49 -0500 )edit

I am facing the same problem, this occurs when I use gazebo_ros_control plugin, when I use differential_drive_controller instead, the map is created correctly but the robot is not stable, you can check my problem and images (in comment) here: https://answers.ros.org/question/3286...

And please let me know if you have found a solution by using the plugin gazebo_ros_control plugin.

Thanks.

Youssef_Lah gravatar image Youssef_Lah  ( 2019-07-24 17:03:03 -0500 )edit

Thank you for your feedback @Youssef_Lah , I was doubting the gazebo_ros_control plugin as well because I encountered the same problem with my custom robot and I'm using the same plugin in its control. I will keep you updated if I understand what's going on with it.

Jasmin gravatar image Jasmin  ( 2019-07-25 15:56:40 -0500 )edit