BringObjectGroupStatechartContext.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2014-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package RobotSkillTemplates::BringObjectGroup
19 * @author Mirko Waechter ( mirko dot waechter at kit dot edu )
20 * @date 2015
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25
26#pragma once
27
31
32
33// Custom Includes
34//#include <RobotAPI/interface/units/KinematicUnitInterface.h>
35//#include <RobotAPI/interface/units/TCPControlUnit.h>
36//#include <RobotAPI/interface/observers/KinematicUnitObserverInterface.h>
37#include <VirtualRobot/VirtualRobot.h>
38
39#include <RobotAPI/interface/core/FramedPoseBase.h>
40#include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
41
42#include <MemoryX/interface/components/PriorKnowledgeInterface.h>
43#include <MemoryX/interface/components/WorkingMemoryInterface.h>
44#include <MemoryX/interface/observers/ObjectMemoryObserverInterface.h>
45//#include <ArmarXSimulation/interface/simulator/SimulatorInterface.h>
46#include <RobotAPI/interface/components/ViewSelectionInterface.h>
47
48#include <RobotComponents/interface/components/PathPlanner.h>
49
51
53{
54
56 {
59 {
60 // defineRequiredProperty<std::string>("KinematicUnitName", "Name of the kinematic unit that should be used");
61 // defineRequiredProperty<std::string>("KinematicUnitObserverName", "Name of the kinematic unit observer that should be used");
63 "RobotStateComponentName",
64 "RobotStateComponent",
65 "Name of the robot state component that should be used");
66 // defineOptionalProperty<std::string>("TCPControlUnitName", "TCPControlUnit", "Name of the tcp control unit component that should be used");
67
69 "WorkingMemoryName",
70 "WorkingMemory",
71 "Name of the WorkingMemory component that should be used");
73 "ObjectMemoryObserverName",
74 "ObjectMemoryObserver",
75 "Name of the ObjectMemoryObserver component that should be used");
77 "PriorKnowledgeName",
78 "PriorKnowledge",
79 "Name of the PriorKnowledge component that should be used");
81 "PathPlannerName",
82 "PathPlanner",
83 "Name of the Path Planner component that should be used");
85 "ViewSelectionName",
86 "ViewSelection",
87 "Name of the ViewSelection component that should be used");
88 }
89 };
90
91 /**
92 * @class BringObjectGroupStatechartContext is a custom implementation of the StatechartContext
93 * for a statechart
94 */
96 virtual public XMLStatechartContext
97 {
98 public:
99 // inherited from Component
100 std::string
101 getDefaultName() const override
102 {
103 return "BringObjectGroupStatechartContext";
104 }
105
106 void onInitStatechartContext() override;
107 void onConnectStatechartContext() override;
108
109 memoryx::WorkingMemoryInterfacePrx
111 {
112 return workingMemoryProxy;
113 }
114
115 memoryx::ObjectMemoryObserverInterfacePrx
117 {
118 return objectMemoryObserverProxy;
119 }
120
121 memoryx::PriorKnowledgeInterfacePrx
123 {
124 return priorKnowledgeProxy;
125 }
126
129 {
130 return debugDrawerTopicProxy;
131 }
132
135 {
136 return remoteRobot;
137 }
138
141 {
142 return robotStateComponent;
143 }
144
145 // KinematicUnitInterfacePrx getKinematicUnit() { return kinematicUnitPrx; }
146 // std::string getKinematicUnitObserverName() { return getProperty<std::string>("KinematicUnitObserverName").getValue(); }
147 // TCPControlUnitInterfacePrx getTCPControlUnit() { return tcpControlPrx;}
148 //SimulatorInterfacePrx getSimulatorProxy() { return simulatorPrx; }
149 PathPlannerBasePrx
151 {
152 return pathPlannerPrx;
153 }
154
155 ViewSelectionInterfacePrx
157 {
158 return viewSelection;
159 }
160
161 private:
162 /**
163 * @see PropertyUser::createPropertyDefinitions()
164 */
165 PropertyDefinitionsPtr createPropertyDefinitions() override;
166
167
168 RobotStateComponentInterfacePrx robotStateComponent;
169 // KinematicUnitInterfacePrx kinematicUnitPrx;
170 // KinematicUnitObserverInterfacePrx kinematicUnitObserverPrx;
171 // TCPControlUnitInterfacePrx tcpControlPrx;
172 VirtualRobot::RobotPtr remoteRobot;
173
174 memoryx::WorkingMemoryInterfacePrx workingMemoryProxy;
175 memoryx::ObjectMemoryObserverInterfacePrx objectMemoryObserverProxy;
176 memoryx::PriorKnowledgeInterfacePrx priorKnowledgeProxy;
177
178 armarx::DebugDrawerInterfacePrx debugDrawerTopicProxy;
179 //SimulatorInterfacePrx simulatorPrx;
180 PathPlannerBasePrx pathPlannerPrx;
181 ViewSelectionInterfacePrx viewSelection;
182 };
183
184} // namespace armarx::BringObjectGroup
#define ARMARXCOMPONENT_IMPORT_EXPORT
custom implementation of the StatechartContext for a statechart
std::string getDefaultName() const override
Retrieve default name of component.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
std::shared_ptr< class Robot > RobotPtr
Definition Bus.h:19
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx