ROME2 / Mbed 2 deprecated ROME2_P5

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

TaskMove Class Reference

This is a specific implementation of a task class that moves the robot with given velocities. More...

#include <TaskMove.h>

Inherits Task.

Public Member Functions

 TaskMove (Controller &controller, float translationalVelocity, float rotationalVelocity)
 Creates a task object that moves the robot with given velocities.
 TaskMove (Controller &controller, float translationalVelocity, float rotationalVelocity, float duration)
 Creates a task object that moves the robot with given velocities.
virtual ~TaskMove ()
 Deletes the task object.
virtual int run (float period)
 This method is called periodically by a task sequencer.

Static Public Attributes

static const float DEFAULT_DURATION = 3600.0f
 Default duration, given in [s].
static const int FAULT = -1
 Task return value.
static const int RUNNING = 0
 Task return value.
static const int DONE = 1
 Task return value.

Detailed Description

This is a specific implementation of a task class that moves the robot with given velocities.

Definition at line 17 of file TaskMove.h.


Constructor & Destructor Documentation

TaskMove ( Controller controller,
float  translationalVelocity,
float  rotationalVelocity 
)

Creates a task object that moves the robot with given velocities.

Parameters:
conrollera reference to the controller object of the robot.
translationalVelocitythe translational velocity, given in [m/s].
rotationalVelocitythe rotational velocity, given in [rad/s].

Definition at line 20 of file TaskMove.cpp.

TaskMove ( Controller controller,
float  translationalVelocity,
float  rotationalVelocity,
float  duration 
)

Creates a task object that moves the robot with given velocities.

Parameters:
conrollera reference to the controller object of the robot.
translationalVelocitythe translational velocity, given in [m/s].
rotationalVelocitythe rotational velocity, given in [rad/s].
durationthe duration to move the robot, given in [s].

Definition at line 36 of file TaskMove.cpp.

~TaskMove (  ) [virtual]

Deletes the task object.

Definition at line 48 of file TaskMove.cpp.


Member Function Documentation

int run ( float  period ) [virtual]

This method is called periodically by a task sequencer.

Parameters:
periodthe period of the task sequencer, given in [s].
Returns:
the status of this task, i.e. RUNNING or DONE.

Reimplemented from Task.

Definition at line 55 of file TaskMove.cpp.


Field Documentation

const float DEFAULT_DURATION = 3600.0f [static]

Default duration, given in [s].

Definition at line 21 of file TaskMove.h.

const int DONE = 1 [static, inherited]

Task return value.

Definition at line 22 of file Task.h.

const int FAULT = -1 [static, inherited]

Task return value.

Definition at line 20 of file Task.h.

const int RUNNING = 0 [static, inherited]

Task return value.

Definition at line 21 of file Task.h.