Zürcher Eliteeinheit / Mbed 2 deprecated ROME2_P4

Dependencies:   ROME2_P2 mbed

Fork of ROME2_P3 by Zürcher Eliteeinheit

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TaskMove.h Source File

TaskMove.h

00001 /*
00002  * TaskMove.h
00003  * Copyright (c) 2018, ZHAW
00004  * All rights reserved.
00005  */
00006 
00007 #ifndef TASK_MOVE_H_
00008 #define TASK_MOVE_H_
00009 
00010 #include <cstdlib>
00011 #include "Controller.h"
00012 #include "Task.h"
00013 
00014 /**
00015  * This is a specific implementation of a task class that moves the robot with given velocities.
00016  */
00017 class TaskMove : public Task {
00018     
00019     public:
00020         
00021         static const float  DEFAULT_DURATION;   /**< Default duration, given in [s]. */
00022         
00023                     TaskMove(Controller& controller, float translationalVelocity, float rotationalVelocity);
00024                     TaskMove(Controller& controller, float translationalVelocity, float rotationalVelocity, float duration);
00025         virtual     ~TaskMove();
00026         virtual int run(float period);
00027         
00028     private:
00029         
00030         Controller& controller;             // reference to controller object to use
00031         float       translationalVelocity;  // translational velocity, given in [m/s]
00032         float       rotationalVelocity;     // rotational velocity, given in [rad/s]
00033         float       duration;               // duration to move the robot, given in [s]
00034         float       time;                   // current time, given in [s]
00035 };
00036 
00037 #endif /* TASK_MOVE_H_ */
00038