-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathallwheelform.h
90 lines (68 loc) · 2.23 KB
/
allwheelform.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef ALLWHEELFORM_H
#define ALLWHEELFORM_H
#include <QWidget>
#include <QGraphicsScene>
#include <QGraphicsRectItem>
#include <QGraphicsItemGroup>
#include <QStandardItem>
#include "Telecommand.pb.h"
#include "allwheelstate.h"
#include "robotgeometry.h"
namespace Ui {
class AllWheelForm;
}
class AllWheelForm : public QWidget
{
Q_OBJECT
public:
explicit AllWheelForm(QWidget *parent = 0);
~AllWheelForm();
void closeEvent(QCloseEvent *event);
signals:
void predefinedControlSelected(lunabotics::proto::AllWheelControl::PredefinedControlType controlType);
void explicitControlSelected(AllWheelState *steering, AllWheelState *driving);
void ICRControlSelected(QPointF ICR, float velocity);
void crabControlSelected(qreal head, qreal vel);
void closing();
private slots:
void allWheelStateUpdated(AllWheelState *steering, AllWheelState *driving);
void ICRUpdated(QPointF ICR);
void updateJoints(RobotGeometry *geometry);
void on_turnRightButton_clicked();
void on_turnLeftButton_clicked();
void on_rightButton_clicked();
void on_leftButton_clicked();
void on_backwardButton_clicked();
void on_forwardButton_clicked();
void on_stopButton_clicked();
void on_sendICRButton_clicked();
void on_resetButton_clicked();
void on_sendButton_clicked();
void on_sendCrabButton_clicked();
private:
Ui::AllWheelForm *ui;
QGraphicsScene *robotSketchScene;
QGraphicsRectItem *leftFrontWheel;
QGraphicsRectItem *rightFrontWheel;
QGraphicsRectItem *leftRearWheel;
QGraphicsRectItem *rightRearWheel;
QGraphicsRectItem *baseLink;
QGraphicsRectItem *leftFrontLink;
QGraphicsRectItem *rightFrontLink;
QGraphicsRectItem *leftRearLink;
QGraphicsRectItem *rightReartLink;
QStandardItemModel *stateTableModel;
QGraphicsItemGroup *closeICRItem;
QGraphicsItemGroup *farICRItem;
void redrawSketch();
void createGrphicItems();
void setRow(int &rowNumber, const QString &label, const QString &value);
void updateTable();
//All wheel steering state
AllWheelState *steeringMotors;
AllWheelState *drivingMotors;
RobotGeometry *geometry;
QPointF ICR;
bool graphicItemsCreated;
};
#endif // ALLWHEELFORM_H