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;
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);
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);
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);
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);
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;
gui
Definition KeyEventHandler.hh:29
Widget to control joints via application of force.
Definition JointControlWidget.hh:172
virtual ~JointForceControl()
Destructor.
JointForceControl(const std::string &_name, QGridLayout *_layout, QWidget *_parent, int _index)
Constructor.
void SetForce(const double _force)
Set the control force.
void Reset()
Reset the controls.
void changed(double _value, const std::string &_name)
QT changed signal, used to report the change to the joint controller widget.
void OnChanged(double _value)
On force changed callback.
void SetShowActive(const bool _active)
Indicate whether controls are active by highlighting them.
Widget to control joints via application of position PID controller.
Definition JointControlWidget.hh:216
void Reset()
Reset the controls.
void iChanged(double _value, const std::string &_name)
QT changed signal, used to report the change to the joint controller widget.
void OnIChanged(double _value)
Callback when the value of I gain slider changed.
void SetToRadians()
Set the units to radians.
void changed(double _value, const std::string &_name)
QT changed signal, used to report the change to the joint controller widget.
void OnChanged(double _value)
Callback when the value of position slider changed.
void OnDChanged(double _value)
Callback when the value of D gain slider changed.
void SetToDegrees()
Set the units to degrees.
void SetShowActive(const bool _active)
Indicate whether controls are active by highlighting them.
void SetPGain(const double _pGain)
Set the PID proportional gain.
void dChanged(double _value, const std::string &_name)
QT changed signal, used to report the change to the joint controller widget.
void SetIGain(const double _iGain)
Set the PID integral gain.
void SetPositionTarget(const double _target)
Set the PID target position.
void SetDGain(const double _dGain)
Set the PID derivative gain.
void OnPChanged(double _value)
Callback when the value of P gain slider changed.
virtual ~JointPIDPosControl()
Destructor.
JointPIDPosControl(const std::string &_name, QGridLayout *_layout, QWidget *_parent, int _index)
Constructor.
void pChanged(double _value, const std::string &_name)
QT changed signal, used to report the change to the joint controller widget.
Widget to control joints via application of a velocity PID controller.
Definition JointControlWidget.hh:308
JointPIDVelControl(const std::string &_name, QGridLayout *_layout, QWidget *_parent, int _index)
Constructor.
void Reset()
Reset the controls.
void iChanged(double _value, const std::string &_name)
QT changed signal, used to report the change to the joint controller widget.
void OnIChanged(double _value)
Callback when the value of I gain slider changed.
void SetVelocityTarget(const double _target)
Set the PID target velocity.
void changed(double _value, const std::string &_name)
QT changed signal, used to report the change to the joint controller widget.
void OnChanged(double _value)
Callback when the value of velocity slider changed.
void OnDChanged(double _value)
Callback when the value of D gain slider changed.
void SetShowActive(const bool _active)
Indicate whether controls are active by highlighting them.
void SetPGain(const double _pGain)
Set the PID proportional gain.
void dChanged(double _value, const std::string &_name)
QT changed signal, used to report the change to the joint controller widget.
void SetIGain(const double _iGain)
Set the PID integral gain.
virtual ~JointPIDVelControl()
Destructor.
void SetDGain(const double _dGain)
Set the PID derivative gain.
void OnPChanged(double _value)
Callback when the value of P gain slider changed.
void pChanged(double _value, const std::string &_name)
QT changed signal, used to report the change to the joint controller widget.
Forward declarations for the common classes.
Definition Animation.hh:27