# Revision history [back]

I spent some time digging into this. I upgraded to Gazebo 4.0.2, installed from source, so I could do some debugging on it. I did not track the problem down 100%, but here's what I learned:

When the husky model tilts even slightly, the AABB bounding boxes for the rays gets very tall. This causes the basic bounding box collisions between elements of the robot and the rays from the sensor. These are marked as potential collisions, and passed down to the dCollide() function, which resolves the collision function to the function for colliding a trimesh with a ray. I suspect that there is a bug in this function that is causing the false collisions.

For my own application, I merely patched the ODEMultiRayScan class so that it ignores collisions with elements that are part of the robot itself. Since these collisions are ignored, the potential collisions with other obstacles are seen correctly, so you get a full scan with collisions off of obstacles and the ground plane. I know this is a hack, but it's far simpler than trying to debug the mesh collision algorithms, and the simplifying assumption (lidar is known to not collide with the robot body) is sufficient for my application.

I spent some time digging into this. I upgraded to Gazebo 4.0.2, installed from source, so I could do some debugging on it. I did not track the problem down 100%, but here's what I learned:

When the husky model tilts even slightly, the AABB bounding boxes for the rays gets very tall. This causes ODE to see potential collisions because the basic bounding box collisions between boxes of elements of the robot and of the rays from the sensor. These are marked as sensor collide. The potential collisions, and collisions are passed down (ultimately) to the dCollide() function, which resolves the collision function to the function for colliding a trimesh with a ray. ray since the Husky body is made up of mesh objects. I suspect that there is a bug in this function the collision algorithm that is causing the false collisions.

For my own application, I merely patched the ODEMultiRayScan class so that it ignores collisions with elements that are part of the robot itself. Since these collisions are ignored, the potential collisions with other obstacles are seen correctly, so you get a full scan with collisions off of obstacles and the ground plane. I know this is a hack, but it's far simpler than trying to debug the mesh collision algorithms, and the simplifying assumption (lidar is known to not collide with the robot body) is sufficient for my application.