8000 FAQ · lindemer/baldr Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Samuel Tanner Lindemer edited this page Sep 13, 2017 · 2 revisions

What is control theory?

The fundamental topic you should familiarize yourself with in order to understand how baldr works is known as a feedback loop. Wikipedia can tell you all about it: https://en.wikipedia.org/?title=Control_theory. baldr simulates drone flight using a feedback loop. Basically, we start with an initial state (ie. the drone is at position (0, 0, 0) and at rest). We then give the state of the drone and a "reference" value (ie. a trajectory to follow) to a controller. The controller then determines what forces and torques the drone must apply in order to get the state to converge on the reference. It sends those commands back to the model and then we recalculate the state of the drone. That's it! It turns out that if you do this many times per second (the default in baldr is 100Hz), you get a very realistic simulation of flight.

How does baldr model physics?

baldr does all the physics modelling in /scripts/models.py. It may not look like much, but the mathematical models of a quadrotor drone are, in fact, very simple. When you run the simulation in Blender, Blender's physics engine plays no role in moving the drone. It's only used for rendering. Currently baldr has four different models for quadrotor drones, with increasing levels of realism. The linear model is the simplest, and only accurately models near-hover flight. The non-linear 3 model, on the other hand, models all the gyroscopic effects on the drone and is accurate even when upside-down. (None of the models, however, simulate evironmental disturbances such as wind or collisions with other objects. We're working on this.)

How does baldr track trajectories?

Trajectory tracking is done in /scripts/controllers.py. The content of this file will likely require a strong understanding of engineering math, however we will release a complete explanation of the derivation of all the controllers in the coming days for those who are interested.

How does baldr generate optimal trajectories?

We use an algorithm (which you'll find in /scripts/snap.py) described in this article http://groups.csail.mit.edu/rrg/papers/Richter_ISRR13.pdf to calculate what's known as a "minimum-snap trajectory". You may have heard of this from that awesome TED talk where three quadrotors play catch with a human: http://www.ted.com/talks/raffaello_d_andrea_the_astounding_athletic_power_of_quadcopters?language=en. This is a very clever numerical method for determining a feasible path through a set of waypoints. The term "minimum-snap" refers to the fact that the trajectory is optimized to reduce the fourth derivative on the x- and y-axes. This, in effect, minimizes the acrobatic manouvering required of the drone to hit all the waypoints.

How does baldr create a feedback loop?

A feedback loop is constructed using SciPy's integration tools. Why integration? Well, the physical models for many systems are most easily described as a system of differential equations. You'll find more information than you probably care to know on that topic in chapter 2 of this thesis: http://biblion.epfl.ch/EPFL/theses/2007/3727/EPFL_TH3727.pdf.

0