35 addPlugin(_robotStateComponentPlugin, pre);
44 return *_debugDrawerHelper;
52 return *_debugDrawerHelper;
62 std::unique_lock<std::recursive_mutex>
66 return std::unique_lock{_debugDrawerHelperMutex};
84 if (!_debugDrawerTopic)
94 if (!_debugDrawerTopic)
98 if (!_debugDrawerHelper)
100 const auto robotID = _pre +
"_DebugDrawerHelperComponentPlugin_" +
parent().
getName();
101 if (!_robotStateComponentPlugin->hasRobot(robotID))
103 _robotStateComponentPlugin->addRobot(robotID, VirtualRobot::RobotIO::eStructure);
106 const auto robot = _robotStateComponentPlugin->getRobot(robotID);
109 _debugDrawerHelper = std::make_unique<DebugDrawerHelper>(
118 if (!_doNotClearLayersOnDisconnect)
122 _debugDrawerHelper->cyclicCleanup();
123 _debugDrawerHelper->cyclicCleanup();
124 _debugDrawerHelper->clearLayer();
130 _debugDrawerTopic =
nullptr;
138 if (!properties->hasDefinition(_propertyName))
140 properties->defineOptionalProperty<std::string>(
141 _propertyName,
"DebugDrawerUpdates",
"Name of the debug drawer topic");
149 return _debugDrawerHelper->getRobot();
173 const RobotStateConfig& state)
const
186 _doNotClearLayersOnDisconnect = !b;
195 addPlugin(_debugDrawerHelperComponentPlugin);
202 return *_debugDrawerHelperComponentPlugin;
209 return *_debugDrawerHelperComponentPlugin;
233 std::unique_lock<std::recursive_mutex>
271 const RobotStateConfig& state)
const
armarx::plugins::DebugDrawerHelperComponentPlugin DebugDrawerHelperComponentPlugin
std::unique_lock< std::recursive_mutex > getDebugDrawerHelperLock() const
const DebugDrawerHelper & getDebugDrawerHelper() const
const DebugDrawerHelperComponentPlugin & getDebugDrawerHelperPlugin() const
const DebugDrawerInterfacePrx & getDebugDrawerTopic() const
VirtualRobot::RobotPtr getDebugDrawerHelperRobot() const
std::string getDebugDrawerLayerName() const
bool synchronizeDebugDrawerHelperRobot() const
DebugDrawerHelperComponentPluginUser()
The DebugDrawerHelper class provides draw functions in a given frame (static matrix or robot node) an...
const DebugDrawerInterfacePrx & getDebugDrawer() const
void addPluginDependency(ManagedIceObjectPlugin *dependedOn)
ManagedIceObject & parent()
PluginT * addPlugin(const std::string prefix="", ParamsT &&... params)
friend class ManagedIceObject
PluginT * addPlugin(const std::string prefix="", ParamsT &&... params)
std::string getName() const
Retrieve name of object.
DebugDrawerHelperComponentPlugin(ManagedIceObject &parent, std::string pre)
std::unique_lock< std::recursive_mutex > getDebugDrawerHelperLock() const
void postOnDisconnectComponent() override
void preOnInitComponent() override
void preOnConnectComponent() override
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
const DebugDrawerHelper & getDebugDrawerHelper() const
const DebugDrawerInterfacePrx & getDebugDrawerTopic() const
VirtualRobot::RobotPtr getDebugDrawerHelperRobot() const
std::string getDebugDrawerLayerName() const
void setClearLayersOnDisconnect(bool b)
bool synchronizeDebugDrawerHelperRobot() 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...
std::shared_ptr< class Robot > RobotPtr
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx