Skip to content

Commit

Permalink
Merge pull request #108 from S-Dafarra/remove_output_count
Browse files Browse the repository at this point in the history
Avoid to use getOutputCount before broadcasting data.
  • Loading branch information
prashanthr05 authored Mar 26, 2021
2 parents 2ffe2d0 + 2c407c2 commit 9457244
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions devices/wholeBodyDynamics/WholeBodyDynamicsDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2494,11 +2494,8 @@ void WholeBodyDynamicsDevice::resetGravityCompensation()

template <class T> void broadcastData(T& _values, yarp::os::BufferedPort<T>& _port)
{
if (_port.getOutputCount()>0 )
{
_port.prepare() = _values ;
_port.write();
}
_port.prepare() = _values ;
_port.write();
}

void WholeBodyDynamicsDevice::publishTorques()
Expand Down

0 comments on commit 9457244

Please sign in to comment.