NaturalIKTest.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::ArmarXObjects::NaturalIKTest
17 * @author Simon Ottenhaus ( simon dot ottenhaus 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
23#pragma once
24
25
27#include <ArmarXCore/interface/observers/ObserverInterface.h>
28
30//#include <RobotAPI/libraries/core/visualization/DebugDrawerTopic.h>
31#include <Eigen/Dense>
32
35
36namespace armarx
37{
38 /**
39 * @class NaturalIKTestPropertyDefinitions
40 * @brief
41 */
47
48 /**
49 * @defgroup Component-NaturalIKTest NaturalIKTest
50 * @ingroup RobotAPI-Components
51 * A description of the component NaturalIKTest.
52 *
53 * @class NaturalIKTest
54 * @ingroup Component-NaturalIKTest
55 * @brief Brief description of class NaturalIKTest.
56 *
57 * Detailed description of class NaturalIKTest.
58 */
60 virtual public armarx::Component,
61 virtual public RemoteGuiComponentPluginUser
62 {
63 public:
65 {
66 Eigen::Vector3f target;
67 Eigen::Vector3f targetRotation;
68 float scale = 1.3f;
69 float minElbZ;
70 std::atomic_bool setOri;
72 };
73
74 struct GuiParams
75 {
78 std::atomic_bool targetValid = false;
79 Eigen::Vector3f err_R = Eigen::Vector3f::Zero(), err_L = Eigen::Vector3f::Zero();
80
81 std::atomic_bool useCompositeIK;
82 };
83
84 /// @see armarx::ManagedIceObject::getDefaultName()
85 virtual std::string getDefaultName() const override;
86
87
88 RemoteGui::WidgetPtr buildGui();
90
91 protected:
92 /// @see armarx::ManagedIceObject::onInitComponent()
93 virtual void onInitComponent() override;
94
95 /// @see armarx::ManagedIceObject::onConnectComponent()
96 virtual void onConnectComponent() override;
97
98 /// @see armarx::ManagedIceObject::onDisconnectComponent()
99 virtual void onDisconnectComponent() override;
100
101 /// @see armarx::ManagedIceObject::onExitComponent()
102 virtual void onExitComponent() override;
103
104 /// @see PropertyUser::createPropertyDefinitions()
106
107 void vizTaskRun();
108 void testTaskRun();
109 Eigen::Matrix4f mirrorPose(Eigen::Matrix4f oldPose);
111
112
113 private:
114 // Private methods and member variables go here.
115
116 /// Debug observer. Used to visualize e.g. time series.
118 /// Debug drawer. Used for 3D visualization.
119 //armarx::DebugDrawerTopic debugDrawer;
120
123 GuiParams p;
124 };
125} // namespace armarx
Default component property definition container.
Definition Component.h:70
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
NaturalIKTestPropertyDefinitions(std::string prefix)
Brief description of class NaturalIKTest.
virtual void onInitComponent() override
Eigen::Matrix4f mirrorPose(Eigen::Matrix4f oldPose)
virtual void onDisconnectComponent() override
RemoteGui::WidgetPtr buildGui()
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
virtual void onConnectComponent() override
Eigen::Quaternionf mirrorOri(Eigen::Quaternionf oriOld)
virtual void onExitComponent() override
void processGui(RemoteGui::TabProxy &prx)
virtual std::string getDefaultName() const override
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
Quaternion< float, 0 > Quaternionf
This file offers overloads of toIce() and fromIce() functions for STL container types.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.