diff --git a/CHANGELOG.md b/CHANGELOG.md index 5af9d2f..de26ce8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased - Added some debug prints to detect where the wholeBodyDynamics device hangs at startup. (See [!106](https://github.com/robotology/whole-body-estimators/pull/106)). - Fixed the configuration files to run wholeBodyDynamics with iCubGazeboV3. (See [!107](https://github.com/robotology/whole-body-estimators/pull/107)). +- Avoid to use getOutputCount before broadcasting data. (See [!108](https://github.com/robotology/whole-body-estimators/pull/108)). ## [0.4.0] - 2021-02-11 ### Added diff --git a/devices/wholeBodyDynamics/WholeBodyDynamicsDevice.cpp b/devices/wholeBodyDynamics/WholeBodyDynamicsDevice.cpp index 6295d14..e3a17a7 100644 --- a/devices/wholeBodyDynamics/WholeBodyDynamicsDevice.cpp +++ b/devices/wholeBodyDynamics/WholeBodyDynamicsDevice.cpp @@ -2494,11 +2494,8 @@ void WholeBodyDynamicsDevice::resetGravityCompensation() template void broadcastData(T& _values, yarp::os::BufferedPort& _port) { - if (_port.getOutputCount()>0 ) - { - _port.prepare() = _values ; - _port.write(); - } + _port.prepare() = _values ; + _port.write(); } void WholeBodyDynamicsDevice::publishTorques()