Zürcher Eliteeinheit / Mbed 2 deprecated ROME2_P6

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

TaskMoveToWaypoint Class Reference

TaskMoveToWaypoint Class Reference

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

#include <TaskMoveToWaypoint.h>

Inherits Task.

Public Member Functions

 TaskMoveToWaypoint (Controller &controller, float x, float y)
 Creates a task object that moves the robot to a given waypoint.
 TaskMoveToWaypoint (Controller &controller, float x, float y, float velocity)
 Creates a task object that moves the robot to a given waypoint.
virtual ~TaskMoveToWaypoint ()
 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 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 waypoint.

Definition at line 17 of file TaskMoveToWaypoint.h.


Constructor & Destructor Documentation

TaskMoveToWaypoint ( Controller controller,
float  x,
float  y 
)

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

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

Definition at line 22 of file TaskMoveToWaypoint.cpp.

TaskMoveToWaypoint ( Controller controller,
float  x,
float  y,
float  velocity 
)

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

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].
velocitythe maximum translational velocity, given in [m/s].

Definition at line 37 of file TaskMoveToWaypoint.cpp.

~TaskMoveToWaypoint (  ) [virtual]

Deletes the task object.

Definition at line 48 of file TaskMoveToWaypoint.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 TaskMoveToWaypoint.cpp.


Field Documentation

const float DEFAULT_VELOCITY = 0.2f [static]

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

Definition at line 21 of file TaskMoveToWaypoint.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.