Skip to content
Snippets Groups Projects

Move LaserScannerFeatureExtraction to navigation

Merged Tobias Gröger requested to merge feature/laser-scanner-feature-extraction into master
Files
2
@@ -57,6 +57,9 @@ namespace armarx::navigation::components::laser_scanner_feature_extraction
armarx::PropertyDefinitionsPtr def =
new ComponentPropertyDefinitions(getConfigIdentifier());
// Publish to a topic (passing the TopicListenerPrx).
def->topic(featuresTopic);
// // Add an optionalproperty.
def->optional(
properties.taskPeriodMs, "p.taskPeriodMs", "Update rate of the running task.");
@@ -481,6 +484,24 @@ namespace armarx::navigation::components::laser_scanner_feature_extraction
// store in memory
laserScannerFeatureWriter.store(features, getName(), timestamp);
// legacy - topic
LineSegment2DChainSeq chains;
for (const auto& feature : features.features)
{
if (not feature.chain.empty())
{
LineSegment2DChain chain;
for (const auto& pt : feature.chain)
{
chain.push_back(
conversions::to2D(features.frameGlobalPose * conversions::to3D(pt)));
}
chains.push_back(chain);
}
}
featuresTopic->reportExtractedLineSegments(chains);
}
void
Loading