68 debugDrawerPrx->removePoseVisu(
"IMU",
"orientation");
69 debugDrawerPrx->removeLineVisu(
"IMU",
"acceleration");
75 const std::string& name,
76 const IMUData& values,
80 std::unique_lock lock(dataMutex);
93 if (values.acceleration.size() > 0)
97 values.acceleration.at(0), values.acceleration.at(1), values.acceleration.at(2));
98 offerValue(device,
"acceleration", acceleration);
100 if (values.gyroscopeRotation.size() > 0)
104 values.gyroscopeRotation.at(1),
105 values.gyroscopeRotation.at(2));
106 offerValue(device,
"gyroscopeRotation", gyroscopeRotation);
108 if (values.magneticRotation.size() > 0)
112 values.magneticRotation.at(1),
113 values.magneticRotation.at(2));
114 offerValue(device,
"magneticRotation", magneticRotation);
116 if (values.orientationQuaternion.size() > 0)
119 orientationQuaternion =
new Quaternion(values.orientationQuaternion.at(0),
120 values.orientationQuaternion.at(1),
121 values.orientationQuaternion.at(2),
122 values.orientationQuaternion.at(3));
124 "orientationQuaternion",
125 orientationQuaternion,
126 "orientation quaternion values");
133 if (orientationQuaternion && acceleration &&
136 Eigen::Vector3f zero;
145 Eigen::Vector3f ac = acceleration->toEigen();
148 debugDrawerPrx->setLineVisu(
149 "IMU",
"acceleration",
new Vector3(),
new Vector3(ac), 2.0f, color);
151 PosePtr posePtr =
new Pose(orientationQuaternion->toEigen(), zero);
152 debugDrawerPrx->setPoseVisu(
"IMU",
"orientation", posePtr);
158 InertialMeasurementUnitObserver::offerValue(
const std::string& device,
159 const std::string& fieldName,
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Property< PropertyType > getProperty(const std::string &name)
Checks if the numbers published in the relevant data fields equal a reference value.
Checks if the numbers published in the relevant data fields are larger than a reference value.
Checks if the numbers published in the relevant data fields are smaller than a reference value.
Checks if the relevant data fields have been updated since the installation of this condition.
void onConnectObserver() override
Framework hook.
void onExitObserver() override
Framework hook.
void reportSensorValues(const std::string &device, const std::string &name, const IMUData &values, const TimestampBasePtr ×tamp, const Ice::Current &c=Ice::emptyCurrent) override
PropertyDefinitionsPtr createPropertyDefinitions() override
void onInitObserver() override
Framework hook.
void offeringTopic(const std::string &name)
Registers a topic for retrival after initialization.
TopicProxyType getTopic(const std::string &name)
Returns a proxy of the specified topic.
void usingTopic(const std::string &name, bool orderedPublishing=false)
Registers a proxy for subscription after initialization.
bool existsChannel(const std::string &channelName) const
void offerChannel(std::string channelName, std::string description)
Offer a channel.
void offerConditionCheck(std::string checkName, ConditionCheck *conditionCheck)
Offer a condition check.
void updateChannel(const std::string &channelName, const std::set< std::string > &updatedDatafields=std::set< std::string >())
Update all conditions for a channel.
bool offerOrUpdateDataField(std::string channelName, std::string datafieldName, const Variant &value, const std::string &description)
The Variant class is described here: Variants.
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< Vector3 > Vector3Ptr
IceInternal::Handle< Pose > PosePtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
IceInternal::Handle< Quaternion > QuaternionPtr
IceInternal::Handle< TimestampVariant > TimestampVariantPtr