63
63
#include < QClipboard>
64
64
#include < QPalette>
65
65
#include < QColor>
66
+ #include < QThread>
66
67
#include < QCheckBox>
68
+ #include < QComboBox>
67
69
68
70
#include < vector>
69
71
75
77
namespace hubo_walk_space
76
78
{
77
79
80
+ class HuboWalkWidget ;
81
+
78
82
class HuboRefreshManager : public QThread
79
83
{
80
84
Q_OBJECT
81
85
public:
82
- HuboInitWidget * parentWidget;
86
+ HuboWalkWidget * parentWidget;
83
87
bool alive;
84
88
int waitTime;
85
89
@@ -112,6 +116,7 @@ Q_OBJECT
112
116
// someone using the class for something else to pass in a parent
113
117
// widget as they normally would with Qt.
114
118
HuboWalkWidget ( QWidget* parent = 0 );
119
+ ~HuboWalkWidget ();
115
120
116
121
QString groupStyleSheet;
117
122
@@ -148,6 +153,11 @@ Q_OBJECT
148
153
struct hubo_param h_param;
149
154
150
155
156
+ // Handling profiles TODO
157
+ // std::vector<zmp_params> profiles;
158
+ std::vector<QString> profileNames;
159
+ void fillProfileSelect ();
160
+
151
161
protected:
152
162
int ipAddrA;
153
163
int ipAddrB;
@@ -160,7 +170,20 @@ Q_OBJECT
160
170
// Slots will be "connected" to signals in order to respond to user events
161
171
protected Q_SLOTS:
162
172
173
+ // Handle button events
174
+ void handleProfileSave ();
175
+ void handleProfileDelete ();
176
+ void handleProfileSaveAs ();
177
+ void handleJoyLaunch ();
178
+ void handleContinuous ();
163
179
180
+ void handleForward ();
181
+ void handleLeft ();
182
+ void handleTurnLeft ();
183
+ void handleRight ();
184
+ void handleTurnRight ();
185
+ void handleBackward ();
186
+ void handleStop ();
164
187
165
188
// Update all state information
166
189
void refreshState ();
@@ -204,72 +227,53 @@ protected Q_SLOTS:
204
227
205
228
206
229
QDoubleSpinBox* strideBox;
207
- QSpinBox* stepBox;
230
+ QSpinBox* stepCountBox;
231
+ QDoubleSpinBox* radiusBox;
208
232
QCheckBox* continuousBox;
209
233
QPushButton* forwardButton;
210
234
QPushButton* leftButton;
211
235
QPushButton* rightButton;
212
236
QPushButton* backButton;
213
237
QPushButton* stopButton;
238
+ QPushButton* turnLeftButton;
239
+ QPushButton* turnRightButton;
214
240
// /////////////
215
241
216
242
217
243
// TODO: Update all the following
218
244
// /////////////
219
- void initializeJointStateTab ();
220
- QWidget* jointStateTab;
221
-
222
- QLineEdit* stateFlags;
223
-
224
- QButtonGroup* jointStateGroup;
225
- std::vector<QPushButton*> jointStateButtons;
226
- QPushButton* copyJoints;
227
-
228
- QButtonGroup* radSelectGroup;
229
- QRadioButton* radSelect;
230
- QRadioButton* degSelect;
231
- // /////////////
232
-
233
- std::vector<QString> ftName;
234
-
235
-
236
- // /////////////
237
- void initializeSensorCmdTab ();
238
- QWidget* sensorCmdTab;
239
-
240
- QButtonGroup* radioSensorButtons;
241
- QRadioButton* nullSensor;
242
- QRadioButton* initSensor; // Note: Not used... feels dangerous
243
- // It can change board settings in bad ways
244
-
245
- QPushButton* rhFTButton;
246
- QPushButton* lhFTButton;
247
- QPushButton* rfFTButton;
248
- QPushButton* lfFTButton;
249
- QPushButton* imuButton;
245
+ void initializeZmpParamTab ();
246
+ QWidget* zmpParamTab;
247
+
248
+ QComboBox* profileSelect;
249
+ QPushButton* saveProfile;
250
+ QPushButton* deleteProfile;
251
+ QPushButton* saveAsProfile;
252
+ QLineEdit* saveAsEdit;
253
+
254
+ QDoubleSpinBox* xOffsetBox;
255
+ QDoubleSpinBox* yOffsetBox;
256
+ QDoubleSpinBox* jerkPenalBox;
257
+ QDoubleSpinBox* lookAheadBox;
258
+
259
+ QDoubleSpinBox* startupTimeBox;
260
+ QDoubleSpinBox* shutdownTimeBox;
261
+ QDoubleSpinBox* doubleSupportBox;
262
+ QDoubleSpinBox* singleSupportBox;
263
+
264
+ QComboBox* walkTypeSelect;
265
+ QComboBox* ikSenseSelect;
266
+
267
+ QDoubleSpinBox* liftoffHeightBox;
268
+ QDoubleSpinBox* stepDistanceBox;
269
+ QDoubleSpinBox* lateralDistanceBox;
270
+ QDoubleSpinBox* sideStepDistanceBox;
271
+
272
+ QDoubleSpinBox* comHeightBox;
273
+ QDoubleSpinBox* comIKAngleWeightBox;
250
274
// /////////////
251
275
252
276
253
- // /////////////
254
- void initializeSensorStateTab ();
255
- QWidget* sensorStateTab;
256
-
257
- QGroupBox* ftBox;
258
- std::vector<QLineEdit*> ft_mx;
259
- std::vector<QLineEdit*> ft_my;
260
- std::vector<QLineEdit*> ft_fz;
261
- QPushButton* copyFT;
262
-
263
- QGroupBox* imuBox;
264
- QLineEdit* a_x;
265
- QLineEdit* a_y;
266
- QLineEdit* a_z;
267
-
268
- QLineEdit* w_x;
269
- QLineEdit* w_y;
270
- QLineEdit* w_z;
271
- QPushButton* copyIMU;
272
- // /////////////
273
277
274
278
};
275
279
0 commit comments