32 providerName(providerName),
48 while (!
task->isStopped())
58 std::this_thread::sleep_for(std::chrono::milliseconds(1));
70 template<
typename Po
intT>
73 typename pcl::PointCloud<PointT>::Ptr
pc(
new pcl::PointCloud<PointT>());
80 ARMARX_INFO <<
"Visualizing point cloud from provider '" << providerName <<
"'";
97 visualizations[providerName][visionx::eColoredPoints] = dd_pc_colors;
104 visualizations[providerName][visionx::eLabeledPoints] = dd_pc_labels;
115 case visionx::ePoints:
116 processPointCloud<pcl::PointXYZ>(providerName);
119 case visionx::eColoredPoints:
120 processPointCloud<pcl::PointXYZRGBA>(providerName);
123 case visionx::eLabeledPoints:
124 processPointCloud<pcl::PointXYZL>(providerName);
127 case visionx::eColoredLabeledPoints:
128 processPointCloud<pcl::PointXYZRGBL>(providerName);
132 ARMARX_WARNING <<
"Could not visualize point cloud: Unknown format";
144 PointCloudProviderVisualizationInfoList result;
148 PointCloudProviderVisualizationInfo p;
167 ARMARX_WARNING <<
"Enabling visualization for " << providerName <<
" with type " <<
pointCloudTypeToText(type) <<
", which has not been created yet (no point cloud reported so far?)";
181 offeringTopic(getProperty<std::string>(
"DebugDrawerTopicName").getValue());
190 std::vector<std::string> initiallyDisabled =
armarx::Split(getProperty<std::string>(
"InitiallyDisabledVisualizations").getValue(),
",",
true);
193 enabledFlags[providerName] = (std::find(initiallyDisabled.begin(), initiallyDisabled.end(), providerName) == initiallyDisabled.end());
199 debugDrawerTopicPrx = getTopic<armarx::DebugDrawerInterfacePrx>(getProperty<std::string>(
"DebugDrawerTopicName").getValue());
226 handler.second->stop();
248 std::string oldLayerName, currentLayerName, entityName;
257 oldLayerName =
getName() +
"_" + providerName +
"_" +
std::to_string((visualizationIteration + 1) % 2);
258 currentLayerName =
getName() +
"_" + providerName +
"_" +
std::to_string(visualizationIteration % 2);
259 entityName =
"PointCloud_" +
std::to_string(visualizationIteration % 2);
268 visualizationType = visionx::ePoints;
277 catch (
const std::exception& e)
279 ARMARX_WARNING <<
"Requesting visualization for " << providerName <<
", but no point cloud arrived yet";
301 case visionx::ePoints:
304 case visionx::eColoredPoints:
307 case visionx::eLabeledPoints:
317 std::transform(text.begin(), text.end(), text.begin(), ::tolower);
320 return visionx::ePoints;
322 else if (text ==
"colors")
324 return visionx::eColoredPoints;
326 else if (text ==
"labels")
328 return visionx::eLabeledPoints;
330 return visionx::ePoints;