Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# WalkAccelerationRestrictor Class Reference

Provides functionality for restriction changes in walk speed to maximum values. More...

`#include <WalkAccelerationRestrictor.h>`

Collaboration diagram for WalkAccelerationRestrictor:

[legend]
List of all members.

## Public Member Functions
| WalkAccelerationRestrictor (MotionRequest &motionRequest)
| Constructor.
void | restrictAccelerations (double maxTranslationXAcceleration, double maxTranslationYAcceleration, double maxRotationAcceleration)
| Smoothes a walk motion.
void | saveLastWalkParameters ()
| Saves the walk parameters of the last motion request.
## Protected Attributes
unsigned long | timeOfLastExecution
| The time when the skill was executed last, used by smoothWalk.
double | lastTranslationX
| x translation of the last motion request, used by smoothWalk
double | lastTranslationY
| y translation of the last motion request, used by smoothWalk
double | lastRotation
| rotation of the last motion request, used by smoothWalk
MotionRequest & | mr
| A reference to the motion request.

## Detailed Description

Provides functionality for restriction changes in walk speed to maximum values.

Author:
  Martin Lötzsch

Definition at line 21 of file WalkAccelerationRestrictor.h.

## Constructor & Destructor Documentation

WalkAccelerationRestrictor::WalkAccelerationRestrictor | ( | MotionRequest & | motionRequest | ) |

  | Constructor. Parameters:
  motionRequest | A reference to the motion request that shall be smoothed
Definition at line 12 of file WalkAccelerationRestrictor.cpp.

## Member Function Documentation

void WalkAccelerationRestrictor::restrictAccelerations | ( | double | maxTranslationXAcceleration,
|  | double | maxTranslationYAcceleration,
|  | double | maxRotationAcceleration
| ) |

  | Smoothes a walk motion. Changes in speed are clipped to a maximum acceleration. Execute that function at the end of the execution of a basic behavior. Parameters:
  maxTranslationXAcceleration | maximum x translation acceleration (in mm/s^2)
  maxTranslationYAcceleration | maximum y translation acceleration (in mm/s^2)
  maxRotationAcceleration | maximum rotation acceleration (in Deg/s^2)
Definition at line 33 of file WalkAccelerationRestrictor.cpp. References fromDegrees(), SystemCall::getCurrentSystemTime(), lastRotation, lastTranslationX, lastTranslationY, mr, Pose2D::rotation, timeOfLastExecution, Pose2D::translation, WalkRequest::walkParams, MotionRequest::walkRequest, Vector2< double >::x, and Vector2< double >::y. Referenced by GT2005BasicBehaviorGoToPoint::execute(), GT2005BasicBehaviorGoForwardToPoint::execute(), GT2005BasicBehaviorGoalieReturnToGoal::execute(), and GT2005BasicBehaviorGoaliePositionReturn::execute().

Here is the call graph for this function:

void WalkAccelerationRestrictor::saveLastWalkParameters | ( |  | ) |

| Saves the walk parameters of the last motion request. Should be used at the start of the execution of a skill. Definition at line 17 of file WalkAccelerationRestrictor.cpp. References lastRotation, lastTranslationX, lastTranslationY, MotionRequest::motionType, mr, Pose2D::rotation, Pose2D::translation, WalkRequest::walkParams, MotionRequest::walkRequest, Vector2< double >::x, and Vector2< double >::y. Referenced by GT2005BasicBehaviorGoToRelativePoint::execute(), GT2005BasicBehaviorGoToPoint::execute(), GT2005BasicBehaviorGoForwardToPoint::execute(), GT2005BasicBehaviorGoalieReturnToGoal::execute(), and GT2005BasicBehaviorGoaliePositionReturn::execute().

## Member Data Documentation

unsigned long WalkAccelerationRestrictor::timeOfLastExecution`[protected]`

| The time when the skill was executed last, used by smoothWalk. Definition at line 49 of file WalkAccelerationRestrictor.h. Referenced by restrictAccelerations().

double WalkAccelerationRestrictor::lastTranslationX`[protected]`

| x translation of the last motion request, used by smoothWalk Definition at line 52 of file WalkAccelerationRestrictor.h. Referenced by restrictAccelerations(), and saveLastWalkParameters().

double WalkAccelerationRestrictor::lastTranslationY`[protected]`

| y translation of the last motion request, used by smoothWalk Definition at line 55 of file WalkAccelerationRestrictor.h. Referenced by restrictAccelerations(), and saveLastWalkParameters().

double WalkAccelerationRestrictor::lastRotation`[protected]`

| rotation of the last motion request, used by smoothWalk Definition at line 58 of file WalkAccelerationRestrictor.h. Referenced by restrictAccelerations(), and saveLastWalkParameters().

MotionRequest& WalkAccelerationRestrictor::mr`[protected]`

| A reference to the motion request. Definition at line 61 of file WalkAccelerationRestrictor.h. Referenced by restrictAccelerations(), and saveLastWalkParameters().

The documentation for this class was generated from the following files:

- Tools/Actorics/WalkAccelerationRestrictor.h
- Tools/Actorics/WalkAccelerationRestrictor.cpp