DebugDrawerHelperComponentPlugin.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package RobotAPI::ArmarXObjects::RobotAPIComponentPlugins
17 * @author Raphael Grimm ( raphael dot grimm at kit dot edu )
18 * @date 2019
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
26
28
30
31namespace armarx::plugins
32{
33 /**
34 * @class DebugDrawerHelperComponentPlugin
35 * @ingroup Library-RobotAPIComponentPlugins
36 * @brief Brief description of class RobotAPIComponentPlugins.
37 *
38 * Detailed description of class RobotAPIComponentPlugins.
39 */
41 {
42 public:
44 using ComponentPlugin::ComponentPlugin;
45
46 //helper
47 public:
50
52
53 //other
54 public:
55 std::unique_lock<std::recursive_mutex> getDebugDrawerHelperLock() const;
56 std::string getDebugDrawerLayerName() const;
57
59
61 bool synchronizeDebugDrawerHelperRobot(Ice::Long timestamp) const;
62 bool synchronizeDebugDrawerHelperRobot(const RobotStateConfig& state) const;
63
64 void setClearLayersOnDisconnect(bool b);
65 //hooks
66 protected:
67 void preOnInitComponent() override;
68 void preOnConnectComponent() override;
69 void postOnDisconnectComponent() override;
71
72 //data
73 private:
74 using RobotStateComponentPlugin = armarx::plugins::RobotStateComponentPlugin;
75 static constexpr auto _propertyName = "DebugDrawerTopicName";
76 std::string _pre;
77 mutable std::recursive_mutex _debugDrawerHelperMutex;
78 std::unique_ptr<DebugDrawerHelper> _debugDrawerHelper;
79 DebugDrawerInterfacePrx _debugDrawerTopic;
80 RobotStateComponentPlugin* _robotStateComponentPlugin{nullptr};
81 bool _doNotClearLayersOnDisconnect = false;
82 };
83} // namespace armarx::plugins
84
86
87namespace armarx
88{
90 {
91 public:
93
94 private:
95 DebugDrawerHelperComponentPlugin* _debugDrawerHelperComponentPlugin{nullptr};
96
97 public:
99
102
105
107
108 //other
109 public:
110 std::unique_lock<std::recursive_mutex> getDebugDrawerHelperLock() const;
111 std::string getDebugDrawerLayerName() const;
112
114
116 bool synchronizeDebugDrawerHelperRobot(Ice::Long timestamp) const;
117 bool synchronizeDebugDrawerHelperRobot(const RobotStateConfig& state) const;
118 };
119} // namespace armarx
std::string timestamp()
armarx::plugins::DebugDrawerHelperComponentPlugin DebugDrawerHelperComponentPlugin
std::unique_lock< std::recursive_mutex > getDebugDrawerHelperLock() const
const DebugDrawerHelperComponentPlugin & getDebugDrawerHelperPlugin() const
const DebugDrawerInterfacePrx & getDebugDrawerTopic() const
The DebugDrawerHelper class provides draw functions in a given frame (static matrix or robot node) an...
ManagedIceObject(ManagedIceObject const &other)
Brief description of class RobotAPIComponentPlugins.
DebugDrawerHelperComponentPlugin(ManagedIceObject &parent, std::string pre)
std::unique_lock< std::recursive_mutex > getDebugDrawerHelperLock() const
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
Brief description of class RobotAPIComponentPlugins.
std::shared_ptr< class Robot > RobotPtr
Definition Bus.h:19
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