tud-airlab / mppi-isaac

Model Predictive Path Integral Control using isaacgym for rollouts, gpu-accelerated
165 stars 19 forks source link

Add obstacles at runtime #6

Closed maxspahn closed 1 year ago

maxspahn commented 1 year ago

Obstacles should be passed at runtime to the motion planner. This must include passing primitive types, eg. cylinder, spheres, boxes but also meshes.

To go further than this, it would be ideal to pass entire occupancy grids or signed distance fields. That limits the ability to plan with interaction.

c-salmi commented 1 year ago

Running into an issue with the way isaacgym expect envs to be created:

image

It results in unexpected memory access error when trying to add obstacles to all envs at runtime :disappointed:

One work around could be to add a large number of obstacles to the scenes and store them out of sight until needed. But this won't work if the object type/shape/size/radius/mesh is not something you know beforehand.

maxspahn commented 1 year ago

That currently limits you in the way that you cannot add or remove obstacles at runtime, right?

c-salmi commented 1 year ago

Yes, I can only change the state of already added obstacles (actors).

maxspahn commented 1 year ago

What about we are adding some dummy obstacles far away from the robot at the beginning and change their position if needed? It seems like a bad workaround though

c-salmi commented 1 year ago

Yes this is what I'll do for now. Isaacgym luckily does allow you to change the scale of the actor at runtime, so I can change the radius of the spheres. So for only sphere obstacles it is fine, but not for meshes or geometries that aren't know beforehand. That would require restarting and reinitialisation of the 'rollout' simulator, which could be an option depending on how frequently it needs to be done.

c-salmi commented 1 year ago

This was merged in #9