17 #ifndef GAZEBO_GUI_JOINTCONTROLWIDGET_HH_
18 #define GAZEBO_GUI_JOINTCONTROLWIDGET_HH_
23 #include <ignition/msgs.hh>
24 #include <ignition/transport.hh>
37 class JointControlWidgetPrivate;
38 class JointForceControl;
39 class JointForceControlPrivate;
40 class JointPIDPosControl;
41 class JointPIDPosControlPrivate;
42 class JointPIDVelControl;
43 class JointPIDVelControlPrivate;
62 public:
void SetModelName(
const std::string &_modelName);
68 private:
void ResponseCallback(
const std::string &_modelName,
69 const ignition::msgs::JointCmd &_rep,
const bool _result);
74 private slots:
void OnResponse(
const std::string &_modelName,
75 const ignition::msgs::JointCmd &_rep);
80 Q_SIGNALS:
void repReceived(
const std::string &_modelName,
81 const ignition::msgs::JointCmd &_rep);
84 private slots:
void OnReset();
89 private slots:
void OnForceChanged(
double _value,
90 const std::string &_name);
95 private slots:
void OnPIDPosChanged(
double _value,
96 const std::string &_name);
101 private slots:
void OnPPosGainChanged(
double _value,
102 const std::string &_name);
107 private slots:
void OnDPosGainChanged(
double _value,
108 const std::string &_name);
113 private slots:
void OnIPosGainChanged(
double _value,
114 const std::string &_name);
119 private slots:
void OnPIDVelChanged(
double _value,
120 const std::string &_name);
125 private slots:
void OnPVelGainChanged(
double _value,
126 const std::string &_name);
131 private slots:
void OnDVelGainChanged(
double _value,
132 const std::string &_name);
137 private slots:
void OnIVelGainChanged(
double _value,
138 const std::string &_name);
142 private slots:
void OnPIDPosUnitsChanged(
int _index);
148 private:
void AddScrollTab(QTabWidget *_tabPane,
149 QGridLayout *_tabLayout,
150 const QString &_name);
154 private:
void LayoutForceTab(msgs::Model &_modelMsg);
158 private:
void LayoutPositionTab(msgs::Model &_modelMsg);
162 private:
void LayoutVelocityTab(msgs::Model &_modelMsg);
166 private: std::unique_ptr<JointControlWidgetPrivate> dataPtr;
181 QGridLayout *_layout, QWidget *_parent,
int _index);
187 public:
void Reset();
191 public:
void SetForce(
const double _force);
195 public:
void SetShowActive(
const bool _active);
199 public slots:
void OnChanged(
double _value);
205 Q_SIGNALS:
void changed(
double _value,
const std::string &_name);
209 private: std::unique_ptr<JointForceControlPrivate> dataPtr;
225 QGridLayout *_layout, QWidget *_parent,
int _index);
231 public:
void Reset();
235 public:
void SetPositionTarget(
const double _target);
239 public:
void SetPGain(
const double _pGain);
243 public:
void SetIGain(
const double _iGain);
247 public:
void SetDGain(
const double _dGain);
251 public:
void SetShowActive(
const bool _active);
254 public:
void SetToRadians();
257 public:
void SetToDegrees();
261 public slots:
void OnChanged(
double _value);
265 public slots:
void OnPChanged(
double _value);
269 public slots:
void OnIChanged(
double _value);
273 public slots:
void OnDChanged(
double _value);
279 Q_SIGNALS:
void changed(
double _value,
const std::string &_name);
285 Q_SIGNALS:
void pChanged(
double _value,
const std::string &_name);
291 Q_SIGNALS:
void dChanged(
double _value,
const std::string &_name);
297 Q_SIGNALS:
void iChanged(
double _value,
const std::string &_name);
301 private: std::unique_ptr<JointPIDPosControlPrivate> dataPtr;
317 QGridLayout *_layout, QWidget *_parent,
int _index);
323 public:
void Reset();
327 public:
void SetVelocityTarget(
const double _target);
331 public:
void SetPGain(
const double _pGain);
335 public:
void SetIGain(
const double _iGain);
339 public:
void SetDGain(
const double _dGain);
343 public:
void SetShowActive(
const bool _active);
347 public slots:
void OnChanged(
double _value);
351 public slots:
void OnPChanged(
double _value);
355 public slots:
void OnIChanged(
double _value);
359 public slots:
void OnDChanged(
double _value);
365 Q_SIGNALS:
void changed(
double _value,
const std::string &_name);
371 Q_SIGNALS:
void pChanged(
double _value,
const std::string &_name);
377 Q_SIGNALS:
void dChanged(
double _value,
const std::string &_name);
383 Q_SIGNALS:
void iChanged(
double _value,
const std::string &_name);
387 private: std::unique_ptr<JointPIDVelControlPrivate> dataPtr;
Widget to control joints via application of position PID controller.
Definition: JointControlWidget.hh:215
Widget to control joints via application of a velocity PID controller.
Definition: JointControlWidget.hh:307
Widget to control joints via application of force.
Definition: JointControlWidget.hh:171