TestGetNames.cpp
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::RobotNameHelperTestGroup
17 * @author Simon Ottenhaus ( simon dot ottenhaus at kit dot edu )
18 * @date 2018
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#include "TestGetNames.h"
24
25#include <VirtualRobot/RobotNodeSet.h>
26
28
29//#include <ArmarXCore/core/time/TimeUtil.h>
30//#include <ArmarXCore/observers/variant/DatafieldRef.h>
31
32using namespace armarx;
33using namespace RobotNameHelperTestGroup;
34
35// DO NOT EDIT NEXT LINE
36TestGetNames::SubClassRegistry TestGetNames::Registry(TestGetNames::GetName(),
38
39void
41{
42 // put your user code for the enter-point here
43 // execution time should be short (<100ms)
44}
45
46void
48{
49 ARMARX_IMPORTANT << "Profiles: " << getRobotNameHelper()->getProfiles();
50 auto side = [&](const auto s)
51 {
52 const auto arm = getRobotNameHelper()->getArm(s);
53 try
54 {
55 ARMARX_IMPORTANT << "qwerqwer : " << arm.select("qwerqwer");
56 }
57 catch (...)
58 {
60 }
61 try
62 {
63 ARMARX_IMPORTANT << "getSide : " << arm.getSide();
64 }
65 catch (...)
66 {
68 }
69 try
70 {
71 ARMARX_IMPORTANT << "getKinematicChain : " << arm.getKinematicChain();
72 }
73 catch (...)
74 {
76 }
77 try
78 {
79 ARMARX_IMPORTANT << "getTorsoKinematicChain: " << arm.getTorsoKinematicChain();
80 }
81 catch (...)
82 {
84 }
85 try
86 {
87 ARMARX_IMPORTANT << "getTCP : " << arm.getTCP();
88 }
89 catch (...)
90 {
92 }
93 try
94 {
95 ARMARX_IMPORTANT << "getForceTorqueSensor : " << arm.getForceTorqueSensor();
96 }
97 catch (...)
98 {
100 }
101 try
102 {
103 ARMARX_IMPORTANT << "getEndEffector : " << arm.getEndEffector();
104 }
105 catch (...)
106 {
108 }
109 try
110 {
111 ARMARX_IMPORTANT << "getMemoryHandName : " << arm.getMemoryHandName();
112 }
113 catch (...)
114 {
116 }
117 try
118 {
119 ARMARX_IMPORTANT << "getHandControllerName : " << arm.getHandControllerName();
120 }
121 catch (...)
122 {
124 }
125 try
126 {
127 ARMARX_IMPORTANT << "getHandModelPackage : " << arm.getHandModelPackage();
128 }
129 catch (...)
130 {
132 }
133 try
134 {
135 ARMARX_IMPORTANT << "getHandModelPath : " << arm.getHandModelPath();
136 }
137 catch (...)
138 {
140 }
141 try
142 {
143 ARMARX_IMPORTANT << "getHandRootNode : " << arm.getHandRootNode();
144 }
145 catch (...)
146 {
148 }
149
150 RobotNameHelper::RobotArm robarm = arm.addRobot(getRobot());
151 try
152 {
153 ARMARX_IMPORTANT << s << "Arm: " << robarm.getKinematicChain()->getName();
154 }
155 catch (...)
156 {
158 }
159 try
160 {
161 ARMARX_IMPORTANT << s << "Arm TCP: " << robarm.getTCP()->getName();
162 }
163 catch (...)
164 {
166 }
167 try
168 {
169 ARMARX_IMPORTANT << "HandRootNode: " << robarm.getHandRootNode()->getName();
170 }
171 catch (...)
172 {
174 }
175 try
176 {
177 ARMARX_IMPORTANT << "TorsoKinematicChain: "
178 << robarm.getTorsoKinematicChain()->getName();
179 }
180 catch (...)
181 {
183 }
184 try
185 {
186 ARMARX_IMPORTANT << "Tcp2HandRootTransform: " << robarm.getTcp2HandRootTransform();
187 }
188 catch (...)
189 {
191 }
192 };
193 side("Left");
194 side("Right");
195}
196
197//void TestGetNames::onBreak()
198//{
199// // put your user code for the breaking point here
200// // execution time should be short (<100ms)
201//}
202
203void
205{
206 // put your user code for the exit point here
207 // execution time should be short (<100ms)
208}
209
210// DO NOT EDIT NEXT FUNCTION
TestGetNames(const XMLStateConstructorParams &stateData)
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
armarx::RobotArm RobotArm
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
Definition Logging.h:190
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
Definition Logging.h:196
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::string GetHandledExceptionString()
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr
Definition XMLState.h:64
Eigen::Matrix4f getTcp2HandRootTransform() const
VirtualRobot::RobotNodeSetPtr getTorsoKinematicChain() const
VirtualRobot::RobotNodeSetPtr getKinematicChain() const
VirtualRobot::RobotNodePtr getHandRootNode() const
VirtualRobot::RobotNodePtr getTCP() const