microsoft / AirSim

Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
https://microsoft.github.io/AirSim/
Other
16.5k stars 4.6k forks source link

How to 'kill' a drone programatically #3089

Open mhl787156 opened 4 years ago

mhl787156 commented 4 years ago

Hi again!

I'm working on building a reliability and redundancy test platform for multi-uav systems. As part of this I need to simulate failures. Whilst I could get complicated, currently I just want something to get a particular drone to drop out the sky.

Is there a particular function I could use which could interrupt everything and get the drone to fall?

Is this something I'd have to modify AirLib, or would I be able to hack together something from the python client lib/ros

I checked the old issues, and I dont think this has come up before, except possibly in the context of either physical collisions or incorporating wind.

Many Thanks!

rajat2004 commented 4 years ago

Hmm, interesting Drone falling out of the sky could essentially be all the motors stopping, could try using movebymotorPWMs and set everything to 0

mhl787156 commented 4 years ago

Okay yeah, I'll give that a go,

Just to check, I'm currently using airsim_ros_wrapper + ros however I want some of the functionality offered by the python client. It's a bit of a hack, but I have basically wrapped the python client in a rosnode exposing a few services for things like get_object_pose.

Is this safe to use at the same time as the airsim_ros_wrapper? I dont know how the server treats multiple connections is all! So far it seems to work okay.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity from the community in the last year. It will be closed if no further activity occurs within 20 days.