34 #define DEFAULT_SETTINGS_AGENT_INSTANCES_SEGMENT_NAME "agentInstances"
41 CoupledInteractionGroupStatechartContext::onInitStatechartContext()
48 usingProxy(getProperty<std::string>(
"KinematicUnitName").getValue());
49 usingProxy(getProperty<std::string>(
"KinematicUnitObserverName").getValue());
50 usingProxy(getProperty<std::string>(
"RobotStateComponentName").getValue());
51 usingProxy(getProperty<std::string>(
"TCPControlUnitName").getValue());
52 usingProxy(getProperty<std::string>(
"TCPControlUnitObserverName").getValue());
53 usingProxy(getProperty<std::string>(
"WorkingMemoryName").getValue());
54 usingProxy(getProperty<std::string>(
"ObjectMemoryObserverName").getValue());
55 usingProxy(getProperty<std::string>(
"PriorKnowledgeName").getValue());
56 usingProxy(getProperty<std::string>(
"ViewSelectionName").getValue());
57 usingProxy(getProperty<std::string>(
"ForceTorqueObserverName").getValue());
58 platformUnitObserverName = getProperty<std::string>(
"PlatformUnitObserverName").getValue();
59 platformUnitName = getProperty<std::string>(
"PlatformUnitName").getValue();
60 ARMARX_INFO <<
"Using platform unit:" << platformUnitName
61 <<
", platform observer:" << platformUnitObserverName;
63 usingProxy(platformUnitName);
64 usingProxy(platformUnitObserverName);
66 offeringTopic(
"DebugDrawerUpdates");
70 CoupledInteractionGroupStatechartContext::onConnectStatechartContext()
82 robotStateComponent = getProxy<RobotStateComponentInterfacePrx>(
83 getProperty<std::string>(
"RobotStateComponentName").getValue());
84 kinematicUnitPrx = getProxy<KinematicUnitInterfacePrx>(
85 getProperty<std::string>(
"KinematicUnitName").getValue());
86 kinematicUnitObserverPrx = getProxy<KinematicUnitObserverInterfacePrx>(
87 getProperty<std::string>(
"KinematicUnitObserverName").getValue());
88 tcpControlPrx = getProxy<TCPControlUnitInterfacePrx>(
89 getProperty<std::string>(
"TCPControlUnitName").getValue());
90 tcpControlUnitObserverPrx = getProxy<TCPControlUnitObserverInterfacePrx>(
91 getProperty<std::string>(
"TCPControlUnitObserverName").getValue());
92 workingMemoryProxy = getProxy<memoryx::WorkingMemoryInterfacePrx>(
93 getProperty<std::string>(
"WorkingMemoryName").getValue());
94 objectMemoryObserverProxy = getProxy<memoryx::ObjectMemoryObserverInterfacePrx>(
95 getProperty<std::string>(
"ObjectMemoryObserverName").getValue());
96 priorKnowledgeProxy = getProxy<memoryx::PriorKnowledgeInterfacePrx>(
97 getProperty<std::string>(
"PriorKnowledgeName").getValue());
100 platformUnitPrx = getProxy<PlatformUnitInterfacePrx>(platformUnitName);
101 platformUnitObserverPrx =
102 getProxy<PlatformUnitObserverInterfacePrx>(platformUnitObserverName);
103 viewSelectionProxy = getProxy<ViewSelectionInterfacePrx>(
104 getProperty<std::string>(
"ViewSelectionName").getValue());
105 ftUnitObserverPrx = getProxy<ForceTorqueUnitObserverInterfacePrx>(
106 getProperty<std::string>(
"ForceTorqueObserverName").getValue());
109 remoteRobot.reset(
new RemoteRobot(robotStateComponent->getSynchronizedRobot()));
111 debugDrawerTopicProxy = getTopic<armarx::DebugDrawerInterfacePrx>(
"DebugDrawerUpdates");
122 AgentInstancesSegmentBasePrx agentInstancesProxy =
123 AgentInstancesSegmentBasePrx::uncheckedCast(
126 if (agentInstancesProxy)
128 agent = AgentInstancePtr::dynamicCast(
129 agentInstancesProxy->getAgentInstanceByName(
"Armar3"));
138 CoupledInteractionGroupStatechartContext::getRobotPose()
153 robotPose.block<3,1>(0, 3) = agentPosition->toEigen();
158 if (agentOrientation)
160 robotPose.block<3, 3>(0, 0) = agentOrientation->toEigen();
168 CoupledInteractionGroupStatechartContext::createPropertyDefinitions()