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 
25 #include "BlackWhitelistUpdate.h"
26 
27 
28 namespace armarx
29 {
32  {
33  defineOptionalProperty<std::string>("DebugDrawerTopicName", "DebugDrawerUpdates",
34  "Name of the topic the DebugDrawer listens to.");
35 
36 
37  defineOptionalProperty<std::string>(
38  "LayerBlackWhitelistTopic", "DebugDrawerToArVizLayerBlackWhitelistUpdates",
39  "The layer where updates to the layer black-whitelist are published.");
40  defineOptionalProperty<std::vector<std::string>>("LayerWhitelist", {},
41  "If not empty, layers are shown (comma separated list).")
42  .map("[empty whitelist]", {});
43  defineOptionalProperty<std::vector<std::string>>("LayerBlacklist", {},
44  "These layers will never be shown (comma separated list).")
45  .map("[empty blacklist]", {});
46  }
47 
48 
50  {
51  return "DebugDrawerToArViz";
52  }
53 
54 
56  {
57  {
58  BlackWhitelistUpdate update;
59  getProperty(update.whitelist.set, "LayerWhitelist");
60  getProperty(update.blacklist.set, "LayerBlacklist");
62  ARMARX_VERBOSE << "Layer black-white-list: \n" << DebugDrawerToArViz::layerBlackWhitelist;
63  }
64 
65  usingTopicFromProperty("DebugDrawerTopicName");
66  usingTopicFromProperty("LayerBlackWhitelistTopic");
67  }
68 
69 
71  {
73  }
74 
75 
77  {
78  }
79 
80 
82  {
83  }
84 
85 
87  {
89  }
90 }
ARMARX_VERBOSE
#define ARMARX_VERBOSE
Definition: Logging.h:180
armarx::DebugDrawerToArViz::layerBlackWhitelist
armarx::StringBlackWhitelist layerBlackWhitelist
Definition: DebugDrawerToArViz.h:199
armarx::DebugDrawerToArVizComponent::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: DebugDrawerToArVizComponent.cpp:86
armarx::updateBlackWhitelist
void updateBlackWhitelist(StringBlackWhitelist &bw, const armarx::BlackWhitelistUpdate &update)
Definition: BlackWhitelistUpdate.h:15
armarx::DebugDrawerToArVizPropertyDefinitions::DebugDrawerToArVizPropertyDefinitions
DebugDrawerToArVizPropertyDefinitions(std::string prefix)
Definition: DebugDrawerToArVizComponent.cpp:30
armarx::DebugDrawerToArVizComponent::onDisconnectComponent
void onDisconnectComponent() override
Definition: DebugDrawerToArVizComponent.cpp:76
armarx::Component::usingTopicFromProperty
void usingTopicFromProperty(const std::string &propertyName, bool orderedPublishing=false)
Use a topic whose name is specified by the given property.
Definition: Component.cpp:160
armarx::DebugDrawerToArVizComponent::getDefaultName
std::string getDefaultName() const override
Definition: DebugDrawerToArVizComponent.cpp:49
DebugDrawerToArVizComponent.h
armarx::DebugDrawerToArVizPropertyDefinitions
Property definitions of DebugDrawerToArViz.
Definition: DebugDrawerToArVizComponent.h:41
armarx::armem::server::ltm::util::mongodb::detail::update
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Definition: mongodb.cpp:67
BlackWhitelistUpdate.h
armarx::Component::getConfigIdentifier
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition: Component.cpp:74
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:70
armarx::ArVizComponentPluginUser::arviz
armarx::viz::Client arviz
Definition: ArVizComponentPlugin.h:43
armarx::PropertyUser::getProperty
Property< PropertyType > getProperty(const std::string &name)
Property creation and retrieval.
Definition: PropertyUser.h:179
armarx::DebugDrawerToArVizComponent::onExitComponent
void onExitComponent() override
Definition: DebugDrawerToArVizComponent.cpp:81
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::DebugDrawerToArVizComponent::onInitComponent
void onInitComponent() override
Definition: DebugDrawerToArVizComponent.cpp:55
armarx::PropertyDefinitionsPtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
Definition: forward_declarations.h:34
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::DebugDrawerToArVizComponent::onConnectComponent
void onConnectComponent() override
Definition: DebugDrawerToArVizComponent.cpp:70
armarx::DebugDrawerToArViz::setArViz
void setArViz(viz::Client arviz)
Definition: DebugDrawerToArViz.cpp:81