26 #include <VirtualRobot/Robot.h>
34 #include <RobotAPI/gui-plugins/CartesianNaturalPositionController/ui_CartesianNaturalPositionControllerWidget.h>
35 #include <RobotAPI/interface/core/RobotState.h>
36 #include <RobotAPI/interface/units/RobotUnit/RobotUnitInterface.h>
61 CartesianNaturalPositionControllerWidgetController>
87 void loadSettings(QSettings* settings)
override;
92 void saveSettings(QSettings* settings)
override;
101 return "RobotControl.NJointControllers.CartesianNaturalPositionController";
104 void onInitComponent()
override;
105 void onConnectComponent()
override;
106 void onDisconnectComponent()
override;
108 QPointer<QDialog> getConfigDialog(QWidget* parent)
override;
109 void configured()
override;
113 void onConnectComponentQt();
114 void on_pushButtonCreateController_clicked();
115 void on_anyDeltaPushButton_clicked();
116 void on_sliders_valueChanged(
int);
117 void on_checkBoxAutoKp_stateChanged(
int);
118 void on_checkBoxSetOri_stateChanged(
int);
119 void on_anyNullspaceCheckbox_stateChanged(
int);
120 void on_anyNullspaceSlider_valueChanged(
int);
121 void on_horizontalSliderPosVel_valueChanged(
int);
125 void invokeConnectComponentQt();
126 void invokeDisconnectComponentQt();
129 void deleteOldController();
130 void readRunCfgFromUi(CartesianNaturalPositionControllerConfig& runCfg);
131 void timerEvent(QTimerEvent*)
override;
133 void updateKpSliders(
const CartesianNaturalPositionControllerConfig& runCfg);
134 void updateKpSliderLabels(
const CartesianNaturalPositionControllerConfig& runCfg);
135 void updateNullspaceTargets();
138 std::string _robotStateComponentName;
139 std::string _robotUnitName;
142 Ui::CartesianNaturalPositionControllerWidget _ui;
143 QPointer<SimpleConfigDialog> _dialog;
145 std::string _controllerName;
147 std::vector<Eigen::Matrix4f> _lastParsedWPs;
148 bool _supportsFT{
false};
150 mutable std::recursive_mutex _allMutex;
154 std::map<QObject*, Eigen::Vector3f> _deltaMapPos;
155 std::map<QObject*, Eigen::Vector3f> _deltaMapOri;
158 std::vector<NullspaceTarget> _nullspaceTargets;