Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of autonomousRobotAndroid by
MotionState Class Reference
This help class is for calculate and save the actual or desired value. There have the setter and the getter methode to change the value. More...
#include <MotionState.h>
Public Member Functions | |
| MotionState () | |
Creates a MotionState object. | |
| MotionState (float xposition, float yposition, float theta, float speed, float omega) | |
Creates a MotionState object with given values for position and speed. | |
| virtual | ~MotionState () |
| Destructor of the Object to destroy the Object. | |
| void | setState (float xposition, float yposition, float theta, float speed, float omega) |
| Sets the values for xPosition, yPostion and . | |
| void | setState (MotionState *motionState) |
| Sets the values for X-Position, Y-Postion and . | |
| void | setxPosition (float xposition) |
| Sets the X-position value. | |
| float | getxPosition () |
| Gets the X-position value. | |
| void | setyPosition (float yposition) |
| Sets the Y-position value. | |
| float | getyPosition () |
| Gets the Y-position value. | |
| void | setTheta (float theta) |
| Sets the value. | |
| float | getTheta () |
| Gets the value. | |
| void | setSpeed (float speed) |
| Sets the speed value. | |
| float | getSpeed () |
| Gets the speed value. | |
| void | setOmega (float omega) |
| Sets the value. | |
| float | getOmega () |
| Gets the value. | |
Data Fields | |
| float | xposition |
| The xposition value of this motion state. | |
| float | yposition |
| The yposition value of this motion state. | |
| float | theta |
| The of this motion state. | |
| float | speed |
| The speed value of this motion state. | |
| float | omega |
| The speed rotational value of this motion state. | |
Detailed Description
This help class is for calculate and save the actual or desired value. There have the setter and the getter methode to change the value.
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 25 of file MotionState.h.
Constructor & Destructor Documentation
| MotionState | ( | ) |
Creates a MotionState object.
The values for position and speed are set to 0.
Definition at line 5 of file MotionState.cpp.
| MotionState | ( | float | xposition, |
| float | yposition, | ||
| float | theta, | ||
| float | speed, | ||
| float | omega | ||
| ) |
Creates a MotionState object with given values for position and speed.
- Parameters:
-
xposition the initial position value of this motion state, given in [m] yposition the initial position value of this motion state, given in [m] theta the initial value of this motion state, given in [rad] speed the initial speed value of this motion state, given in [m/s] omega the initial speed value of this motion state, given in [rad/s]
Definition at line 15 of file MotionState.cpp.
| ~MotionState | ( | ) | [virtual] |
Destructor of the Object to destroy the Object.
Definition at line 28 of file MotionState.cpp.
Member Function Documentation
| float getOmega | ( | ) |
Gets the value.
- Returns:
- the value of this motion state, given in [rad/s]
Definition at line 100 of file MotionState.cpp.
| float getSpeed | ( | ) |
Gets the speed value.
- Returns:
- the speed value of this motion state, given in [m/s]
Definition at line 90 of file MotionState.cpp.
| float getTheta | ( | ) |
Gets the value.
- Returns:
- the value of this motion state, given in [rad]
Definition at line 80 of file MotionState.cpp.
| float getxPosition | ( | ) |
Gets the X-position value.
- Returns:
- the xposition value of this motion state, given in [m]
Definition at line 60 of file MotionState.cpp.
| float getyPosition | ( | ) |
Gets the Y-position value.
- Returns:
- the xposition value of this motion state, given in [m]
Definition at line 70 of file MotionState.cpp.
| void setOmega | ( | float | omega ) |
Sets the value.
- Parameters:
-
omega the desired value of this motion state, given in [rad/s]
Definition at line 95 of file MotionState.cpp.
| void setSpeed | ( | float | speed ) |
Sets the speed value.
- Parameters:
-
speed the desired speed value of this motion state, given in [m/s]
Definition at line 85 of file MotionState.cpp.
| void setState | ( | MotionState * | motionState ) |
Sets the values for X-Position, Y-Postion and .
- Parameters:
-
motionState another MotionStateobject to copy the state values from
Definition at line 46 of file MotionState.cpp.
| void setState | ( | float | xposition, |
| float | yposition, | ||
| float | theta, | ||
| float | speed, | ||
| float | omega | ||
| ) |
Sets the values for xPosition, yPostion and .
- Parameters:
-
xposition the initial position value of this motion state, given in [m] yposition the initial position value of this motion state, given in [m] theta the initial value of this motion state, given in [rad] speed the initial speed value of this motion state, given in [m/s] omega the initial speed value of this motion state, given in [rad/s]
Definition at line 33 of file MotionState.cpp.
| void setTheta | ( | float | theta ) |
Sets the value.
- Parameters:
-
theta the desired value of this motion state, given in [rad]
Definition at line 75 of file MotionState.cpp.
| void setxPosition | ( | float | xposition ) |
Sets the X-position value.
- Parameters:
-
xposition the desired xposition value of this motion state, given in [m]
Definition at line 55 of file MotionState.cpp.
| void setyPosition | ( | float | yposition ) |
Sets the Y-position value.
- Parameters:
-
yposition the desired yposition value of this motion state, given in [m]
Definition at line 65 of file MotionState.cpp.
Field Documentation
| float omega |
The speed rotational value of this motion state.
Definition at line 39 of file MotionState.h.
| float speed |
The speed value of this motion state.
Definition at line 37 of file MotionState.h.
| float theta |
The of this motion state.
Definition at line 35 of file MotionState.h.
| float xposition |
The xposition value of this motion state.
Definition at line 31 of file MotionState.h.
| float yposition |
The yposition value of this motion state.
Definition at line 33 of file MotionState.h.
Generated on Wed Jul 13 2022 04:37:19 by
1.7.2
