RobotStateComponentPlugin.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::ArmarXObjects::RobotAPIComponentPlugins
17  * @author Raphael Grimm ( raphael dot grimm at kit dot edu )
18  * @date 2019
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
24 
27 
29 
30 
31 namespace armarx::plugins
32 {
34  {
35  ARMARX_CHECK_NOT_NULL(_nameHelper);
36  return _nameHelper;
37  }
39  {
41  ARMARX_CHECK_NULL(_robotStateComponent);
42  _robotStateComponent = rsc;
43  }
44 
45  bool RobotStateComponentPlugin::hasRobot(const std::string& id) const
46  {
47  std::lock_guard {_robotsMutex};
48  return _robots.count(id);
49  }
50 
51  VirtualRobot::RobotPtr RobotStateComponentPlugin::addRobot(const std::string& id, const VirtualRobot::RobotPtr& robot, const VirtualRobot::RobotNodeSetPtr& rns, const VirtualRobot::RobotNodePtr& node)
52  {
53  ARMARX_CHECK_NOT_NULL(robot);
54  if (rns)
55  {
56  ARMARX_CHECK_EXPRESSION(robot == rns->getRobot());
57  }
58  if (node)
59  {
60  ARMARX_CHECK_EXPRESSION(robot == node->getRobot());
61  }
62  std::lock_guard {_robotsMutex};
63  ARMARX_CHECK_EXPRESSION(!hasRobot(id)) << "Robot with id '" << id << "' was already added";
64  if (rns && ! node)
65  {
66  _robots[id] = {robot, rns, rns->getTCP()};
67  }
68  else
69  {
70  _robots[id] = {robot, rns, node};
71  }
72  return robot;
73  }
74 
75  VirtualRobot::RobotPtr RobotStateComponentPlugin::addRobot(const std::string& id, const VirtualRobot::RobotPtr& robot, const std::string& rnsName, const std::string& nodeName)
76  {
77  ARMARX_CHECK_NOT_NULL(robot) << "robot added with id '" << id << "' is null";
78  VirtualRobot::RobotNodeSetPtr rns;
79  VirtualRobot::RobotNodePtr node;
80  if (!rnsName.empty())
81  {
82  rns = robot->getRobotNodeSet(rnsName);
83  ARMARX_CHECK_NOT_NULL(rns) << "The robot has no node set with name '" << rnsName
84  << "'. Available RNS: " << robot->getRobotNodeSetNames();
85  }
86  if (!nodeName.empty())
87  {
88  auto node = robot->getRobotNode(nodeName);
89  ARMARX_CHECK_NOT_NULL(node) << "The robot has no node with name '" << nodeName
90  << "'. Available nodes: " << robot->getRobotNodeNames();
91  }
92  else if (rns)
93  {
94  node = rns->getTCP();
95  }
96  return addRobot(id, robot, rns, node);
97  }
98 
99  VirtualRobot::RobotPtr RobotStateComponentPlugin::addRobot(const std::string& id, VirtualRobot::RobotIO::RobotDescription loadMode, const std::string& rnsName, const std::string& nodeName)
100  {
101  return addRobot(id,
102  RemoteRobot::createLocalCloneFromFile(_robotStateComponent, loadMode),
103  rnsName, nodeName);
104  }
105 
106  VirtualRobot::RobotPtr RobotStateComponentPlugin::addRobot(const std::string& id, const std::string& filename, const Ice::StringSeq packages, VirtualRobot::RobotIO::RobotDescription loadMode, const std::string& rnsName, const std::string& nodeName)
107  {
108  return addRobot(id,
109  RemoteRobot::createLocalClone(_robotStateComponent, filename, packages, loadMode),
110  rnsName, nodeName);
111  }
112 
114  {
115  return getRobotData(id).robot;
116  }
117 
119  {
120  std::lock_guard {_robotsMutex};
121  ARMARX_CHECK_EXPRESSION(hasRobot(id)) << "No robot with id '" << id << "' loaded";
122  return _robots.at(id);
123  }
124 
125  void RobotStateComponentPlugin::setRobotRNSAndNode(const std::string& id, const std::string& rnsName, const std::string& nodeName)
126  {
127  std::lock_guard {_robotsMutex};
128  ARMARX_CHECK_EXPRESSION(hasRobot(id)) << "No robot with id '" << id << "' loaded";
129  auto& r = _robots.at(id);
130  ARMARX_CHECK_EXPRESSION(!rnsName.empty()) << "There was no robot node set specified! "
131  << "Available RNS: " << r.robot->getRobotNodeSetNames();
132  auto rns = r.robot->getRobotNodeSet(rnsName);
133  ARMARX_CHECK_NOT_NULL(rns) << "The robot has no node set with name '" << rnsName
134  << "'. Available RNS: " << r.robot->getRobotNodeSetNames();
135  if (nodeName.empty())
136  {
137  r.rns = rns;
138  r.node = rns->getTCP();
139  }
140  else
141  {
142  auto node = r.robot->getRobotNode(nodeName);
143  ARMARX_CHECK_NOT_NULL(node) << "The robot has no node with name '" << nodeName
144  << "'. Available nodes: " << r.robot->getRobotNodeNames();
145  r.rns = rns;
146  r.node = node;
147  }
148  }
149 
151  {
152  return _robotStateComponent;
153  }
154 
156  {
157  return RemoteRobot::synchronizeLocalClone(robot, _robotStateComponent);
158  }
159 
161  {
162  return RemoteRobot::synchronizeLocalCloneToTimestamp(robot, _robotStateComponent, timestamp);
163  }
164 
165  bool RobotStateComponentPlugin::synchronizeLocalClone(const VirtualRobot::RobotPtr& robot, const RobotStateConfig& state) const
166  {
167  return RemoteRobot::synchronizeLocalCloneToState(robot, state);
168  }
169 
171  {
172  return synchronizeLocalClone(rdata.robot);
173  }
174 
176  {
177  return synchronizeLocalClone(rdata.robot, timestamp);
178  }
179 
180  bool RobotStateComponentPlugin::synchronizeLocalClone(const RobotData& rdata, const RobotStateConfig& state) const
181  {
182  return synchronizeLocalClone(rdata.robot, state);
183  }
184 
185  bool RobotStateComponentPlugin::synchronizeLocalClone(const std::string& id) const
186  {
187  return synchronizeLocalClone(getRobot(id));
188  }
189 
190  bool RobotStateComponentPlugin::synchronizeLocalClone(const std::string& id, Ice::Long timestamp) const
191  {
192  return synchronizeLocalClone(getRobot(id), timestamp);
193  }
194 
195  bool RobotStateComponentPlugin::synchronizeLocalClone(const std::string& id, const RobotStateConfig& state) const
196  {
197  return synchronizeLocalClone(getRobot(id), state);
198  }
199 
201  const std::string& id,
202  const Eigen::Matrix4f& targetPose,
203  const SimpleDiffIK::Parameters& params) const
204  {
205  return getRobotData(id).calculateRobotDiffIK(targetPose, params);
206  }
207 
209  const std::string& id,
210  const std::vector<Eigen::Matrix4f>& targets,
211  const Eigen::VectorXf& initialJV,
212  const SimpleDiffIK::Parameters& params) const
213  {
214  return getRobotData(id).calculateRobotReachability(targets, initialJV, params);
215  }
216 
218  {
219  if (!_deactivated && !_robotStateComponent && _robotStateComponentName.empty())
220  {
221  parent<Component>().getProperty(_robotStateComponentName, makePropertyName(_propertyName));
222  }
223 
224  if (!_deactivated && !_robotStateComponent)
225  {
226  parent<Component>().usingProxy(_robotStateComponentName);
227  }
228  }
229 
231  {
232  if (!_deactivated && !_robotStateComponent)
233  {
234  parent<Component>().getProxy(_robotStateComponent, _robotStateComponentName);
235  }
236  if (!_deactivated)
237  {
238  _nameHelper = std::make_shared<RobotNameHelper>(_robotStateComponent->getRobotInfo());
239  }
240  }
241 
243  {
244  _robotStateComponent = nullptr;
245  }
246 
248  {
249  if (!properties->hasDefinition(makePropertyName(_propertyName)))
250  {
251  properties->defineOptionalProperty<std::string>(
252  makePropertyName(_propertyName),
253  "RobotStateComponent",
254  "Name of the robot state component");
255  }
256  }
257 
259  {
260  ARMARX_CHECK_NOT_NULL(rns) << "No robot node set configured for the robot";
261  ARMARX_CHECK_NOT_NULL(node) << "No tcp configured for the robot";
262  return SimpleDiffIK::CalculateDiffIK(targetPose, rns, node, params);
263  }
264 
265  SimpleDiffIK::Reachability RobotStateComponentPlugin::RobotData::calculateRobotReachability(const std::vector<Eigen::Matrix4f>& targets, const Eigen::VectorXf& initialJV, const SimpleDiffIK::Parameters& params) const
266  {
267  ARMARX_CHECK_NOT_NULL(rns) << "No robot node set configured for the robot";
268  ARMARX_CHECK_NOT_NULL(node) << "No tcp configured for the robot ";
269  return SimpleDiffIK::CalculateReachability(targets, initialJV, rns, node, params);
270  }
271 
273  {
275  ARMARX_CHECK_EMPTY(_robotStateComponentName);
276  _robotStateComponentName = name;
277  }
278 
280  {
281  return _robotStateComponentName;
282  }
283 
285  {
286  _deactivated = true;
287  }
288 
290  const std::string& from,
291  const std::string& to,
292  const VirtualRobot::RobotPtr& rob)
293  {
295  armarx::FramedPose fp{Eigen::Matrix4f::Identity(), from, rob->getName()};
296  fp.changeFrame(rob, to);
297  return fp.toEigen();
298  }
299 }
300 
301 namespace armarx
302 {
304  {
305  addPlugin(_robotStateComponentPlugin);
306  }
308  {
309  return *_robotStateComponentPlugin;
310  }
311 
313  {
314  return *_robotStateComponentPlugin;
315  }
316 
318  {
319  return getRobotStateComponentPlugin().getRobotStateComponent();
320  }
322  {
323  return getRobotStateComponentPlugin().getRobotNameHelper();
324  }
325 
326  bool RobotStateComponentPluginUser::hasRobot(const std::string& id) const
327  {
328  return getRobotStateComponentPlugin().hasRobot(id);
329  }
330 
331  VirtualRobot::RobotPtr RobotStateComponentPluginUser::addRobot(const std::string& id, const VirtualRobot::RobotPtr& robot, const VirtualRobot::RobotNodeSetPtr& rns, const VirtualRobot::RobotNodePtr& node)
332  {
333  return getRobotStateComponentPlugin().addRobot(id, robot, rns, node);
334  }
335 
336  VirtualRobot::RobotPtr RobotStateComponentPluginUser::addRobot(const std::string& id, const VirtualRobot::RobotPtr& robot, const std::string& rnsName, const std::string& nodeName)
337  {
338  return getRobotStateComponentPlugin().addRobot(id, robot, rnsName, nodeName);
339  }
340 
341  VirtualRobot::RobotPtr RobotStateComponentPluginUser::addRobot(const std::string& id, VirtualRobot::RobotIO::RobotDescription loadMode, const std::string& rnsName, const std::string& nodeName)
342  {
343  return getRobotStateComponentPlugin().addRobot(id, loadMode, rnsName, nodeName);
344  }
345 
346  VirtualRobot::RobotPtr RobotStateComponentPluginUser::addRobot(const std::string& id, const std::string& filename, const Ice::StringSeq packages, VirtualRobot::RobotIO::RobotDescription loadMode, const std::string& rnsName, const std::string& nodeName)
347  {
348  return getRobotStateComponentPlugin().addRobot(id, filename, packages, loadMode, rnsName, nodeName);
349  }
350 
352  {
353  return getRobotStateComponentPlugin().getRobot(id);
354  }
355 
357  {
358  return getRobotStateComponentPlugin().getRobotData(id);
359  }
360 
361  void RobotStateComponentPluginUser::setRobotRNSAndNode(const std::string& id, const std::string& rnsName, const std::string& nodeName)
362  {
363  getRobotStateComponentPlugin().setRobotRNSAndNode(id, rnsName, nodeName);
364  }
365 
367  {
368  return getRobotStateComponentPlugin().getRobotStateComponent();
369  }
370 
372  {
373  return getRobotStateComponentPlugin().synchronizeLocalClone(robot);
374  }
375 
377  {
378  return getRobotStateComponentPlugin().synchronizeLocalClone(robot, timestamp);
379  }
380 
381  bool RobotStateComponentPluginUser::synchronizeLocalClone(const VirtualRobot::RobotPtr& robot, const RobotStateConfig& state) const
382  {
383  return getRobotStateComponentPlugin().synchronizeLocalClone(robot, state);
384  }
385 
387  {
388  return getRobotStateComponentPlugin().synchronizeLocalClone(rdata);
389  }
390 
392  {
393  return getRobotStateComponentPlugin().synchronizeLocalClone(rdata, timestamp);
394  }
395 
397  {
398  return getRobotStateComponentPlugin().synchronizeLocalClone(rdata, state);
399  }
400 
402  {
403  return getRobotStateComponentPlugin().synchronizeLocalClone(id);
404  }
405 
406  bool RobotStateComponentPluginUser::synchronizeLocalClone(const std::string& id, Ice::Long timestamp) const
407  {
408  return getRobotStateComponentPlugin().synchronizeLocalClone(id, timestamp);
409  }
410 
411  bool RobotStateComponentPluginUser::synchronizeLocalClone(const std::string& id, const RobotStateConfig& state) const
412  {
413  return getRobotStateComponentPlugin().synchronizeLocalClone(id, state);
414  }
415 
417  {
418  return getRobotStateComponentPlugin().calculateRobotDiffIK(id, targetPose, params);
419  }
420 
421  SimpleDiffIK::Reachability RobotStateComponentPluginUser::calculateRobotReachability(const std::string& id, const std::vector<Eigen::Matrix4f> targets, const Eigen::VectorXf& initialJV, const SimpleDiffIK::Parameters& params)
422  {
423  return getRobotStateComponentPlugin().calculateRobotReachability(id, targets, initialJV, params);
424  }
425 
426 }
armarx::RobotStateComponentPluginUser::calculateRobotDiffIK
SimpleDiffIK::Result calculateRobotDiffIK(const std::string &id, const Eigen::Matrix4f &targetPose, const SimpleDiffIK::Parameters &params={})
Definition: RobotStateComponentPlugin.cpp:416
RemoteRobot.h
RobotStateComponentPlugin.h
armarx::plugins::RobotStateComponentPlugin::RobotData::robot
VirtualRobot::RobotPtr robot
Definition: RobotStateComponentPlugin.h:138
armarx::SimpleDiffIK::Parameters
Definition: SimpleDiffIK.h:40
armarx::RobotStateComponentPluginUser::getRobotNameHelper
RobotNameHelperPtr getRobotNameHelper() const
Definition: RobotStateComponentPlugin.cpp:321
armarx::RemoteRobot::synchronizeLocalClone
static bool synchronizeLocalClone(VirtualRobot::RobotPtr robot, RobotStateComponentInterfacePrx robotStatePrx)
Definition: RemoteRobot.cpp:448
armarx::FramedPose
The FramedPose class.
Definition: FramedPose.h:258
armarx::RemoteRobot::createLocalCloneFromFile
static VirtualRobot::RobotPtr createLocalCloneFromFile(RobotStateComponentInterfacePrx robotStatePrx, VirtualRobot::RobotIO::RobotDescription loadMode=VirtualRobot::RobotIO::eFull)
This is a convenience function for createLocalClone, which automatically gets the filename from the R...
Definition: RemoteRobot.cpp:441
armarx::SimpleDiffIK::CalculateDiffIK
static Result CalculateDiffIK(const Eigen::Matrix4f targetPose, VirtualRobot::RobotNodeSetPtr rns, VirtualRobot::RobotNodePtr tcp=VirtualRobot::RobotNodePtr(), Parameters params=Parameters())
Definition: SimpleDiffIK.cpp:33
ARMARX_CHECK_EMPTY
#define ARMARX_CHECK_EMPTY(c)
Definition: ExpressionException.h:218
armarx::SimpleDiffIK::Reachability
Definition: SimpleDiffIK.h:81
ARMARX_CHECK_NOT_NULL
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
Definition: ExpressionException.h:206
armarx::RobotStateComponentPluginUser::getRobotData
RobotStateComponentPlugin::RobotData getRobotData(const std::string &id) const
Definition: RobotStateComponentPlugin.cpp:356
armarx::plugins::RobotStateComponentPlugin::postOnDisconnectComponent
void postOnDisconnectComponent() override
Definition: RobotStateComponentPlugin.cpp:242
armarx::plugins::RobotStateComponentPlugin::RobotData::calculateRobotDiffIK
SimpleDiffIK::Result calculateRobotDiffIK(const Eigen::Matrix4f &targetPose, const SimpleDiffIK::Parameters &params={}) const
Definition: RobotStateComponentPlugin.cpp:258
ARMARX_CHECK_NOT_EMPTY
#define ARMARX_CHECK_NOT_EMPTY(c)
Definition: ExpressionException.h:224
armarx::plugins::RobotStateComponentPlugin::getRobotStateComponentName
const std::string & getRobotStateComponentName() const
Definition: RobotStateComponentPlugin.cpp:279
armarx::RobotStateComponentPluginUser::setRobotRNSAndNode
void setRobotRNSAndNode(const std::string &id, const std::string &rnsName, const std::string &nodeName)
Definition: RobotStateComponentPlugin.cpp:361
armarx::RobotStateComponentPluginUser::getRobotStateComponent
const RobotStateComponentInterfacePrx & getRobotStateComponent() const
Definition: RobotStateComponentPlugin.cpp:317
armarx::plugins::RobotStateComponentPlugin::setRobotStateComponentName
void setRobotStateComponentName(const std::string &name)
Definition: RobotStateComponentPlugin.cpp:272
armarx::plugins::RobotStateComponentPlugin::setRobotRNSAndNode
void setRobotRNSAndNode(const std::string &id, const std::string &rnsName, const std::string &nodeName)
Definition: RobotStateComponentPlugin.cpp:125
armarx::RobotStateComponentPluginUser::addRobot
VirtualRobot::RobotPtr addRobot(const std::string &id, const VirtualRobot::RobotPtr &robot, const VirtualRobot::RobotNodeSetPtr &rns={}, const VirtualRobot::RobotNodePtr &node={})
Definition: RobotStateComponentPlugin.cpp:331
armarx::RobotStateComponentPluginUser::synchronizeLocalClone
bool synchronizeLocalClone(const VirtualRobot::RobotPtr &robot) const
Definition: RobotStateComponentPlugin.cpp:371
armarx::plugins::RobotStateComponentPlugin::setRobotStateComponent
void setRobotStateComponent(const RobotStateComponentInterfacePrx &rsc)
Definition: RobotStateComponentPlugin.cpp:38
armarx::plugins::RobotStateComponentPlugin::RobotData::node
VirtualRobot::RobotNodePtr node
Definition: RobotStateComponentPlugin.h:140
armarx::plugins::RobotStateComponentPlugin::RobotData::rns
VirtualRobot::RobotNodeSetPtr rns
Definition: RobotStateComponentPlugin.h:139
armarx::plugins::RobotStateComponentPlugin::hasRobot
bool hasRobot(const std::string &id) const
Definition: RobotStateComponentPlugin.cpp:45
armarx::plugins::RobotStateComponentPlugin::synchronizeLocalClone
bool synchronizeLocalClone(const VirtualRobot::RobotPtr &robot) const
Definition: RobotStateComponentPlugin.cpp:155
armarx::plugins::RobotStateComponentPlugin::getRobotData
RobotData getRobotData(const std::string &id) const
Definition: RobotStateComponentPlugin.cpp:118
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
armarx::plugins::RobotStateComponentPlugin::getRobotNameHelper
RobotNameHelperPtr getRobotNameHelper() const
Definition: RobotStateComponentPlugin.cpp:33
armarx::plugins::RobotStateComponentPlugin::transformFromTo
Eigen::Matrix4f transformFromTo(const std::string &from, const std::string &to, const VirtualRobot::RobotPtr &rob)
Definition: RobotStateComponentPlugin.cpp:289
armarx::RobotNameHelperPtr
std::shared_ptr< class RobotNameHelper > RobotNameHelperPtr
Definition: RobotNameHelper.h:34
armarx::plugins::RobotStateComponentPlugin::getRobot
VirtualRobot::RobotPtr getRobot(const std::string &id) const
Definition: RobotStateComponentPlugin.cpp:113
FramedPose.h
armarx::plugins
This file is part of ArmarX.
Definition: DebugObserverComponentPlugin.cpp:28
armarx::plugins::RobotStateComponentPlugin::calculateRobotReachability
SimpleDiffIK::Reachability calculateRobotReachability(const std::string &id, const std::vector< Eigen::Matrix4f > &targets, const Eigen::VectorXf &initialJV, const SimpleDiffIK::Parameters &params={}) const
Definition: RobotStateComponentPlugin.cpp:208
armarx::RobotStateComponentPluginUser::hasRobot
bool hasRobot(const std::string &id) const
Definition: RobotStateComponentPlugin.cpp:326
armarx::RobotStateComponentPluginUser::getRobotStateComponentPlugin
const RobotStateComponentPlugin & getRobotStateComponentPlugin() const
Definition: RobotStateComponentPlugin.cpp:307
armarx::plugins::RobotStateComponentPlugin::postCreatePropertyDefinitions
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
Definition: RobotStateComponentPlugin.cpp:247
armarx::RobotStateComponentPluginUser::RobotStateComponentPluginUser
RobotStateComponentPluginUser()
Definition: RobotStateComponentPlugin.cpp:303
armarx::VariantType::Long
const VariantTypeId Long
Definition: Variant.h:917
armarx::plugins::RobotStateComponentPlugin::RobotData
Definition: RobotStateComponentPlugin.h:136
filename
std::string filename
Definition: VisualizationRobot.cpp:84
armarx::plugins::RobotStateComponentPlugin::addRobot
VirtualRobot::RobotPtr addRobot(const std::string &id, const VirtualRobot::RobotPtr &robot, const VirtualRobot::RobotNodeSetPtr &rns={}, const VirtualRobot::RobotNodePtr &node={})
Definition: RobotStateComponentPlugin.cpp:51
Component.h
armarx::RobotStateComponentPluginUser::calculateRobotReachability
SimpleDiffIK::Reachability calculateRobotReachability(const std::string &id, const std::vector< Eigen::Matrix4f > targets, const Eigen::VectorXf &initialJV, const SimpleDiffIK::Parameters &params={})
Definition: RobotStateComponentPlugin.cpp:421
armarx::plugins::RobotStateComponentPlugin::getRobotStateComponent
const RobotStateComponentInterfacePrx & getRobotStateComponent() const
Definition: RobotStateComponentPlugin.cpp:150
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
ARMARX_CHECK_EXPRESSION
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
Definition: ExpressionException.h:73
armarx::SimpleDiffIK::Result
Definition: SimpleDiffIK.h:67
armarx::SimpleDiffIK::CalculateReachability
static Reachability CalculateReachability(const std::vector< Eigen::Matrix4f > targets, const Eigen::VectorXf &initialJV, VirtualRobot::RobotNodeSetPtr rns, VirtualRobot::RobotNodePtr tcp=VirtualRobot::RobotNodePtr(), Parameters params=Parameters())
Use this to check a trajectory of waypoints.
Definition: SimpleDiffIK.cpp:127
armarx::RemoteRobot::createLocalClone
VirtualRobot::RobotPtr createLocalClone()
Clones the structure of this remote robot to a local instance.
Definition: RemoteRobot.cpp:328
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::plugins::RobotStateComponentPlugin::preOnInitComponent
void preOnInitComponent() override
Definition: RobotStateComponentPlugin.cpp:217
armarx::RemoteRobot::synchronizeLocalCloneToTimestamp
static bool synchronizeLocalCloneToTimestamp(VirtualRobot::RobotPtr robot, RobotStateComponentInterfacePrx robotStatePrx, Ice::Long timestamp)
Synchronizes a local robot to a robot state at timestamp.
Definition: RemoteRobot.cpp:487
IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface >
armarx::RemoteRobot::synchronizeLocalCloneToState
static bool synchronizeLocalCloneToState(VirtualRobot::RobotPtr robot, RobotStateConfig const &state)
Definition: RemoteRobot.cpp:497
armarx::plugins::RobotStateComponentPlugin::RobotData::calculateRobotReachability
SimpleDiffIK::Reachability calculateRobotReachability(const std::vector< Eigen::Matrix4f > &targets, const Eigen::VectorXf &initialJV, const SimpleDiffIK::Parameters &params={}) const
Definition: RobotStateComponentPlugin.cpp:265
ARMARX_CHECK_NULL
#define ARMARX_CHECK_NULL(ptr)
Definition: ExpressionException.h:212
armarx::ManagedIceObjectPlugin::makePropertyName
std::string makePropertyName(const std::string &name)
Definition: ManagedIceObjectPlugin.cpp:53
armarx::plugins::RobotStateComponentPlugin::deactivate
void deactivate()
Definition: RobotStateComponentPlugin.cpp:284
armarx::plugins::RobotStateComponentPlugin
Brief description of class RobotAPIComponentPlugins.
Definition: RobotStateComponentPlugin.h:52
armarx::RobotStateComponentPluginUser::getRobot
VirtualRobot::RobotPtr getRobot(const std::string &id) const
Definition: RobotStateComponentPlugin.cpp:351
armarx::plugins::RobotStateComponentPlugin::preOnConnectComponent
void preOnConnectComponent() override
Definition: RobotStateComponentPlugin.cpp:230
armarx::plugins::RobotStateComponentPlugin::calculateRobotDiffIK
SimpleDiffIK::Result calculateRobotDiffIK(const std::string &id, const Eigen::Matrix4f &targetPose, const SimpleDiffIK::Parameters &params={}) const
Definition: RobotStateComponentPlugin.cpp:200
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18