TeamSurface / Mbed 2 deprecated ROME_P3

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

TaskMoveTo Class Reference

TaskMoveTo Class Reference

This is a specific implementation of a task class that moves the robot to a given pose. More...

#include <TaskMoveTo.h>

Inherits Task.

Public Member Functions

 TaskMoveTo (Controller &controller, float x, float y, float alpha)
 Creates a task object that moves the robot to a given pose.
 TaskMoveTo (Controller &controller, float x, float y, float alpha, float velocity)
 Creates a task object that moves the robot to a given pose.
 TaskMoveTo (Controller &controller, float x, float y, float alpha, float velocity, float zone)
 Creates a task object that moves the robot to a given pose.
virtual ~TaskMoveTo ()
 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_VELOCITY = 0.2f
 Default velocity value, given in [m/s].
static const float DEFAULT_ZONE = 0.1f
 Default zone value, given in [m].
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 to a given pose.

Definition at line 17 of file TaskMoveTo.h.


Constructor & Destructor Documentation

TaskMoveTo ( Controller controller,
float  x,
float  y,
float  alpha 
)

Creates a task object that moves the robot to a given pose.

Parameters:
conrollera reference to the controller object of the robot.
xthe x coordinate of the target position, given in [m].
ythe y coordinate of the target position, given in [m].
alphathe target orientation, given in [rad].

Definition at line 26 of file TaskMoveTo.cpp.

TaskMoveTo ( Controller controller,
float  x,
float  y,
float  alpha,
float  velocity 
)

Creates a task object that moves the robot to a given pose.

Parameters:
conrollera reference to the controller object of the robot.
xthe x coordinate of the target position, given in [m].
ythe y coordinate of the target position, given in [m].
alphathe target orientation, given in [rad].
velocitythe maximum translational velocity, given in [m/s].

Definition at line 44 of file TaskMoveTo.cpp.

TaskMoveTo ( Controller controller,
float  x,
float  y,
float  alpha,
float  velocity,
float  zone 
)

Creates a task object that moves the robot to a given pose.

Parameters:
conrollera reference to the controller object of the robot.
xthe x coordinate of the target position, given in [m].
ythe y coordinate of the target position, given in [m].
alphathe target orientation, given in [rad].
velocitythe maximum translational velocity, given in [m/s].
zonethe zone threshold around the target position, given in [m].

Definition at line 63 of file TaskMoveTo.cpp.

~TaskMoveTo (  ) [virtual]

Deletes the task object.

Definition at line 76 of file TaskMoveTo.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 83 of file TaskMoveTo.cpp.


Field Documentation

const float DEFAULT_VELOCITY = 0.2f [static]

Default velocity value, given in [m/s].

Definition at line 21 of file TaskMoveTo.h.

const float DEFAULT_ZONE = 0.1f [static]

Default zone value, given in [m].

Definition at line 22 of file TaskMoveTo.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.