Go to the documentation of this file.
29 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
32 #include <VisionX/interface/components/PointCloudSegmenter.h>
33 #include <VisionX/interface/components/AffordancePipelineVisualization.h>
36 #include <AffordanceKit/primitives/Plane.h>
37 #include <AffordanceKit/primitives/Cylinder.h>
38 #include <AffordanceKit/primitives/Sphere.h>
39 #include <AffordanceKit/primitives/Box.h>
41 #include <MemoryX/interface/components/WorkingMemoryInterface.h>
46 #include <Eigen/Eigen>
47 #include <IceUtil/IceUtil.h>
64 defineOptionalProperty<std::string>(
"WorkingMemoryName",
"WorkingMemory",
"Name of WorkingMemory component");
65 defineOptionalProperty<std::string>(
"DebugDrawerTopicName",
"DebugDrawerUpdates",
"The name of the debug drawer topic");
66 defineOptionalProperty<std::string>(
"DebugDrawerSelectionsTopicName",
"DebugDrawerSelections",
"The name of the debug drawer topic");
67 defineOptionalProperty<std::string>(
"VisualizationUpdateTopicName",
"AffordanceVisualizationTopic",
"Topic under which visualization updates are reported");
68 defineOptionalProperty<bool>(
"EnableDebugDrawerSelections",
true,
"Allow users to select primitives via debug drawer");
70 defineOptionalProperty<bool>(
"EnablePrimitiveVisualization",
true,
"Initially enable primitive visualization");
71 defineOptionalProperty<bool>(
"EnableAffordanceVisualization",
true,
"Initially enable affordance visualization");
72 defineOptionalProperty<bool>(
"EnableDebugVisualization",
false,
"Initially enable debug visualization");
74 defineOptionalProperty<std::string>(
"VisualizeAffordanceBeliefFunction",
"",
"The affordance belief function that should initially be visualized");
75 defineOptionalProperty<float>(
"MinExpectedProbability", 0,
"Visualize only samplings with expected probability greater than X");
77 defineOptionalProperty<bool>(
"NoAffordanceExtractionConfigured",
false,
"In this case visualization will start as soon as primitives are computed");
79 defineOptionalProperty<std::string>(
"FileName",
"",
"Load affordances from a file name and exit.");
92 virtual public AffordancePipelineVisualizationInterface
102 return "AffordancePipelineVisualization";
108 void selectPrimitive(
const std::string&
id,
const Ice::Current&
c = Ice::emptyCurrent)
override;
109 void deselectPrimitive(
const std::string&
id,
const Ice::Current&
c = Ice::emptyCurrent)
override;
112 void enableVisualization(
bool enablePrimitives,
bool enableAffordances,
bool enableDebugInformation,
const Ice::Current&
c = Ice::emptyCurrent)
override;
113 void configureAffordanceVisualization(AffordanceVisualizationStyle style,
const std::vector<std::string>& primitives,
const std::vector<std::string>& affordances,
float minExpectedProbability,
const Ice::Current&
c = Ice::emptyCurrent)
override;
122 void reportSelectionChanged(
const DebugDrawerSelectionList& selectedObjects, const ::Ice::Current& = Ice::emptyCurrent)
override;
164 void visualize(
bool updatePrimitives =
true,
bool updateAffordances =
true,
bool updateDebugInfo =
true);
void reportSelectionChanged(const DebugDrawerSelectionList &selectedObjects, const ::Ice::Current &=Ice::emptyCurrent) override
void visualizePrimitive(const AffordanceKit::PrimitivePtr &primitive)
AffordanceVisualizationStyle visualizationStyle
void configureAffordanceVisualization(AffordanceVisualizationStyle style, const std::vector< std::string > &primitives, const std::vector< std::string > &affordances, float minExpectedProbability, const Ice::Current &c=Ice::emptyCurrent) override
DrawColor primitiveColorFrame
std::set< std::string > selections
PropertyDefinitionsPtr createPropertyDefinitions() override
void selectPrimitive(const std::string &id, const Ice::Current &c=Ice::emptyCurrent) override
void visualizeAffordance(const AffordanceKit::AffordancePtr &affordance, const AffordanceKit::PrimitivePtr &primitve, unsigned int index)
void deselectPrimitive(const std::string &id, const Ice::Current &c=Ice::emptyCurrent) override
memoryx::EnvironmentalPrimitiveSegmentBasePrx environmentalPrimitiveSegment
void onDisconnectComponent() override
AffordancePipelineVisualizationListenerPrx affordanceVisualizationTopicPrx
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
void deselectAllPrimitives(const Ice::Current &c=Ice::emptyCurrent) override
IceInternal::Handle< Affordance > AffordancePtr
void enableVisualization(bool enablePrimitives, bool enableAffordances, bool enableDebugInformation, const Ice::Current &c=Ice::emptyCurrent) override
bool debugVisualizationEnabled
memoryx::AffordanceSegmentBasePrx affordanceSegment
std::shared_ptr< Scene > ScenePtr
std::vector< std::string > visualizationAffordanceSet
std::map< int, std::list< std::string > > labelMap
AffordanceKitArmarX::SceneArmarXPtr scene
void exportVisualizationAsJSON(const std::string &filename, const Ice::Current &c=Ice::emptyCurrent) override
DebugDrawerInterfacePrx debugDrawerTopicPrx
void onExitComponent() override
void visualizeDebugInformation(const AffordanceKit::ScenePtr &scene)
void exportVisualizationAsIV(const std::string &filename, const Ice::Current &c=Ice::emptyCurrent) override
void reportNewAffordances(const Ice::Current &c=Ice::emptyCurrent) override
void visualizeSphere(const AffordanceKit::SpherePtr &sphere)
void visualizeAffordanceLabels(const AffordanceKit::PrimitivePtr &primitive, const std::vector< std::string > &labels)
memoryx::WorkingMemoryInterfacePrx workingMemoryPrx
AffordancePipelineVisualization()
void reportNewPointCloudSegmentation(const Ice::Current &c=Ice::emptyCurrent) override
AffordancePipelineVisualizationPropertyDefinitions(std::string prefix)
void visualizeScene(const AffordanceKit::ScenePtr &scene, bool updatePrimitives=true, bool updateAffordances=true, bool updateDebugInfo=true)
void visualizePrimitives(const AffordanceKit::PrimitiveSetPtr &primitives)
std::string getDefaultName() const override
Baseclass for all ArmarX ManagedIceObjects requiring properties.
void clearVisualization(const Ice::Current &c=Ice::emptyCurrent) override
void visualizePlane(const AffordanceKit::PlanePtr &plane)
void visualizeCylinder(const AffordanceKit::CylinderPtr &cylinder)
Default component property definition container.
void triggerVisualization(const Ice::Current &c=Ice::emptyCurrent) override
bool primitiveVisualizationEnabled
void visualizeAffordances(const AffordanceKit::ScenePtr &scene)
std::shared_ptr< SceneArmarX > SceneArmarXPtr
void onInitComponent() override
DrawColor affordanceLabelColor
float visualizationMinExpectedProbability
void onConnectComponent() override
void visualize(bool updatePrimitives=true, bool updateAffordances=true, bool updateDebugInfo=true)
std::vector< std::string > visualizationPrimitiveSet
void visualizeBox(const AffordanceKit::BoxPtr &box)
This file offers overloads of toIce() and fromIce() functions for STL container types.
bool affordanceVisualizationEnabled