Skip to content

Commit

Permalink
[HumanLogger] Add joint names
Browse files Browse the repository at this point in the history
  • Loading branch information
lrapetti committed Aug 31, 2023
1 parent ed291be commit eda3a7d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- [`HumanLogger`] Removed IWrapper from implemented interface to fix checks on log flags and attached interfaces (https://github.com/robotology/human-dynamics-estimation/pull/344)
- [`HumanLogger`] Fix joint names (https://github.com/robotology/human-dynamics-estimation/pull/352)


## [2.7.1] - 2023-02-16
Expand Down
14 changes: 7 additions & 7 deletions devices/HumanLogger/HumanLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ class HumanLogger::impl
std::array<double, 6> baseVelocity;
std::vector<double> jointPositions;
std::vector<double> jointVelocities;
std::vector<std::string> jointNamesStateInterface;
std::vector<std::string> jointNamesState;
// iHumanDynamics
std::vector<double> jointTorquesInterface;
std::vector<std::string> jointNamesDynamicsInterface;
std::vector<std::string> jointNamesDynamics;

};

Expand Down Expand Up @@ -303,20 +303,20 @@ bool HumanLogger::impl::configureBufferManager()
if(settings.logHumanState) {
if (loggerType == LoggerType::MATLAB)
{
jointNamesStateInterface = iHumanState->getJointNames();
jointNamesState = iHumanState->getJointNames();
ok = ok && bufferManager.addChannel({"human_state::base_position", {3, 1}});
ok = ok && bufferManager.addChannel({"human_state::base_orientation", {4, 1}});
ok = ok && bufferManager.addChannel({"human_state::base_velocity", {6, 1}});
ok = ok && bufferManager.addChannel({"human_state::joint_positions", {jointNamesStateInterface.size(), 1}});
ok = ok && bufferManager.addChannel({"human_state::joint_velocities", {jointNamesStateInterface.size(), 1}});
ok = ok && bufferManager.addChannel({"human_state::joint_positions", {jointNamesState.size(), 1}, jointNamesState});
ok = ok && bufferManager.addChannel({"human_state::joint_velocities", {jointNamesState.size(), 1}, jointNamesState});
}
}
if (settings.logHumanDynamics)
{
if (loggerType == LoggerType::MATLAB)
{
jointNamesDynamicsInterface = iHumanDynamics->getJointNames();
ok = ok && bufferManager.addChannel({"human_dynamics::joint_torques", {jointNamesDynamicsInterface.size(), 1}});
jointNamesDynamics = iHumanDynamics->getJointNames();
ok = ok && bufferManager.addChannel({"human_dynamics::joint_torques", {jointNamesDynamics.size(), 1}, jointNamesDynamics});
}
}

Expand Down

0 comments on commit eda3a7d

Please sign in to comment.