Go to the documentation of this file.
40 usingTopic(getProperty<std::string>(
"LaserScannerTopicName").getValue());
67 std::unique_lock lock(dataMutex);
78 float minDistance = FLT_MAX;
79 float minAngle = 0.0f;
80 float maxDistance = -FLT_MAX;
81 float maxAngle = 0.0f;
82 float distanceSum = 0.0f;
83 for (LaserScanStep
const& step : scan)
85 distanceSum += step.distance;
86 if (step.distance < minDistance)
88 minDistance = step.distance;
89 minAngle = step.angle;
91 if (step.distance > maxDistance)
93 maxDistance = step.distance;
94 maxAngle = step.angle;
104 float averageDistance = distanceSum / scan.size();
void updateChannel(const std::string &channelName, const std::set< std::string > &updatedDatafields=std::set< std::string >())
Update all conditions for a channel.
void reportSensorValues(const std::string &device, const std::string &name, const LaserScan &scan, const TimestampBasePtr ×tamp, const Ice::Current &c) override
bool offerOrUpdateDataField(std::string channelName, std::string datafieldName, const Variant &value, const std::string &description)
void onConnectObserver() override
Framework hook.
bool existsChannel(const std::string &channelName) const
void onExitObserver() override
Framework hook.
PropertyDefinitionsPtr createPropertyDefinitions() override
void usingTopic(const std::string &name, bool orderedPublishing=false)
Registers a proxy for subscription after initialization.
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
void onInitObserver() override
Framework hook.
void offerConditionCheck(std::string checkName, ConditionCheck *conditionCheck)
Offer a condition check.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
This file offers overloads of toIce() and fromIce() functions for STL container types.
void offerChannel(std::string channelName, std::string description)
Offer a channel.