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
33namespace 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
74 void setupGuiAfterConnect() override;
75 void onConnectComponent() override;
76
77 protected:
78 void timerEvent(QTimerEvent* event) override;
79 void visuHandAtPose(const Eigen::Matrix4f& tcpInRoot = Eigen::Matrix4f::Identity());
80
81 private slots:
82 void on_comboBoxRNS_currentIndexChanged(const QString& arg1);
83 void on_pushButtonTargGet_clicked();
84 void on_pushButtonTargAdd_clicked();
85 void on_pushButtonTargSet_clicked();
86 void on_radioButtonSelect_clicked();
87 void createController() override;
88 void deleteController() override;
89
90 private:
91 NJointControllerConfigPtr readFullCFG() const override;
92 std::tuple<Eigen::Vector3f, Eigen::Quaternionf> readTargetCFG() const;
93
94 private:
95 Ui::CartesianImpedanceControllerWidget _ui;
96 VirtualRobot::RobotNodeSetPtr _rns;
99
102 std::string _visuHandRobotFile;
103 std::string _visuHandRobotProject;
104 Eigen::Matrix4f _tcpToBase;
105 int _timer{0};
106 };
107} // namespace armarx
#define ARMARXCOMPONENT_IMPORT_EXPORT
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
This file offers overloads of toIce() and fromIce() functions for STL container types.