Go to the documentation of this file.
36 addPlugin(_robotStateComponentPlugin, pre);
37 addPluginDependency(_robotStateComponentPlugin);
44 return *_debugDrawerHelper;
51 return *_debugDrawerHelper;
63 return std::unique_lock{_debugDrawerHelperMutex};
79 if (!_debugDrawerTopic)
81 parent<Component>().offeringTopicFromProperty(_propertyName);
88 if (!_debugDrawerTopic)
90 parent<Component>().getTopicFromProperty(_debugDrawerTopic, _propertyName);
92 if (!_debugDrawerHelper)
94 const auto robotID = _pre +
"_DebugDrawerHelperComponentPlugin_" +
parent().
getName();
95 if (!_robotStateComponentPlugin->
hasRobot(robotID))
97 _robotStateComponentPlugin->
addRobot(robotID,
98 VirtualRobot::RobotIO::eStructure);
101 const auto robot = _robotStateComponentPlugin->
getRobot(robotID);
104 _debugDrawerHelper = std::make_unique<DebugDrawerHelper>(
114 if (!_doNotClearLayersOnDisconnect)
118 _debugDrawerHelper->cyclicCleanup();
119 _debugDrawerHelper->cyclicCleanup();
120 _debugDrawerHelper->clearLayer();
124 _debugDrawerTopic =
nullptr;
130 if (!properties->hasDefinition(_propertyName))
132 properties->defineOptionalProperty<std::string>(
134 "DebugDrawerUpdates",
135 "Name of the debug drawer topic");
142 return _debugDrawerHelper->getRobot();
172 _doNotClearLayersOnDisconnect = !b;
181 addPlugin(_debugDrawerHelperComponentPlugin);
187 return *_debugDrawerHelperComponentPlugin;
193 return *_debugDrawerHelperComponentPlugin;
std::unique_lock< std::recursive_mutex > getDebugDrawerHelperLock() const
std::string getDebugDrawerLayerName() const
const DebugDrawerInterfacePrx & getDebugDrawerTopic() const
void setClearLayersOnDisconnect(bool b)
DebugDrawerHelperComponentPlugin(ManagedIceObject &parent, std::string pre)
ManagedIceObject & parent()
void preOnInitComponent() override
std::string getDebugDrawerLayerName() const
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
void preOnConnectComponent() override
PluginT * addPlugin(const std::string prefix="", ParamsT &&...params)
bool synchronizeDebugDrawerHelperRobot() const
DebugDrawerHelperComponentPluginUser()
bool hasRobot(const std::string &id) const
bool synchronizeLocalClone(const VirtualRobot::RobotPtr &robot) const
VirtualRobot::RobotPtr getDebugDrawerHelperRobot() const
const DebugDrawerHelper & getDebugDrawerHelper() const
VirtualRobot::RobotPtr getRobot(const std::string &id) const
This file is part of ArmarX.
bool synchronizeDebugDrawerHelperRobot() const
void postOnDisconnectComponent() override
const DebugDrawerHelperComponentPlugin & getDebugDrawerHelperPlugin() const
The DebugDrawerHelper class provides draw functions in a given frame (static matrix or robot node) an...
VirtualRobot::RobotPtr addRobot(const std::string &id, const VirtualRobot::RobotPtr &robot, const VirtualRobot::RobotNodeSetPtr &rns={}, const VirtualRobot::RobotNodePtr &node={})
const DebugDrawerHelper & getDebugDrawerHelper() const
const DebugDrawerInterfacePrx & getDebugDrawer() const
The ManagedIceObject is the base class for all ArmarX objects.
Brief description of class RobotAPIComponentPlugins.
const DebugDrawerInterfacePrx & getDebugDrawerTopic() const
std::string getName() const
Retrieve name of object.
std::unique_lock< std::recursive_mutex > getDebugDrawerHelperLock() const
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
VirtualRobot::RobotPtr getDebugDrawerHelperRobot() const
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< class Robot > RobotPtr