uzh-rpg / flightmare

An Open Flexible Quadrotor Simulator
https://uzh-rpg.github.io/flightmare/
Other
992 stars 344 forks source link

Detect collision between drones during Reinforcement Learning #40

Closed parthkhopkar closed 3 years ago

parthkhopkar commented 3 years ago

Hello I am trying to train a controller using flightrl for multiple drones by setting n_envs = x in the configuration for getting x drones. I was wondering if there is a way for the RL environment to be able to detect collisions between these drones since right now they can all overlap each other.
Is there some place in the code I can make this change so that the episode can terminate when there is a collision between 2 drones?

Thank you

yun-long commented 3 years ago

Hi, by setting n_envs = x, our simulator creates x quadrotor and simulates all of them in parallel. It is possible to detect collisions if you simulate them in Unity and use the collisions detection provided by Unity. However, it makes training super slow. On the other hand, without Unity there is no collision detection.