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 
25 #include <VirtualRobot/Robot.h>
26 #include <VirtualRobot/RobotNodeSet.h>
27 #include <VirtualRobot/XML/RobotIO.h>
28 
30 
33 
34 namespace armarx::plugins
35 {
38  {
39  ARMARX_CHECK_NOT_NULL(_nameHelper);
40  return _nameHelper;
41  }
42 
43  void
45  {
47  ARMARX_CHECK_NULL(_robotStateComponent);
48  _robotStateComponent = rsc;
49  }
50 
51  bool
52  RobotStateComponentPlugin::hasRobot(const std::string& id) const
53  {
54  std::lock_guard g{_robotsMutex};
55  return _robots.count(id);
56  }
57 
59  RobotStateComponentPlugin::addRobot(const std::string& id,
60  const VirtualRobot::RobotPtr& robot,
61  const VirtualRobot::RobotNodeSetPtr& rns,
62  const VirtualRobot::RobotNodePtr& node)
63  {
64  ARMARX_CHECK_NOT_NULL(robot);
65  if (rns)
66  {
67  ARMARX_CHECK_EXPRESSION(robot == rns->getRobot());
68  }
69  if (node)
70  {
71  ARMARX_CHECK_EXPRESSION(robot == node->getRobot());
72  }
73  std::lock_guard g {_robotsMutex};
74  ARMARX_CHECK_EXPRESSION(!hasRobot(id)) << "Robot with id '" << id << "' was already added";
75  if (rns && !node)
76  {
77  _robots[id] = {robot, rns, rns->getTCP()};
78  }
79  else
80  {
81  _robots[id] = {robot, rns, node};
82  }
83  return robot;
84  }
85 
87  RobotStateComponentPlugin::addRobot(const std::string& id,
88  const VirtualRobot::RobotPtr& robot,
89  const std::string& rnsName,
90  const std::string& nodeName)
91  {
92  ARMARX_CHECK_NOT_NULL(robot) << "robot added with id '" << id << "' is null";
93  VirtualRobot::RobotNodeSetPtr rns;
94  VirtualRobot::RobotNodePtr node;
95  if (!rnsName.empty())
96  {
97  rns = robot->getRobotNodeSet(rnsName);
98  ARMARX_CHECK_NOT_NULL(rns) << "The robot has no node set with name '" << rnsName
99  << "'. Available RNS: " << robot->getRobotNodeSetNames();
100  }
101  if (!nodeName.empty())
102  {
103  auto node = robot->getRobotNode(nodeName);
104  ARMARX_CHECK_NOT_NULL(node) << "The robot has no node with name '" << nodeName
105  << "'. Available nodes: " << robot->getRobotNodeNames();
106  }
107  else if (rns)
108  {
109  node = rns->getTCP();
110  }
111  return addRobot(id, robot, rns, node);
112  }
113 
115  RobotStateComponentPlugin::addRobot(const std::string& id,
116  VirtualRobot::RobotIO::RobotDescription loadMode,
117  const std::string& rnsName,
118  const std::string& nodeName)
119  {
120  return addRobot(id,
121  RemoteRobot::createLocalCloneFromFile(_robotStateComponent, loadMode),
122  rnsName,
123  nodeName);
124  }
125 
127  RobotStateComponentPlugin::addRobot(const std::string& id,
128  const std::string& filename,
129  const Ice::StringSeq packages,
130  VirtualRobot::RobotIO::RobotDescription loadMode,
131  const std::string& rnsName,
132  const std::string& nodeName)
133  {
134  return addRobot(
135  id,
136  RemoteRobot::createLocalClone(_robotStateComponent, filename, packages, loadMode),
137  rnsName,
138  nodeName);
139  }
140 
142  RobotStateComponentPlugin::getRobot(const std::string& id) const
143  {
144  return getRobotData(id).robot;
145  }
146 
148  RobotStateComponentPlugin::getRobotData(const std::string& id) const
149  {
150  std::lock_guard g{_robotsMutex};
151  ARMARX_CHECK_EXPRESSION(hasRobot(id)) << "No robot with id '" << id << "' loaded";
152  return _robots.at(id);
153  }
154 
155  void
157  const std::string& rnsName,
158  const std::string& nodeName)
159  {
160  std::lock_guard g{_robotsMutex};
161  ARMARX_CHECK_EXPRESSION(hasRobot(id)) << "No robot with id '" << id << "' loaded";
162  auto& r = _robots.at(id);
163  ARMARX_CHECK_EXPRESSION(!rnsName.empty())
164  << "There was no robot node set specified! "
165  << "Available RNS: " << r.robot->getRobotNodeSetNames();
166  auto rns = r.robot->getRobotNodeSet(rnsName);
167  ARMARX_CHECK_NOT_NULL(rns) << "The robot has no node set with name '" << rnsName
168  << "'. Available RNS: " << r.robot->getRobotNodeSetNames();
169  if (nodeName.empty())
170  {
171  r.rns = rns;
172  r.node = rns->getTCP();
173  }
174  else
175  {
176  auto node = r.robot->getRobotNode(nodeName);
177  ARMARX_CHECK_NOT_NULL(node) << "The robot has no node with name '" << nodeName
178  << "'. Available nodes: " << r.robot->getRobotNodeNames();
179  r.rns = rns;
180  r.node = node;
181  }
182  }
183 
186  {
187  return _robotStateComponent;
188  }
189 
190  bool
192  {
193  return RemoteRobot::synchronizeLocalClone(robot, _robotStateComponent);
194  }
195 
196  bool
198  Ice::Long timestamp) const
199  {
201  robot, _robotStateComponent, timestamp);
202  }
203 
204  bool
206  const RobotStateConfig& state) const
207  {
208  return RemoteRobot::synchronizeLocalCloneToState(robot, state);
209  }
210 
211  bool
213  {
214  return synchronizeLocalClone(rdata.robot);
215  }
216 
217  bool
219  Ice::Long timestamp) const
220  {
221  return synchronizeLocalClone(rdata.robot, timestamp);
222  }
223 
224  bool
226  const RobotStateConfig& state) const
227  {
228  return synchronizeLocalClone(rdata.robot, state);
229  }
230 
231  bool
233  {
234  return synchronizeLocalClone(getRobot(id));
235  }
236 
237  bool
239  Ice::Long timestamp) const
240  {
241  return synchronizeLocalClone(getRobot(id), timestamp);
242  }
243 
244  bool
246  const RobotStateConfig& state) const
247  {
248  return synchronizeLocalClone(getRobot(id), state);
249  }
250 
253  const Eigen::Matrix4f& targetPose,
254  const SimpleDiffIK::Parameters& params) const
255  {
256  return getRobotData(id).calculateRobotDiffIK(targetPose, params);
257  }
258 
261  const std::string& id,
262  const std::vector<Eigen::Matrix4f>& targets,
263  const Eigen::VectorXf& initialJV,
264  const SimpleDiffIK::Parameters& params) const
265  {
266  return getRobotData(id).calculateRobotReachability(targets, initialJV, params);
267  }
268 
269  void
271  {
272  if (!_deactivated && !_robotStateComponent && _robotStateComponentName.empty())
273  {
274  parent<Component>().getProperty(_robotStateComponentName,
275  makePropertyName(_propertyName));
276  }
277 
278  if (!_deactivated && !_robotStateComponent)
279  {
280  parent<Component>().usingProxy(_robotStateComponentName);
281  }
282  }
283 
284  void
286  {
287  if (!_deactivated && !_robotStateComponent)
288  {
289  parent<Component>().getProxy(_robotStateComponent, _robotStateComponentName);
290  }
291  if (!_deactivated)
292  {
293  _nameHelper = std::make_shared<RobotNameHelper>(_robotStateComponent->getRobotInfo());
294  }
295  }
296 
297  void
299  {
300  _robotStateComponent = nullptr;
301  }
302 
303  void
305  {
306  if (!properties->hasDefinition(makePropertyName(_propertyName)))
307  {
308  properties->defineOptionalProperty<std::string>(makePropertyName(_propertyName),
309  "RobotStateComponent",
310  "Name of the robot state component");
311  }
312  }
313 
316  const Eigen::Matrix4f& targetPose,
317  const SimpleDiffIK::Parameters& params) const
318  {
319  ARMARX_CHECK_NOT_NULL(rns) << "No robot node set configured for the robot";
320  ARMARX_CHECK_NOT_NULL(node) << "No tcp configured for the robot";
321  return SimpleDiffIK::CalculateDiffIK(targetPose, rns, node, params);
322  }
323 
326  const std::vector<Eigen::Matrix4f>& targets,
327  const Eigen::VectorXf& initialJV,
328  const SimpleDiffIK::Parameters& params) const
329  {
330  ARMARX_CHECK_NOT_NULL(rns) << "No robot node set configured for the robot";
331  ARMARX_CHECK_NOT_NULL(node) << "No tcp configured for the robot ";
332  return SimpleDiffIK::CalculateReachability(targets, initialJV, rns, node, params);
333  }
334 
335  void
337  {
339  ARMARX_CHECK_EMPTY(_robotStateComponentName);
340  _robotStateComponentName = name;
341  }
342 
343  const std::string&
345  {
346  return _robotStateComponentName;
347  }
348 
349  void
351  {
352  _deactivated = true;
353  }
354 
357  const std::string& to,
358  const VirtualRobot::RobotPtr& rob)
359  {
361  armarx::FramedPose fp{Eigen::Matrix4f::Identity(), from, rob->getName()};
362  fp.changeFrame(rob, to);
363  return fp.toEigen();
364  }
365 } // namespace armarx::plugins
366 
367 namespace armarx
368 {
370  {
371  addPlugin(_robotStateComponentPlugin);
372  }
373 
376  {
377  return *_robotStateComponentPlugin;
378  }
379 
382  {
383  return *_robotStateComponentPlugin;
384  }
385 
388  {
389  return getRobotStateComponentPlugin().getRobotStateComponent();
390  }
391 
394  {
395  return getRobotStateComponentPlugin().getRobotNameHelper();
396  }
397 
398  bool
399  RobotStateComponentPluginUser::hasRobot(const std::string& id) const
400  {
401  return getRobotStateComponentPlugin().hasRobot(id);
402  }
403 
406  const VirtualRobot::RobotPtr& robot,
407  const VirtualRobot::RobotNodeSetPtr& rns,
408  const VirtualRobot::RobotNodePtr& node)
409  {
410  return getRobotStateComponentPlugin().addRobot(id, robot, rns, node);
411  }
412 
415  const VirtualRobot::RobotPtr& robot,
416  const std::string& rnsName,
417  const std::string& nodeName)
418  {
419  return getRobotStateComponentPlugin().addRobot(id, robot, rnsName, nodeName);
420  }
421 
424  VirtualRobot::RobotIO::RobotDescription loadMode,
425  const std::string& rnsName,
426  const std::string& nodeName)
427  {
428  return getRobotStateComponentPlugin().addRobot(id, loadMode, rnsName, nodeName);
429  }
430 
433  const std::string& filename,
434  const Ice::StringSeq packages,
435  VirtualRobot::RobotIO::RobotDescription loadMode,
436  const std::string& rnsName,
437  const std::string& nodeName)
438  {
439  return getRobotStateComponentPlugin().addRobot(
440  id, filename, packages, loadMode, rnsName, nodeName);
441  }
442 
444  RobotStateComponentPluginUser::getRobot(const std::string& id) const
445  {
446  return getRobotStateComponentPlugin().getRobot(id);
447  }
448 
450  RobotStateComponentPluginUser::getRobotData(const std::string& id) const
451  {
452  return getRobotStateComponentPlugin().getRobotData(id);
453  }
454 
455  void
457  const std::string& rnsName,
458  const std::string& nodeName)
459  {
460  getRobotStateComponentPlugin().setRobotRNSAndNode(id, rnsName, nodeName);
461  }
462 
465  {
466  return getRobotStateComponentPlugin().getRobotStateComponent();
467  }
468 
469  bool
471  {
472  return getRobotStateComponentPlugin().synchronizeLocalClone(robot);
473  }
474 
475  bool
477  Ice::Long timestamp) const
478  {
479  return getRobotStateComponentPlugin().synchronizeLocalClone(robot, timestamp);
480  }
481 
482  bool
484  const RobotStateConfig& state) const
485  {
486  return getRobotStateComponentPlugin().synchronizeLocalClone(robot, state);
487  }
488 
489  bool
492  {
493  return getRobotStateComponentPlugin().synchronizeLocalClone(rdata);
494  }
495 
496  bool
499  Ice::Long timestamp) const
500  {
501  return getRobotStateComponentPlugin().synchronizeLocalClone(rdata, timestamp);
502  }
503 
504  bool
507  const RobotStateConfig& state) const
508  {
509  return getRobotStateComponentPlugin().synchronizeLocalClone(rdata, state);
510  }
511 
512  bool
514  {
515  return getRobotStateComponentPlugin().synchronizeLocalClone(id);
516  }
517 
518  bool
520  Ice::Long timestamp) const
521  {
522  return getRobotStateComponentPlugin().synchronizeLocalClone(id, timestamp);
523  }
524 
525  bool
527  const RobotStateConfig& state) const
528  {
529  return getRobotStateComponentPlugin().synchronizeLocalClone(id, state);
530  }
531 
534  const Eigen::Matrix4f& targetPose,
535  const SimpleDiffIK::Parameters& params)
536  {
537  return getRobotStateComponentPlugin().calculateRobotDiffIK(id, targetPose, params);
538  }
539 
542  const std::string& id,
543  const std::vector<Eigen::Matrix4f> targets,
544  const Eigen::VectorXf& initialJV,
545  const SimpleDiffIK::Parameters& params)
546  {
547  return getRobotStateComponentPlugin().calculateRobotReachability(
548  id, targets, initialJV, params);
549  }
550 
551 } // namespace armarx
armarx::RobotStateComponentPluginUser::calculateRobotDiffIK
SimpleDiffIK::Result calculateRobotDiffIK(const std::string &id, const Eigen::Matrix4f &targetPose, const SimpleDiffIK::Parameters &params={})
Definition: RobotStateComponentPlugin.cpp:533
RemoteRobot.h
RobotStateComponentPlugin.h
armarx::plugins::RobotStateComponentPlugin::RobotData::robot
VirtualRobot::RobotPtr robot
Definition: RobotStateComponentPlugin.h:136
armarx::SimpleDiffIK::Parameters
Definition: SimpleDiffIK.h:39
armarx::RobotStateComponentPluginUser::getRobotNameHelper
RobotNameHelperPtr getRobotNameHelper() const
Definition: RobotStateComponentPlugin.cpp:393
armarx::RemoteRobot::synchronizeLocalClone
static bool synchronizeLocalClone(VirtualRobot::RobotPtr robot, RobotStateComponentInterfacePrx robotStatePrx)
Definition: RemoteRobot.cpp:522
armarx::FramedPose
The FramedPose class.
Definition: FramedPose.h:280
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:512
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:650
armarx::SimpleDiffIK::CalculateDiffIK
static Result CalculateDiffIK(const Eigen::Matrix4f targetPose, VirtualRobot::RobotNodeSetPtr rns, VirtualRobot::RobotNodePtr tcp=VirtualRobot::RobotNodePtr(), Parameters params=Parameters())
Definition: SimpleDiffIK.cpp:37
ARMARX_CHECK_EMPTY
#define ARMARX_CHECK_EMPTY(c)
Definition: ExpressionException.h:218
armarx::SimpleDiffIK::Reachability
Definition: SimpleDiffIK.h:83
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:450
armarx::plugins::RobotStateComponentPlugin::postOnDisconnectComponent
void postOnDisconnectComponent() override
Definition: RobotStateComponentPlugin.cpp:298
armarx::plugins::RobotStateComponentPlugin::RobotData::calculateRobotDiffIK
SimpleDiffIK::Result calculateRobotDiffIK(const Eigen::Matrix4f &targetPose, const SimpleDiffIK::Parameters &params={}) const
Definition: RobotStateComponentPlugin.cpp:315
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:344
armarx::RobotStateComponentPluginUser::setRobotRNSAndNode
void setRobotRNSAndNode(const std::string &id, const std::string &rnsName, const std::string &nodeName)
Definition: RobotStateComponentPlugin.cpp:456
armarx::RobotStateComponentPluginUser::getRobotStateComponent
const RobotStateComponentInterfacePrx & getRobotStateComponent() const
Definition: RobotStateComponentPlugin.cpp:387
armarx::plugins::RobotStateComponentPlugin::setRobotStateComponentName
void setRobotStateComponentName(const std::string &name)
Definition: RobotStateComponentPlugin.cpp:336
armarx::plugins::RobotStateComponentPlugin::setRobotRNSAndNode
void setRobotRNSAndNode(const std::string &id, const std::string &rnsName, const std::string &nodeName)
Definition: RobotStateComponentPlugin.cpp:156
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:405
armarx::RobotStateComponentPluginUser::synchronizeLocalClone
bool synchronizeLocalClone(const VirtualRobot::RobotPtr &robot) const
Definition: RobotStateComponentPlugin.cpp:470
armarx::plugins::RobotStateComponentPlugin::setRobotStateComponent
void setRobotStateComponent(const RobotStateComponentInterfacePrx &rsc)
Definition: RobotStateComponentPlugin.cpp:44
armarx::RobotStateComponentInterfacePrx
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx
Definition: RobotVisuWidget.h:64
armarx::plugins::RobotStateComponentPlugin::RobotData::node
VirtualRobot::RobotNodePtr node
Definition: RobotStateComponentPlugin.h:138
armarx::plugins::RobotStateComponentPlugin::RobotData::rns
VirtualRobot::RobotNodeSetPtr rns
Definition: RobotStateComponentPlugin.h:137
armarx::plugins::RobotStateComponentPlugin::hasRobot
bool hasRobot(const std::string &id) const
Definition: RobotStateComponentPlugin.cpp:52
armarx::plugins::RobotStateComponentPlugin::synchronizeLocalClone
bool synchronizeLocalClone(const VirtualRobot::RobotPtr &robot) const
Definition: RobotStateComponentPlugin.cpp:191
armarx::plugins::RobotStateComponentPlugin::getRobotData
RobotData getRobotData(const std::string &id) const
Definition: RobotStateComponentPlugin.cpp:148
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:570
armarx::plugins::RobotStateComponentPlugin::getRobotNameHelper
RobotNameHelperPtr getRobotNameHelper() const
Definition: RobotStateComponentPlugin.cpp:37
armarx::plugins::RobotStateComponentPlugin::transformFromTo
Eigen::Matrix4f transformFromTo(const std::string &from, const std::string &to, const VirtualRobot::RobotPtr &rob)
Definition: RobotStateComponentPlugin.cpp:356
armarx::RobotNameHelperPtr
std::shared_ptr< class RobotNameHelper > RobotNameHelperPtr
Definition: RobotNameHelper.h:32
armarx::plugins::RobotStateComponentPlugin::getRobot
VirtualRobot::RobotPtr getRobot(const std::string &id) const
Definition: RobotStateComponentPlugin.cpp:142
FramedPose.h
armarx::plugins
This file is part of ArmarX.
Definition: DebugObserverComponentPlugin.cpp:27
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:260
armarx::RobotStateComponentPluginUser::hasRobot
bool hasRobot(const std::string &id) const
Definition: RobotStateComponentPlugin.cpp:399
armarx::RobotStateComponentPluginUser::getRobotStateComponentPlugin
const RobotStateComponentPlugin & getRobotStateComponentPlugin() const
Definition: RobotStateComponentPlugin.cpp:375
armarx::plugins::RobotStateComponentPlugin::postCreatePropertyDefinitions
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
Definition: RobotStateComponentPlugin.cpp:304
armarx::RobotStateComponentPluginUser::RobotStateComponentPluginUser
RobotStateComponentPluginUser()
Definition: RobotStateComponentPlugin.cpp:369
armarx::VariantType::Long
const VariantTypeId Long
Definition: Variant.h:918
armarx::plugins::RobotStateComponentPlugin::RobotData
Definition: RobotStateComponentPlugin.h:134
filename
std::string filename
Definition: VisualizationRobot.cpp:86
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:59
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:541
armarx::plugins::RobotStateComponentPlugin::getRobotStateComponent
const RobotStateComponentInterfacePrx & getRobotStateComponent() const
Definition: RobotStateComponentPlugin.cpp:185
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:70
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:140
armarx::RemoteRobot::createLocalClone
VirtualRobot::RobotPtr createLocalClone()
Clones the structure of this remote robot to a local instance.
Definition: RemoteRobot.cpp:381
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::plugins::RobotStateComponentPlugin::preOnInitComponent
void preOnInitComponent() override
Definition: RobotStateComponentPlugin.cpp:270
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:566
IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface >
armarx::RemoteRobot::synchronizeLocalCloneToState
static bool synchronizeLocalCloneToState(VirtualRobot::RobotPtr robot, RobotStateConfig const &state)
Definition: RemoteRobot.cpp:579
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:325
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:56
armarx::plugins::RobotStateComponentPlugin::deactivate
void deactivate()
Definition: RobotStateComponentPlugin.cpp:350
armarx::plugins::RobotStateComponentPlugin
Brief description of class RobotAPIComponentPlugins.
Definition: RobotStateComponentPlugin.h:51
armarx::RobotStateComponentPluginUser::getRobot
VirtualRobot::RobotPtr getRobot(const std::string &id) const
Definition: RobotStateComponentPlugin.cpp:444
armarx::plugins::RobotStateComponentPlugin::preOnConnectComponent
void preOnConnectComponent() override
Definition: RobotStateComponentPlugin.cpp:285
armarx::plugins::RobotStateComponentPlugin::calculateRobotDiffIK
SimpleDiffIK::Result calculateRobotDiffIK(const std::string &id, const Eigen::Matrix4f &targetPose, const SimpleDiffIK::Parameters &params={}) const
Definition: RobotStateComponentPlugin.cpp:252
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:19