Open duburcqa opened 2 years ago
It would also be nice to use pre-allocated distance / collision functors as described here
Ground profile height map can now be converted into heightmap in C++ core. There is both a slowdown and a accuracy loss of doing so but it is the price to pay. The current implementation generate a regular heightmap first for some prescribed x and y grid unit, then eventually it is decimated afterward. Decimation has no effect on accuracy but conversion to regular map has.
I suggest modifying the existing GroundProfile
engine option, which is for now working on symbolic heightmap functions, to rather operate on hppfcl::collisionObject
instances directly. This way, the slowdown and accuracy loss would not be a simulation concern but rather a user concern. Generation could be done only once, at first instantiation of the environment rather than every reset.
Proper support of heigthmap has been added to hpp-fcl. It should be used in place of the current implementation of collision detection. It would be more generic than the current implementation, and hopefully still efficient. However, it requires discretizing the ground profile, which is not necessary for now. It would also prevent relying on a hack to render the ground.