Skip to content

Commit d9beacc

Browse files
committed
GUI Skeleton Finished -- Needs guts
1 parent 265aa8d commit d9beacc

File tree

5 files changed

+784
-64
lines changed

5 files changed

+784
-64
lines changed

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ catkin_package(
1717
CATKIN_DEPENDS roscpp rospy
1818
DEPENDS ach QtCore QtGui )
1919

20-
## I prefer the Qt signals and slots to avoid defining "emit", "slots",
21-
## etc because they can conflict with boost signals, so define QT_NO_KEYWORDS here.
22-
add_definitions(-DQT_NO_KEYWORDS)
2320

2421

2522
## Here we specify which header files need to be run through "moc",
@@ -33,6 +30,7 @@ qt4_wrap_cpp(MOC_FILES
3330
## the previous command which is stored in ``${MOC_FILES}``.
3431
set(SOURCE_FILES
3532
src/hubo_walk.cpp
33+
src/hubo_walk_slots.cpp
3634
include/hubo_walk.h
3735
${MOC_FILES}
3836
)

include/hubo_walk.h

Lines changed: 57 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@
6363
#include <QClipboard>
6464
#include <QPalette>
6565
#include <QColor>
66+
#include <QThread>
6667
#include <QCheckBox>
68+
#include <QComboBox>
6769

6870
#include <vector>
6971

@@ -75,11 +77,13 @@
7577
namespace hubo_walk_space
7678
{
7779

80+
class HuboWalkWidget;
81+
7882
class HuboRefreshManager : public QThread
7983
{
8084
Q_OBJECT
8185
public:
82-
HuboInitWidget* parentWidget;
86+
HuboWalkWidget* parentWidget;
8387
bool alive;
8488
int waitTime;
8589

@@ -112,6 +116,7 @@ Q_OBJECT
112116
// someone using the class for something else to pass in a parent
113117
// widget as they normally would with Qt.
114118
HuboWalkWidget( QWidget* parent = 0 );
119+
~HuboWalkWidget();
115120

116121
QString groupStyleSheet;
117122

@@ -148,6 +153,11 @@ Q_OBJECT
148153
struct hubo_param h_param;
149154

150155

156+
// Handling profiles TODO
157+
//std::vector<zmp_params> profiles;
158+
std::vector<QString> profileNames;
159+
void fillProfileSelect();
160+
151161
protected:
152162
int ipAddrA;
153163
int ipAddrB;
@@ -160,7 +170,20 @@ Q_OBJECT
160170
// Slots will be "connected" to signals in order to respond to user events
161171
protected Q_SLOTS:
162172

173+
// Handle button events
174+
void handleProfileSave();
175+
void handleProfileDelete();
176+
void handleProfileSaveAs();
177+
void handleJoyLaunch();
178+
void handleContinuous();
163179

180+
void handleForward();
181+
void handleLeft();
182+
void handleTurnLeft();
183+
void handleRight();
184+
void handleTurnRight();
185+
void handleBackward();
186+
void handleStop();
164187

165188
// Update all state information
166189
void refreshState();
@@ -204,72 +227,53 @@ protected Q_SLOTS:
204227

205228

206229
QDoubleSpinBox* strideBox;
207-
QSpinBox* stepBox;
230+
QSpinBox* stepCountBox;
231+
QDoubleSpinBox* radiusBox;
208232
QCheckBox* continuousBox;
209233
QPushButton* forwardButton;
210234
QPushButton* leftButton;
211235
QPushButton* rightButton;
212236
QPushButton* backButton;
213237
QPushButton* stopButton;
238+
QPushButton* turnLeftButton;
239+
QPushButton* turnRightButton;
214240
///////////////
215241

216242

217243
// TODO: Update all the following
218244
///////////////
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;
250274
///////////////
251275

252276

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-
///////////////
273277

274278
};
275279

plugin_description.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<library path="${prefix}/lib/libhubo_walk">
2+
<class name="HuboWalkPanel"
3+
type="hubo_walk_space::HuboWalkPanel"
4+
base_class_type="rviz::Panel">
5+
<description>
6+
A panel widget to interface with commanding Hubo to walk
7+
</description>
8+
</class>
9+
<class name="HuboWalkWidget"
10+
type="hubo_walk_space::HuboWalkWidget"
11+
base_class_type="QTabWidget">
12+
<description>
13+
The widget which is laid on top of the HuboWalkPanel
14+
</description>
15+
</class>
16+
</library>

0 commit comments

Comments
 (0)