-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrobotstate.h
44 lines (36 loc) · 1022 Bytes
/
robotstate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef ROBOTSTATE_H
#define ROBOTSTATE_H
#include <QObject>
#include "pose.h"
#include "allwheelstate.h"
#include "robotgeometry.h"
#include "Telecommand.pb.h"
enum DIRECTION_MASK
{
FORWARD = 1 << 0,
BACKWARD = 1 << 1,
RIGHT = 1 << 2,
LEFT = 1 << 3
};
Q_DECLARE_FLAGS(BASIC_TELEOP_CMDS, DIRECTION_MASK);
Q_DECLARE_OPERATORS_FOR_FLAGS(BASIC_TELEOP_CMDS);
class RobotState : public QObject
{
Q_OBJECT
public:
explicit RobotState(QObject *parent = 0);
~RobotState();
Pose *pose;
bool autonomous;
lunabotics::proto::SteeringModeType controlType;
AllWheelState *drivingMotors;
AllWheelState *steeringMotors;
RobotGeometry *geometry;
lunabotics::proto::SteeringModeType steeringMode;
lunabotics::proto::AllWheelControl::AllWheelControlType allWheelControlType;
lunabotics::proto::AllWheelControl::PredefinedControlType predefinedControlType;
QPointF ICR;
qreal ICRVelocity;
BASIC_TELEOP_CMDS drivingMask;
};
#endif // ROBOTSTATE_H