Spherical coordinates in a .world are not taken into account when using a heightmap.
I’m currently trying to implement a heightmap in Gazebo to have realistic collisions for my drone. However, the drone does not spawn where it should.
Above is the situation without the heightmap, the drone in in the middle of the bridge. Below, this is what happen when the heightmap is loaded in Gazebo. The bridge is the red dot on the right. The center of the heightmap is where Gazebo have its origin and also where the drone is.
I’ve tried to correct this by modifying the drone position relatively to the world. It’s better but the position is not exact (see below)
To achieve that, I’ve extracted the center coordinates from the geotiff file used to generate the heightmap and after a re-projection (WGS84 to a local North-East-Up Cartesian axis used in Gazebo I think ?) I calculate the distance in the x-axis and y-axis. For this I use a python code translated to python from this and based on this paper.
The issue lies in these steps however I have no idea how to proceed to have something differently.
I’ve tried to change the spherical coordinates of my world file. However it seems that it does not works with a heightmap, the spherical coordinates are ignored.
I’ve also tried to move the map instead of the drone. However, there is an old bug in Gazebo that create an offset between the visual and the collision model. I tried to get rid of it, without success.
Do you have any idea for me ? I’ll be glad to test them and also add any details needed to understand my issue.
Thanks !
Asked by AW on 2023-06-26 09:54:35 UTC
Comments