Skip to content

Expose lowest-level controls through public API #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jpreiss opened this issue Mar 9, 2017 · 3 comments
Closed

Expose lowest-level controls through public API #99

jpreiss opened this issue Mar 9, 2017 · 3 comments

Comments

@jpreiss
Copy link

jpreiss commented Mar 9, 2017

The DroneControlBase public API only allows control via higher-level commands like attitude+z, velocity vector, or following a waypoint path. Meanwhile, the true control inputs to a quadrotor are 4 motor voltages, or at a slightly higher level, angular velocity and thrust, aka acro/rate mode.

By offering only the higher-level interface, AirSim makes any autonomy-level control scheme dependent on the quality of the low-level controller that translates the high-level commands into the true system inputs. This could be a big problem for fast flight, where many of the simplifying assumptions in typical low-level controllers become invalid.

It would be great if the lowest-level inputs would be exposed, so users can take advantage of the physics simulation and graphics engine without depending on a particular controller implementation.

Btw, I am happy to work on this if you are accepting pull requests.

@sytelus
Copy link
Contributor

sytelus commented Mar 10, 2017

There are technical limitations on exposing very low level functionality through APIs because its difficult to make APIs work at more than 50Hz rate and also they are not real-time (i.e. there would be significant variance in timing between call to call). This is why APIs focus is on high level functionality. However, we are planning to implement RC interface for API which means you would be able to supply RC inputs to simulator via API at ~50Hz rate. We already have angle controls via API as you have mentioned. These two should deliver most functionality that people would need. If you need lower level control than that (for example, direct motor controls) then you should ideally write a controller (i.e. implement DroneControllerBase) so your code can run at rate as high as 500Hz in high priority thread.

@sytelus sytelus closed this as completed Apr 19, 2017
@jpreiss
Copy link
Author

jpreiss commented Oct 6, 2017

I am interested in this issue again. Now that simple_flight exists, it is my understanding that we have ability to single-step the main loops of both simulator and flight controller, i.e. we are never dependent on the real-life wall clock time. Therefore, we should no longer be sensitive to latency/bandwidth/jitter of the interprocess communication between API client and AirSim. Does this mean it is now viable to add lower level control options to the public API? Again, I am willing to do this work myself if it will be accepted into mainline.

@zbenic
Copy link

zbenic commented Jan 15, 2018

I am also very interested in getting the access to the low-level quad controls.
Would very much like to see @jpreiss latest question answered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants