duburcqa / jiminy

Jiminy: a fast and portable Python/C++ simulator of poly-articulated robots with OpenAI Gym interface for reinforcement learning
https://duburcqa.github.io/jiminy
MIT License
228 stars 26 forks source link

[core] Take advantage of newly introduced `HeightField` in hppfcl #489

Open duburcqa opened 2 years ago

duburcqa commented 2 years ago

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.

duburcqa commented 1 year ago

It would also be nice to use pre-allocated distance / collision functors as described here

duburcqa commented 9 months ago

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.

duburcqa commented 9 months ago

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.