# Revision history [back]

### husky SLAM demo produces bad map

When I run the Husky gmapping/SLAM demo, the resulting map is terrible. (Would upload picture but it seems I don't have enough points for it.) 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. 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


Has anyone else encountered and resolved this issue with Husky gmapping?

BTW, running ROS Melodic on Ubuntu 18.04.

### husky SLAM demo produces bad map

When I run the Husky gmapping/SLAM demo, the resulting map is terrible. (Would upload picture but it seems I don't have enough points for it.) 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. 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.

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?

BTW, running ROS Melodic on Ubuntu 18.04.

### husky SLAM demo produces bad map

When I run the Husky gmapping/SLAM demo, the resulting map is terrible. (Would upload picture but it seems I don't have enough points for it.) It's piecey, not completely filling in the clear space, and the vehicle immediately accrues a lot of drift in its pose estimation so 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.

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?

BTW, running ROS Melodic on Ubuntu 18.04.

### husky SLAM demo produces bad map

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.

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:

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.