CartesianImpedanceControllerWidgetController.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::CartesianImpedanceControllerWidgetController
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 
26 
27 #include <RobotAPI/gui-plugins/CartesianImpedanceController/ui_CartesianImpedanceControllerWidget.h>
28 #include <RobotAPI/interface/units/RobotUnit/TaskSpaceActiveImpedanceControl.h>
29 #include <RobotAPI/libraries/NJointControllerGuiPluginUtility/NJointControllerGuiPluginBase.h>
31 #include <RobotAPI/libraries/RobotAPINJointControllerWidgets/CartesianImpedanceControllerConfigWidget.h>
32 
33 namespace armarx
34 {
35  /**
36  \page armarx_control-GuiPlugins-CartesianImpedanceController CartesianImpedanceController
37  \brief The CartesianImpedanceController allows visualizing ...
38 
39  \image html CartesianImpedanceController.png
40  The user can
41 
42  API Documentation \ref CartesianImpedanceControllerWidgetController
43 
44  \see CartesianImpedanceControllerGuiPlugin
45  */
46 
47  /**
48  * \class CartesianImpedanceControllerWidgetController
49  * \brief CartesianImpedanceControllerWidgetController brief one line description
50  *
51  * Detailed description
52  */
54  public NJointControllerGuiPluginBase<CartesianImpedanceControllerWidgetController,
55  NJointTaskSpaceImpedanceControlInterfacePrx>,
56  virtual public ArVizComponentPluginUser
57  {
58  Q_OBJECT
59 
60  public:
63 
64  /**
65  * Returns the Widget name displayed in the ArmarXGui to create an
66  * instance of this class.
67  */
68  static QString
70  {
71  return "RobotControl.NJointControllers.CartesianImpedanceControl";
72  }
73  void setupGuiAfterConnect() override;
74  void onConnectComponent() override;
75 
76  protected:
77  void timerEvent(QTimerEvent* event) override;
78  void visuHandAtPose(const Eigen::Matrix4f& tcpInRoot = Eigen::Matrix4f::Identity());
79 
80  private slots:
81  void on_comboBoxRNS_currentIndexChanged(const QString& arg1);
82  void on_pushButtonTargGet_clicked();
83  void on_pushButtonTargAdd_clicked();
84  void on_pushButtonTargSet_clicked();
85  void on_radioButtonSelect_clicked();
86  void createController() override;
87  void deleteController() override;
88 
89  private:
90  NJointControllerConfigPtr readFullCFG() const override;
91  std::tuple<Eigen::Vector3f, Eigen::Quaternionf> readTargetCFG() const;
92 
93  private:
94  Ui::CartesianImpedanceControllerWidget _ui;
95  VirtualRobot::RobotNodeSetPtr _rns;
98 
100  RobotNameHelper::Arm _right;
101  std::string _visuHandRobotFile;
102  std::string _visuHandRobotProject;
103  Eigen::Matrix4f _tcpToBase;
104  int _timer{0};
105  };
106 } // namespace armarx
ArVizComponentPlugin.h
SpinBoxToVector.h
armarx::CartesianImpedanceControllerConfigWidget
Definition: CartesianImpedanceControllerConfigWidget.h:16
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
armarx::ArVizComponentPluginUser
Provides a ready-to-use ArViz client arviz as member variable.
Definition: ArVizComponentPlugin.h:36
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
armarx::CartesianImpedanceControllerWidgetController
CartesianImpedanceControllerWidgetController brief one line description.
Definition: CartesianImpedanceControllerWidgetController.h:53
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
armarx::CartesianImpedanceControllerWidgetController::GetWidgetName
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
Definition: CartesianImpedanceControllerWidgetController.h:69
SpinBoxToPose.h
armarx::SpinBoxToPose< QDoubleSpinBox >
armarx::Arm
Definition: RobotNameHelper.h:41
armarx::NJointControllerGuiPluginBase
Definition: NJointControllerGuiPluginBase.h:30
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28