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.
TaskMoveTo.h
00001 /* 00002 * TaskMoveTo.h 00003 * Copyright (c) 2018, ZHAW 00004 * All rights reserved. 00005 */ 00006 00007 #ifndef TASK_MOVE_TO_H_ 00008 #define TASK_MOVE_TO_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 to a given pose. 00016 */ 00017 class TaskMoveTo : public Task { 00018 00019 public: 00020 00021 static const float DEFAULT_VELOCITY; /**< Default velocity value, given in [m/s]. */ 00022 static const float DEFAULT_ZONE; /**< Default zone value, given in [m]. */ 00023 00024 TaskMoveTo(Controller& controller, float x, float y, float alpha); 00025 TaskMoveTo(Controller& controller, float x, float y, float alpha, float velocity); 00026 TaskMoveTo(Controller& controller, float x, float y, float alpha, float velocity, float zone); 00027 virtual ~TaskMoveTo(); 00028 virtual int run(float period); 00029 00030 private: 00031 00032 static const float PI; 00033 static const float K1; 00034 static const float K2; 00035 static const float K3; 00036 00037 Controller& controller; // reference to the controller object to use 00038 float x; // x coordinate of target position, given in [m] 00039 float y; // y coordinate of target position, given in [m] 00040 float alpha; // target orientation, given in [rad] 00041 float velocity; // maximum translational velocity, given in [m/s] 00042 float zone; // zone threshold around target position, given in [m] 00043 }; 00044 00045 #endif /* TASK_MOVE_TO_H_ */ 00046
Generated on Wed Jul 27 2022 09:04:32 by
1.7.2