MIRA
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
RotateTask Class Referenceabstract

Task for rotate a certain angle in-place with a given velocity. More...

#include <navigation/tasks/RotateTask.h>

Inheritance diagram for RotateTask:
Inheritance graph
[legend]

Public Member Functions

 RotateTask (float angle=deg2rad(180.0f), float speed=deg2rad(30.0f))
 Creates a rotate task with given values. More...
 
template<typename Reflector >
void reflect (Reflector &r)
 The reflect method. More...
 
Class const & getClass () const
 

Static Public Member Functions

static PseudoClass const & CLASS ()
 

Public Attributes

float rotateAngle
 The requested rotation angle. More...
 
float rotateSpeed
 The requested rotational speed. More...
 

Protected Member Functions

virtual Class const & internalGetClass () const=0
 

Detailed Description

Task for rotate a certain angle in-place with a given velocity.

Constructor & Destructor Documentation

◆ RotateTask()

RotateTask ( float  angle = deg2rad(180.0f),
float  speed = deg2rad(30.0f) 
)
inline

Creates a rotate task with given values.

Parameters
[in]angleHow much shall the robot rotate, in [rad]
[in]speedHow fast shall the robot rotate, in [rad]

Angle can be positive or negative, it determines the direction of rotation. Speed must be positive.

Exceptions
XInvalidParameterif speed is negative

Examples:

// half-turn positive rotation (counter-clockwise), at 10°/s
RotateTask halfturn(deg2rad(180), deg2rad(10));
// 360° turn negative rotation (clockwise), at 20°/s
RotateTask fullturn(deg2rad(-360), deg2rad(20));
// same as above
RotateTask fullturn2(-2*M_PI, deg2rad(20));

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

The reflect method.

Member Data Documentation

◆ rotateAngle

float rotateAngle

The requested rotation angle.

◆ rotateSpeed

float rotateSpeed

The requested rotational speed.


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