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

Dependencies:   mbed

Fork of autonomous Robot Android by Christian Burri

Committer:
chrigelburri
Date:
Fri Apr 05 10:58:42 2013 +0000
Revision:
11:775ebb69d5e1
Parent:
6:48eeb41188dd
Child:
12:235e318a414f
doku soweit gut ohne android

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chrigelburri 0:31f7be68e52d 1 #ifndef _MOTION_STATE_H_
chrigelburri 0:31f7be68e52d 2 #define _MOTION_STATE_H_
chrigelburri 0:31f7be68e52d 3
chrigelburri 0:31f7be68e52d 4 #include "defines.h"
chrigelburri 0:31f7be68e52d 5
chrigelburri 0:31f7be68e52d 6 /**
chrigelburri 0:31f7be68e52d 7 * @author Christian Burri
chrigelburri 0:31f7be68e52d 8 *
chrigelburri 11:775ebb69d5e1 9 * @copyright Copyright © 2013 HSLU Pren Team #1 Cruising Crêpe
chrigelburri 0:31f7be68e52d 10 * All rights reserved.
chrigelburri 0:31f7be68e52d 11 *
chrigelburri 11:775ebb69d5e1 12 * @brief
chrigelburri 0:31f7be68e52d 13 *
chrigelburri 3:92ba0254af87 14 * This help class is for calculate and save the actual or desired value.
chrigelburri 3:92ba0254af87 15 * There have the setter and the getter methode to change the value
chrigelburri 0:31f7be68e52d 16 *
chrigelburri 0:31f7be68e52d 17 */
chrigelburri 0:31f7be68e52d 18 class MotionState
chrigelburri 0:31f7be68e52d 19 {
chrigelburri 0:31f7be68e52d 20
chrigelburri 0:31f7be68e52d 21 public:
chrigelburri 0:31f7be68e52d 22
chrigelburri 11:775ebb69d5e1 23 /** @brief The xposition value of this motion state. */
chrigelburri 0:31f7be68e52d 24 float xposition;
chrigelburri 11:775ebb69d5e1 25 /** @brief The yposition value of this motion state. */
chrigelburri 0:31f7be68e52d 26 float yposition;
chrigelburri 11:775ebb69d5e1 27 /** @brief The θ of this motion state. */
chrigelburri 0:31f7be68e52d 28 float theta;
chrigelburri 11:775ebb69d5e1 29 /** @brief The speed value of this motion state. */
chrigelburri 0:31f7be68e52d 30 float speed;
chrigelburri 11:775ebb69d5e1 31 /** @brief The speed rotational value of this motion state. */
chrigelburri 0:31f7be68e52d 32 float omega;
chrigelburri 0:31f7be68e52d 33
chrigelburri 0:31f7be68e52d 34 /**
chrigelburri 11:775ebb69d5e1 35 * @brief Creates a <code>MotionState</code> object.
chrigelburri 0:31f7be68e52d 36 * The values for position and speed are set to 0.
chrigelburri 0:31f7be68e52d 37 */
chrigelburri 0:31f7be68e52d 38 MotionState();
chrigelburri 0:31f7be68e52d 39
chrigelburri 0:31f7be68e52d 40 /**
chrigelburri 11:775ebb69d5e1 41 * @brief Creates a <code>MotionState</code> object with given values for position and speed.
chrigelburri 6:48eeb41188dd 42 * @param xposition the initial position value of this motion state, given in [m]
chrigelburri 6:48eeb41188dd 43 * @param yposition the initial position value of this motion state, given in [m]
chrigelburri 6:48eeb41188dd 44 * @param theta the initial &theta; value of this motion state, given in [rad]
chrigelburri 6:48eeb41188dd 45 * @param speed the initial speed value of this motion state, given in [m/s]
chrigelburri 6:48eeb41188dd 46 * @param omega the initial &omega; speed value of this motion state, given in [rad/s]
chrigelburri 6:48eeb41188dd 47 */
chrigelburri 6:48eeb41188dd 48 MotionState(float xposition,
chrigelburri 6:48eeb41188dd 49 float yposition,
chrigelburri 6:48eeb41188dd 50 float theta,
chrigelburri 6:48eeb41188dd 51 float speed,
chrigelburri 6:48eeb41188dd 52 float omega);
chrigelburri 0:31f7be68e52d 53
chrigelburri 0:31f7be68e52d 54 /**
chrigelburri 11:775ebb69d5e1 55 * @brief Destructor of the Object to destroy the Object.
chrigelburri 6:48eeb41188dd 56 **/
chrigelburri 0:31f7be68e52d 57 virtual ~MotionState();
chrigelburri 0:31f7be68e52d 58
chrigelburri 0:31f7be68e52d 59 /**
chrigelburri 11:775ebb69d5e1 60 * @brief Sets the values for xPosition, yPostion and &theta;.
chrigelburri 6:48eeb41188dd 61 * @param xposition the initial position value of this motion state, given in [m]
chrigelburri 6:48eeb41188dd 62 * @param yposition the initial position value of this motion state, given in [m]
chrigelburri 6:48eeb41188dd 63 * @param theta the initial &theta; value of this motion state, given in [rad]
chrigelburri 6:48eeb41188dd 64 * @param speed the initial speed value of this motion state, given in [m/s]
chrigelburri 6:48eeb41188dd 65 * @param omega the initial &omega; speed value of this motion state, given in [rad/s]
chrigelburri 6:48eeb41188dd 66 */
chrigelburri 6:48eeb41188dd 67 void setState(float xposition,
chrigelburri 6:48eeb41188dd 68 float yposition,
chrigelburri 6:48eeb41188dd 69 float theta,
chrigelburri 6:48eeb41188dd 70 float speed,
chrigelburri 6:48eeb41188dd 71 float omega);
chrigelburri 0:31f7be68e52d 72
chrigelburri 0:31f7be68e52d 73 /**
chrigelburri 11:775ebb69d5e1 74 * @brief Sets the values for X-Position, Y-Postion and &theta;.
chrigelburri 6:48eeb41188dd 75 * @param motionState another <code>MotionState</code> object to copy the state values from
chrigelburri 6:48eeb41188dd 76 */
chrigelburri 0:31f7be68e52d 77 void setState(MotionState* motionState);
chrigelburri 0:31f7be68e52d 78
chrigelburri 0:31f7be68e52d 79 /**
chrigelburri 11:775ebb69d5e1 80 * @brief Sets the X-position value.
chrigelburri 6:48eeb41188dd 81 * @param xposition the desired xposition value of this motion state, given in [m]
chrigelburri 6:48eeb41188dd 82 */
chrigelburri 1:6cd533a712c6 83 void setxPosition(float xposition);
chrigelburri 0:31f7be68e52d 84
chrigelburri 0:31f7be68e52d 85 /**
chrigelburri 11:775ebb69d5e1 86 * @brief Gets the X-position value.
chrigelburri 6:48eeb41188dd 87 * @return the xposition value of this motion state, given in [m]
chrigelburri 6:48eeb41188dd 88 */
chrigelburri 0:31f7be68e52d 89 float getxPosition();
chrigelburri 0:31f7be68e52d 90
chrigelburri 0:31f7be68e52d 91 /**
chrigelburri 11:775ebb69d5e1 92 * @brief Sets the Y-position value.
chrigelburri 6:48eeb41188dd 93 * @param yposition the desired yposition value of this motion state, given in [m]
chrigelburri 6:48eeb41188dd 94 */
chrigelburri 0:31f7be68e52d 95 void setyPosition(float yposition);
chrigelburri 0:31f7be68e52d 96
chrigelburri 0:31f7be68e52d 97 /**
chrigelburri 11:775ebb69d5e1 98 * @brief Gets the Y-position value.
chrigelburri 6:48eeb41188dd 99 * @return the xposition value of this motion state, given in [m]
chrigelburri 6:48eeb41188dd 100 */
chrigelburri 0:31f7be68e52d 101 float getyPosition();
chrigelburri 0:31f7be68e52d 102
chrigelburri 0:31f7be68e52d 103 /**
chrigelburri 11:775ebb69d5e1 104 * @brief Sets the &theta; value.
chrigelburri 6:48eeb41188dd 105 * @param theta the desired &theta; value of this motion state, given in [rad]
chrigelburri 6:48eeb41188dd 106 */
chrigelburri 0:31f7be68e52d 107 void setTheta(float theta);
chrigelburri 0:31f7be68e52d 108
chrigelburri 0:31f7be68e52d 109 /**
chrigelburri 11:775ebb69d5e1 110 * @brief Gets the &theta; value.
chrigelburri 6:48eeb41188dd 111 * @return the &theta; value of this motion state, given in [rad]
chrigelburri 6:48eeb41188dd 112 */
chrigelburri 0:31f7be68e52d 113 float getTheta();
chrigelburri 0:31f7be68e52d 114
chrigelburri 0:31f7be68e52d 115 /**
chrigelburri 11:775ebb69d5e1 116 * @brief Sets the speed value.
chrigelburri 6:48eeb41188dd 117 * @param speed the desired speed value of this motion state, given in [m/s]
chrigelburri 6:48eeb41188dd 118 */
chrigelburri 0:31f7be68e52d 119 void setSpeed(float speed);
chrigelburri 0:31f7be68e52d 120
chrigelburri 0:31f7be68e52d 121 /**
chrigelburri 11:775ebb69d5e1 122 * @brief Gets the speed value.
chrigelburri 6:48eeb41188dd 123 * @return the speed value of this motion state, given in [m/s]
chrigelburri 6:48eeb41188dd 124 */
chrigelburri 0:31f7be68e52d 125 float getSpeed();
chrigelburri 0:31f7be68e52d 126
chrigelburri 0:31f7be68e52d 127 /**
chrigelburri 11:775ebb69d5e1 128 * @brief Sets the &omega; value.
chrigelburri 6:48eeb41188dd 129 * @param omega the desired &omega; value of this motion state, given in [rad/s]
chrigelburri 6:48eeb41188dd 130 */
chrigelburri 0:31f7be68e52d 131 void setOmega(float omega);
chrigelburri 0:31f7be68e52d 132
chrigelburri 0:31f7be68e52d 133 /**
chrigelburri 11:775ebb69d5e1 134 * @brief Gets the &omega; value.
chrigelburri 6:48eeb41188dd 135 * @return the &omega; value of this motion state, given in [rad/s]
chrigelburri 6:48eeb41188dd 136 */
chrigelburri 0:31f7be68e52d 137 float getOmega();
chrigelburri 0:31f7be68e52d 138
chrigelburri 0:31f7be68e52d 139 };
chrigelburri 0:31f7be68e52d 140
chrigelburri 0:31f7be68e52d 141 #endif