29 #include <RobotComponents/interface/components/GraspingManager/RobotPlacementInterface.h>
30 #include <MemoryX/interface/memorytypes/MemorySegments.h>
31 #include <MemoryX/interface/components/WorkingMemoryInterface.h>
33 #include <RobotAPI/interface/core/RobotState.h>
35 #include <VirtualRobot/Workspace/WorkspaceGrid.h>
36 #include <RobotComponents/interface/components/RobotIK.h>
37 #include <VirtualRobot/Workspace/Manipulability.h>
38 #include <VirtualRobot/Workspace/Reachability.h>
39 #include <VirtualRobot/SceneObjectSet.h>
42 #include <MemoryX/interface/gui/EntityDrawerInterface.h>
43 #include <VirtualRobot/CollisionDetection/CDManager.h>
49 #include <Eigen/Geometry>
88 virtual public RobotPlacementInterface
96 return "SimpleRobotPlacement";
119 GraspingPlacementList
generateRobotPlacements(
const GeneratedGraspList& grasps,
const Ice::Current&
c = Ice::emptyCurrent)
override;
135 GraspingPlacementList
generateRobotPlacementsEx(
const GeneratedGraspList& grasps,
const Ice::Current&
c = Ice::emptyCurrent)
override;
174 memoryx::WorkingMemoryInterfacePrx wm;
175 memoryx::WorkingMemoryEntitySegmentBasePrx objectInstances;
176 memoryx::AgentInstancesSegmentBasePrx agentInstances;
177 memoryx::PriorKnowledgeInterfacePrx prior;
178 memoryx::PersistentObjectClassSegmentBasePrx objectClasses;
182 std::string robotName;
183 std::string robotFilePath;
184 std::string colModel;
185 std::vector<std::string> workspaceFilePaths;
186 std::vector<VirtualRobot::WorkspaceRepresentationPtr> workspaces;
187 std::string drawRobotId;
188 std::string visuLayerName;
189 VirtualRobot::WorkspaceGridPtr visualizedGrid;
192 memoryx::EntityDrawerInterfacePrx entityDrawerPrx;
193 RobotIKInterfacePrx rik;
197 VirtualRobot::SceneObjectSetPtr sceneObjects;
202 std::vector<CSpaceVisualizerTaskHandle> planningTasks;
205 VirtualRobot::WorkspaceGridPtr createWorkspaceGrid(GeneratedGrasp g,
const Eigen::Matrix4f& globalObjectPose);
206 void drawWorkspaceGrid(VirtualRobot::WorkspaceGridPtr reachGrid);
208 bool getSuitablePosition(
const GeneratedGrasp& g, VirtualRobot::WorkspaceGridPtr reachGrid,
const Eigen::Matrix4f& globalGraspPose,
float& storeGlobalX,
float& storeGlobalY,
float& storeGlobalYaw,
int& score,
const VirtualRobot::MathTools::ConvexHull2DPtr& placementArea = VirtualRobot::MathTools::ConvexHull2DPtr());
210 std::vector<RobotPlacement> getSuitablePositions(
const GeneratedGrasp& g, VirtualRobot::WorkspaceGridPtr reachGrid,
const Eigen::Matrix4f& globalGraspPose,
float requiredReachabilityFraction,
int requiredCount,
int maxIterations,
const VirtualRobot::MathTools::ConvexHull2DPtr& placementArea = VirtualRobot::MathTools::ConvexHull2DPtr());
214 void loadWorkspaces();
216 bool hasWorkspace(std::string tcp);
218 GeneratedGraspList filterGrasps(
const GeneratedGraspList grasps);
222 void updateRobot(std::string
id,
Eigen::Matrix4f globalPose, DrawColor color);
224 void drawWorkspaceGrid(const ::armarx::GeneratedGrasp&,
const std::string& objectInstanceEntityId);