This program is for an autonomous robot for the competition at the Hochschule Luzern. http://cruisingcrepe.wordpress.com/ We are one of the 32 teams. http://cruisingcrepe.wordpress.com/ The postition control is based on this Documentation: Control of Wheeled Mobile Robots: An Experimental Overview from Alessandro De Luca, Giuseppe Oriolo, Marilena Vendittelli. For more information see here: http://www.dis.uniroma1.it/~labrob/pub/papers/Ramsete01.pdf
Fork of autonomous Robot Android by
State Class Reference
State is the main mechanism for communicating current realtime system state to the rest of the system for logging etc. More...
#include <State.h>
Inherits Task.
Public Member Functions | |
State (state_t *s, RobotControl *robotControl, MaxonESCON *motorControllerLeft, MaxonESCON *motorControllerRight, PinName batteryPin, float period) | |
Creates a robot control object and initializes all private state variables. | |
virtual | ~State () |
Destructor of the Object to destroy the Object. | |
void | initPlotFile (void) |
Initzialize the File. | |
void | closePlotFile (void) |
Close the File. | |
float | readBattery () |
Return the Battery voltage state variables. | |
void | startTimerFromZero () |
Starts the timer from zero. | |
void | savePlotFile (state_t s) |
Save the new state to a new line. | |
float | dim (int idx, float f) |
Returns the transform a sinusvalue from -1.0 . | |
void | run () |
Run method actualize every period. | |
float | getPeriod () |
Gets the period of this task. | |
void | start () |
Starts this task. | |
void | stop () |
Stops this task. |
Detailed Description
State is the main mechanism for communicating current realtime system state to the rest of the system for logging etc.
Copyright (c) 2013 HSLU Pren Team #1 Cruising Crêpe All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition at line 29 of file State.h.
Constructor & Destructor Documentation
State | ( | state_t * | s, |
RobotControl * | robotControl, | ||
MaxonESCON * | motorControllerLeft, | ||
MaxonESCON * | motorControllerRight, | ||
PinName | batteryPin, | ||
float | period | ||
) |
Creates a robot control object and initializes all private state variables.
- Parameters:
-
s struct to read and write the state robotControl Object to read the state motorControllerLeft a reference to the servo drive for the left motor motorControllerRight a reference to the servo drive for the right motor batteryPin mbed pin for analog Input Battery Voltage period the sampling period of the run loop of this controller, given in [s]
~State | ( | ) | [virtual] |
Member Function Documentation
float dim | ( | int | idx, |
float | f | ||
) |
float getPeriod | ( | ) | [inherited] |
void initPlotFile | ( | void | ) |
float readBattery | ( | ) |
void run | ( | ) | [virtual] |
void savePlotFile | ( | state_t | s ) |
void startTimerFromZero | ( | ) |
Generated on Tue Jul 12 2022 14:15:59 by 1.7.2