BimanualCartesianAdmittanceControllerGuiWidgetController.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package RobotAPI::gui-plugins::BimanualCartesianAdmittanceControllerGuiWidgetController
17  * @author Raphael Grimm ( raphael dot grimm at kit dot edu )
18  * @date 2020
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 #pragma once
23 
25 
26 #include <RobotAPI/gui-plugins/BimanualCartesianAdmittanceControllerGui/ui_BimanualCartesianAdmittanceControllerGuiWidget.h>
27 #include <RobotAPI/interface/units/RobotUnit/NJointBimanualCartesianAdmittanceController.h>
28 #include <RobotAPI/libraries/NJointControllerGuiPluginUtility/NJointControllerGuiPluginBase.h>
29 
30 namespace armarx
31 {
32  /**
33  \page armarx_control-GuiPlugins-BimanualCartesianAdmittanceControllerGui BimanualCartesianAdmittanceControllerGui
34  \brief The BimanualCartesianAdmittanceControllerGui allows visualizing ...
35 
36  \image html BimanualCartesianAdmittanceControllerGui.png
37  The user can
38 
39  API Documentation \ref BimanualCartesianAdmittanceControllerGuiWidgetController
40 
41  \see BimanualCartesianAdmittanceControllerGuiGuiPlugin
42  */
43 
44  /**
45  * \class BimanualCartesianAdmittanceControllerGuiWidgetController
46  * \brief BimanualCartesianAdmittanceControllerGuiWidgetController brief one line description
47  *
48  * Detailed description
49  */
52  BimanualCartesianAdmittanceControllerGuiWidgetController,
53  NJointBimanualCartesianAdmittanceControllerInterfacePrx>
54  {
55  Q_OBJECT
56 
57  public:
59 
60  /**
61  * Returns the Widget name displayed in the ArmarXGui to create an
62  * instance of this class.
63  */
64  static QString
66  {
67  return "RobotControl.NJointControllers.BimanualCartesianAdmittanceController";
68  }
69 
70  private slots:
71  void on_pushButtonReadCurrentPose_clicked();
72  void on_pushButtonTargAdd_clicked();
73  void on_pushButtonCfgSendDefaultPose_clicked();
74  void on_pushButtonCfgSendNullspace_clicked();
75  void on_pushButtonCfgSendImpedance_clicked();
76  void on_pushButtonCfgSendAdmittance_clicked();
77  void on_pushButtonCfgSendForce_clicked();
78  void on_pushButtonCfgSendAll_clicked();
79  void on_pushButtonTargSend_clicked();
80 
81  private:
82  void setupGuiAfterConnect() override;
83 
84  std::array<Ice::FloatSeq, 2> readDesiredJointCFG() const;
85  detail::NJBmanCartAdmCtrl::Nullspace readNullspaceCFG() const;
86  std::array<detail::NJBmanCartAdmCtrl::Impedance, 2> readImpedanceCFG() const;
87  std::array<detail::NJBmanCartAdmCtrl::Force, 2> readForceCFG() const;
88  detail::NJBmanCartAdmCtrl::Admittance readAdmittanceCFG() const;
89  NJointControllerConfigPtr readFullCFG() const override;
90  std::array<Eigen::Vector3f, 2> readPosTarg() const;
91  std::array<Eigen::Vector3f, 2> readVelTarg() const;
92 
93  private:
94  Ui::BimanualCartesianAdmittanceControllerGuiWidget _ui;
95  SpinBoxToVector<QDoubleSpinBox> _desiredJointValuesLeft;
96  SpinBoxToVector<QDoubleSpinBox> _desiredJointValuesRight;
97  };
98 } // namespace armarx
armarx::detail::NJBmanCartAdmCtrl::Nullspace
Definition: CartesianAdmittanceControllerInterface.ice:44
armarx::detail::NJBmanCartAdmCtrl::Admittance
Definition: CartesianAdmittanceControllerInterface.ice:58
SpinBoxToVector.h
armarx::BimanualCartesianAdmittanceControllerGuiWidgetController
BimanualCartesianAdmittanceControllerGuiWidgetController brief one line description.
Definition: BimanualCartesianAdmittanceControllerGuiWidgetController.h:50
armarx::BimanualCartesianAdmittanceControllerGuiWidgetController::GetWidgetName
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
Definition: BimanualCartesianAdmittanceControllerGuiWidgetController.h:65
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
armarx::SpinBoxToVector< QDoubleSpinBox >
armarx::NJointControllerGuiPluginBase
Definition: NJointControllerGuiPluginBase.h:30
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28