42 _robotStateComponent = rsc;
47 std::lock_guard {_robotsMutex};
48 return _robots.count(
id);
62 std::lock_guard {_robotsMutex};
66 _robots[id] = {robot, rns, rns->getTCP()};
70 _robots[id] = {robot, rns, node};
78 VirtualRobot::RobotNodeSetPtr rns;
79 VirtualRobot::RobotNodePtr node;
82 rns = robot->getRobotNodeSet(rnsName);
84 <<
"'. Available RNS: " << robot->getRobotNodeSetNames();
86 if (!nodeName.empty())
88 auto node = robot->getRobotNode(nodeName);
90 <<
"'. Available nodes: " << robot->getRobotNodeNames();
96 return addRobot(
id, robot, rns, node);
120 std::lock_guard {_robotsMutex};
122 return _robots.at(
id);
127 std::lock_guard {_robotsMutex};
129 auto& r = _robots.at(
id);
131 <<
"Available RNS: " << r.robot->getRobotNodeSetNames();
132 auto rns = r.robot->getRobotNodeSet(rnsName);
134 <<
"'. Available RNS: " << r.robot->getRobotNodeSetNames();
135 if (nodeName.empty())
138 r.node = rns->getTCP();
142 auto node = r.robot->getRobotNode(nodeName);
144 <<
"'. Available nodes: " << r.robot->getRobotNodeNames();
152 return _robotStateComponent;
201 const std::string&
id,
209 const std::string&
id,
210 const std::vector<Eigen::Matrix4f>& targets,
211 const Eigen::VectorXf& initialJV,
219 if (!_deactivated && !_robotStateComponent && _robotStateComponentName.empty())
221 parent<Component>().getProperty(_robotStateComponentName,
makePropertyName(_propertyName));
224 if (!_deactivated && !_robotStateComponent)
226 parent<Component>().usingProxy(_robotStateComponentName);
232 if (!_deactivated && !_robotStateComponent)
234 parent<Component>().getProxy(_robotStateComponent, _robotStateComponentName);
238 _nameHelper = std::make_shared<RobotNameHelper>(_robotStateComponent->getRobotInfo());
244 _robotStateComponent =
nullptr;
251 properties->defineOptionalProperty<std::string>(
253 "RobotStateComponent",
254 "Name of the robot state component");
276 _robotStateComponentName = name;
281 return _robotStateComponentName;
290 const std::string& from,
291 const std::string& to,
296 fp.changeFrame(rob, to);
305 addPlugin(_robotStateComponentPlugin);
309 return *_robotStateComponentPlugin;
314 return *_robotStateComponentPlugin;
319 return getRobotStateComponentPlugin().getRobotStateComponent();
323 return getRobotStateComponentPlugin().getRobotNameHelper();
328 return getRobotStateComponentPlugin().hasRobot(
id);
333 return getRobotStateComponentPlugin().addRobot(
id, robot, rns, node);
338 return getRobotStateComponentPlugin().addRobot(
id, robot, rnsName, nodeName);
343 return getRobotStateComponentPlugin().addRobot(
id, loadMode, rnsName, nodeName);
348 return getRobotStateComponentPlugin().addRobot(
id,
filename, packages, loadMode, rnsName, nodeName);
353 return getRobotStateComponentPlugin().getRobot(
id);
358 return getRobotStateComponentPlugin().getRobotData(
id);
363 getRobotStateComponentPlugin().setRobotRNSAndNode(
id, rnsName, nodeName);
368 return getRobotStateComponentPlugin().getRobotStateComponent();
373 return getRobotStateComponentPlugin().synchronizeLocalClone(robot);
378 return getRobotStateComponentPlugin().synchronizeLocalClone(robot, timestamp);
383 return getRobotStateComponentPlugin().synchronizeLocalClone(robot, state);
388 return getRobotStateComponentPlugin().synchronizeLocalClone(rdata);
393 return getRobotStateComponentPlugin().synchronizeLocalClone(rdata, timestamp);
398 return getRobotStateComponentPlugin().synchronizeLocalClone(rdata, state);
403 return getRobotStateComponentPlugin().synchronizeLocalClone(
id);
408 return getRobotStateComponentPlugin().synchronizeLocalClone(
id, timestamp);
413 return getRobotStateComponentPlugin().synchronizeLocalClone(
id, state);
418 return getRobotStateComponentPlugin().calculateRobotDiffIK(
id, targetPose, params);
423 return getRobotStateComponentPlugin().calculateRobotReachability(
id, targets, initialJV, params);