📄 robotaction.h
字号:
#ifndef ROBOT_ACTION_H#define ROBOT_ACTION_H#include <vector>#include "Action.h"#include "OdometryState.h"#define MAX_TVELOCITY 1000 // mm per sec#define MAX_RVELOCITY 360 // deg per secusing namespace std;class RobotAction : public Action{ private: OdometryState *odometry; public: RobotAction(bool useKalmanPoses=true); ~RobotAction(); /**************************** Motor ****************************/ // Sets both velocity at once void setVelocity(int tv, int rv); // Stops the motor void setMotorStop(void); // Turns the motor off void setMotorOn(void); // Turns the motor on void setMotorOff(void); // Resets the odometry counter void setPosReset(void); /**************************** RobotInfo ****************************/ double getPosX(void) {return odometry->getPosX();} double getPosZ(void) {return odometry->getPosZ();} double getPosTh(void) {return odometry->getPosTh();} struct timeval getPosTimestamp(void) {return odometry->getPosTimestamp();} double getTVelocity(void) {return odometry->getTVel();} double getRVelocity(void) {return odometry->getRVel();} double getBattery(void) {return odometry->getBatteryState();} int isLeftWheelStuck(void) {return 0;} int isRightWheelStuck(void) {return 0;} int getMaxRVelocity() {return MAX_RVELOCITY;} int getMaxTVelocity() {return MAX_TVELOCITY;}};#endif/********************************************************************* * (C) Copyright 2006 Albert Ludwigs University Freiburg * Institute of Computer Science * * All rights reserved. Use of this software is permitted for * non-commercial research purposes, and it may be copied only * for that use. All copies must include this copyright message. * This software is made available AS IS, and neither the authors * nor the Albert Ludwigs University Freiburg make any warranty * about the software or its performance. *********************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -