From 928dc853e088849580aac368401999ea596644bb Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sat, 8 Oct 2011 11:56:10 +0200 Subject: digital/avr/modules/motor: add motor control system --- .../motor/control_system/control_system.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 digital/avr/modules/motor/control_system/control_system.txt (limited to 'digital/avr/modules/motor/control_system/control_system.txt') diff --git a/digital/avr/modules/motor/control_system/control_system.txt b/digital/avr/modules/motor/control_system/control_system.txt new file mode 100644 index 00000000..e45db230 --- /dev/null +++ b/digital/avr/modules/motor/control_system/control_system.txt @@ -0,0 +1,33 @@ +============================= + motor/control_system module +============================= +:Author: Nicolas Schodet + +Introduction +============ + +This module will bind together several layers of motor control modules. It +aims at helping sequencing them in the right order to meets real time +constrains and state changes sequence required order. + +Usage +===== + +You should use one of `control_system_single_t` for a single motor system, or +`control_system_polar_t` for a dual motor differential robot configuration. +The encoder and output structures should be initialised and their pointers be +set before the `control_system_*_init` is called. + +The `control_system_*_update_prepare` function should be called right before +you wait for the next cycle, but after you made changes to consigns. Once the +next cycle start, as fast as possible, you should first update encoders, then +call the `control_system_*_update` function, and finally update outputs. + +This is important that consigns (and control state) are not changed between +update preparation and update, because the update function is also responsible +to reset some internal variables when state is changed. + +API +=== + +.. include:: control_system.exd -- cgit v1.2.3