Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
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
Generated on Thu Jul 14 2022 09:02:36 by
