SAMPLES


CDRONE : A entity to control a rigid body with PID controlers


Experiment PID Regulator for physic simulation (see CDRONE.H & CDRONE.CPP)

A proportional–integral–derivative controller (PID controller) is a generic control loop feedback mechanism (controller)

widely used in industrial control systems – a PID is the most commonly used feedback controller. A PID controller calculates an "error" value as the difference between a measured process variable and a desired setpoint. The controller attempts to minimize the error by adjusting the process control inputs.

This machine is flying with 4 rotors and some gyroscope, accelerometers, altitude sensor  etc.. . The main goal is to have a good stable flying machine, just  by controlling the trust of  4  motors... not so simple in real world.

 

 

Here, the coding is pretty simple for a very good result, cause :

    - it just use a physic rigid body (box) with forces applied ( controlled via pid regulators. ) on each upper corner to simulate the thrust of each rotor.

    - there are less parameters than in real world (no wind, linear response of electric motors, precision of sensor, etc...)

    - it use a virtual hidden force to simulate combined torque of the 4 motor to control rotation on y axis. On the real machine it's a bit more complex to control this.

 

 


CEXPLORER : A capsule character controler for FPV exploration of a level


CEXPLORER.H & CEXPLORER.CPP

 


CBOX : A simple Box Rigid Body


CBOX.H & CBOX.CPP