runInterface.h
Go to the documentation of this file.00001 #ifndef RUN_INTERFACE_H
00002 #define RUN_INTERFACE_H
00003
00013 #include "objCoordinateCtrl.h"
00014 #include "coordinateTypes.h"
00015
00016
00020 class RunInterface {
00021 public:
00022 virtual ~RunInterface(void) {}
00023
00027 virtual const char* what(void) = 0;
00028
00049 virtual int connect(const char* device, long baudrate) = 0;
00050
00081 virtual int connect(int argc, char *argv[]) = 0;
00082
00096 virtual void disconnect(void) = 0;
00097
00103 virtual void push_runState(void) = 0;
00104
00110 virtual void pop_runState(void) = 0;
00111
00121 virtual VXV::Position3D getLocalPosition(void) = 0;
00122
00147 virtual VXV::Position getRunPosition(const CoordinateCtrl* crd) = 0;
00148
00159 virtual void adjustRunPosition(const VXV::Position& position,
00160 const CoordinateCtrl* crd) = 0;
00161
00187 virtual void coordinateUpdateDetect(bool on) = 0;
00188
00208 virtual void servoCtrl(bool on) = 0;
00209
00228 virtual void stop(void) = 0;
00229
00249 virtual void followLine(const VXV::Position& position,
00250 const CoordinateCtrl* crd) = 0;
00251
00272 virtual void followCircle(const VXV::Grid& center, int radius,
00273 const CoordinateCtrl* crd) = 0;
00274
00296 virtual void followCircleOnTangent(const VXV::Position& position, int radius,
00297 const CoordinateCtrl* crd) = 0;
00298
00318 virtual void stopToLine(const VXV::Position& position,
00319 const CoordinateCtrl* crd) = 0;
00320
00340 virtual void rotateToDirection(const VXV::Direction& direction,
00341 const CoordinateCtrl* crd) = 0;
00342
00361 virtual void rotateAngle(const VXV::Direction& direction) = 0;
00362
00381 virtual void spin(const VXV::Direction& velocity) = 0;
00382
00406 virtual void lastMoveCommand(const CoordinateCtrl* crd) = 0;
00407
00408
00430 virtual bool isStable(void) = 0;
00431
00459 virtual int getLengthToGrid(const VXV::Grid& grid,
00460 const CoordinateCtrl* crd) = 0;
00461
00472 virtual int getLengthToBody(const VXV::Grid& grid,
00473 const CoordinateCtrl* crd) = 0;
00474
00501 virtual int getLengthToLine(const VXV::Position& line,
00502 const CoordinateCtrl* crd) = 0;
00503
00516 virtual VXV::Direction getAngleToDirection(const VXV::Direction& t,
00517 const CoordinateCtrl* crd) = 0;
00518
00530 virtual int getStraightVelDiff(int mm_vel) = 0;
00531
00543 virtual VXV::Direction getRotateVelDiff(const VXV::Direction& t) = 0;
00544
00562 virtual void setStraightRefVel(int mm_sec) = 0;
00563
00583 virtual void setStraightRefAcc(int mm_acc) = 0;
00584
00602 virtual void setRotateRefVel(const VXV::Direction& rotate_vel) = 0;
00603
00621 virtual void setRotateRefAcc(const VXV::Direction& rotate_acc) = 0;
00622
00641 virtual void setCurveRadius(int mm) = 0;
00642
00659 virtual int getCurveRadius(void) = 0;
00660
00681 virtual int getStraightVel(void) = 0;
00682
00703 virtual VXV::Direction getRotateVel(void) = 0;
00704 };
00705
00706 #endif
00707