Nim leo niiiim

Committer:
Kiwicjam
Date:
Fri May 11 12:21:19 2018 +0000
Revision:
0:da791f233257
start of rome2 p5;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kiwicjam 0:da791f233257 1 /*
Kiwicjam 0:da791f233257 2 * TaskMove.h
Kiwicjam 0:da791f233257 3 * Copyright (c) 2018, ZHAW
Kiwicjam 0:da791f233257 4 * All rights reserved.
Kiwicjam 0:da791f233257 5 */
Kiwicjam 0:da791f233257 6
Kiwicjam 0:da791f233257 7 #ifndef TASK_MOVE_H_
Kiwicjam 0:da791f233257 8 #define TASK_MOVE_H_
Kiwicjam 0:da791f233257 9
Kiwicjam 0:da791f233257 10 #include <cstdlib>
Kiwicjam 0:da791f233257 11 #include "Controller.h"
Kiwicjam 0:da791f233257 12 #include "Task.h"
Kiwicjam 0:da791f233257 13
Kiwicjam 0:da791f233257 14 /**
Kiwicjam 0:da791f233257 15 * This is a specific implementation of a task class that moves the robot with given velocities.
Kiwicjam 0:da791f233257 16 */
Kiwicjam 0:da791f233257 17 class TaskMove : public Task {
Kiwicjam 0:da791f233257 18
Kiwicjam 0:da791f233257 19 public:
Kiwicjam 0:da791f233257 20
Kiwicjam 0:da791f233257 21 static const float DEFAULT_DURATION; /**< Default duration, given in [s]. */
Kiwicjam 0:da791f233257 22
Kiwicjam 0:da791f233257 23 TaskMove(Controller& controller, float translationalVelocity, float rotationalVelocity);
Kiwicjam 0:da791f233257 24 TaskMove(Controller& controller, float translationalVelocity, float rotationalVelocity, float duration);
Kiwicjam 0:da791f233257 25 virtual ~TaskMove();
Kiwicjam 0:da791f233257 26 virtual int run(float period);
Kiwicjam 0:da791f233257 27
Kiwicjam 0:da791f233257 28 private:
Kiwicjam 0:da791f233257 29
Kiwicjam 0:da791f233257 30 Controller& controller; // reference to controller object to use
Kiwicjam 0:da791f233257 31 float translationalVelocity; // translational velocity, given in [m/s]
Kiwicjam 0:da791f233257 32 float rotationalVelocity; // rotational velocity, given in [rad/s]
Kiwicjam 0:da791f233257 33 float duration; // duration to move the robot, given in [s]
Kiwicjam 0:da791f233257 34 float time; // current time, given in [s]
Kiwicjam 0:da791f233257 35 };
Kiwicjam 0:da791f233257 36
Kiwicjam 0:da791f233257 37 #endif /* TASK_MOVE_H_ */