29 AgentInstancesSegmentBase::AgentInstancesSegmentBase(),
35 AgentInstanceBaseList result;
37 result.reserve(allEntities.size());
39 for (
auto&& entity : allEntities)
41 AgentInstanceBasePtr agentEntity = AgentInstanceBasePtr::dynamicCast(std::move(entity));
45 ARMARX_WARNING_S <<
"Entity with id " << entity->getId() <<
" is not of type AgentInstance!";
49 result.push_back(std::move(agentEntity));
62 AgentInstanceBasePtr res = AgentInstanceBasePtr::dynamicCast(entity);
66 ARMARX_WARNING_S <<
"Entity with id " <<
id <<
" is not of type AgentInstance!";
79 AgentInstanceBasePtr res = AgentInstanceBasePtr::dynamicCast(entity);
83 ARMARX_WARNING_S <<
"Entity with name '" << name <<
"' is not of type AgentEntity!";
111 auto robotPrx = agent->getSharedRobot();
115 ARMARX_ERROR_S <<
"Could not create proxy to robot state - proxy string was : " << agent->getStringifiedSharedRobotInterfaceProxy() <<
" for agent " << agentName;
119 localPoseCast->changeFrame(robotPrx, robotPrx->getRootNode()->getName());
120 Eigen::Matrix4f objectPoseGlobal = agentPose->toEigen() * localPoseCast->toEigen();
142 auto robotPrx = agent->getSharedRobot();
146 ARMARX_ERROR_S <<
"Could not create proxy to robot state - proxy string was : " << agent->getStringifiedSharedRobotInterfaceProxy();
150 worldPoseCast->changeFrame(robotPrx, robotPrx->getRootNode()->getName());
151 Eigen::Matrix4f objectPoseLocal = worldPoseCast->toEigen() * agentPose->toEigen().inverse();
154 p->changeFrame(robotPrx, targetFrame);
209 auto robotPrx = agentInstance->getSharedRobot();
216 robotPrx->setGlobalPose(pose);