27#include <VirtualRobot/VirtualRobot.h>
49 defs->topic(graphTopic,
"SemanticGraphTopic");
57 return "SemanticGraphExample";
82 auto a = graph.addVertex(semrel::ShapeID{0}, vattribs);
86 auto b = graph.addVertex(semrel::ShapeID{1}, vattribs);
89 auto c = graph.addVertex(semrel::ShapeID{5});
90 c.attrib().name =
"C";
91 c.attrib().value = 1.0;
94 auto ab = graph.addEdge(a, b);
95 ab.attrib().value = 0;
96 auto ac = graph.addEdge(a,
c);
97 ac.attrib().value = 1;
98 auto bc = graph.addEdge(b,
c);
99 bc.attrib().value = 2;
102 graph.attrib().position = {1, 2, 3};
#define ARMARX_REGISTER_COMPONENT_EXECUTABLE(ComponentT, applicationName)
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Property definitions of SemanticGraphExample.
SemanticGraphExamplePropertyDefinitions(std::string prefix)
Brief description of class SemanticGraphExample.
void onInitComponent() override
void onDisconnectComponent() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onConnectComponent() override
static std::string GetDefaultName()
void onExitComponent() override
std::string getDefaultName() const override
Retrieve default name of component.
data::Graph toIce(const semrel::AttributedGraph &input)
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
semrel::RelationGraph< MyVertex, MyEdge, MyGraphAttributes > MyGraph