DebugDrawerToArVizComponent.cpp
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::DebugDrawerToArViz
17 * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18 * @date 2020
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
24
26
27namespace armarx
28{
30 std::string prefix) :
32 {
33 defineOptionalProperty<std::string>("DebugDrawerTopicName",
34 "DebugDrawerUpdates",
35 "Name of the topic the DebugDrawer listens to.");
36
37
39 "LayerBlackWhitelistTopic",
40 "DebugDrawerToArVizLayerBlackWhitelistUpdates",
41 "The layer where updates to the layer black-whitelist are published.");
43 "LayerWhitelist", {}, "If not empty, layers are shown (comma separated list).")
44 .map("[empty whitelist]", {});
46 "LayerBlacklist", {}, "These layers will never be shown (comma separated list).")
47 .map("[empty blacklist]", {});
48 }
49
50 std::string
52 {
53 return "DebugDrawerToArViz";
54 }
55
56 void
58 {
59 {
60 BlackWhitelistUpdate update;
61 getProperty(update.whitelist.set, "LayerWhitelist");
62 getProperty(update.blacklist.set, "LayerBlacklist");
64 ARMARX_VERBOSE << "Layer black-white-list: \n"
66 }
67
68 usingTopicFromProperty("DebugDrawerTopicName");
69 usingTopicFromProperty("LayerBlackWhitelistTopic");
70 }
71
72 void
77
78 void
82
83 void
87
94} // namespace armarx
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Definition Component.cpp:46
void usingTopicFromProperty(const std::string &propertyName, bool orderedPublishing=false)
Use a topic whose name is specified by the given property.
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition Component.cpp:90
Property< PropertyType > getProperty(const std::string &name)
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Property definitions of DebugDrawerToArViz.
void setArViz(viz::Client arviz)
armarx::StringBlackWhitelist layerBlackWhitelist
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
#define ARMARX_VERBOSE
The logging level for verbose information.
Definition Logging.h:187
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
void updateBlackWhitelist(StringBlackWhitelist &bw, const armarx::BlackWhitelistUpdate &update)