diff --git a/CHANGELOG.md b/CHANGELOG.md index 5064053a3..2b7a8952b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/devices/HumanLogger/HumanLogger.cpp b/devices/HumanLogger/HumanLogger.cpp index 1c5a78a47..0a3965c9b 100644 --- a/devices/HumanLogger/HumanLogger.cpp +++ b/devices/HumanLogger/HumanLogger.cpp @@ -69,10 +69,10 @@ class HumanLogger::impl std::array baseVelocity; std::vector jointPositions; std::vector jointVelocities; - std::vector jointNamesStateInterface; + std::vector jointNamesState; // iHumanDynamics std::vector jointTorquesInterface; - std::vector jointNamesDynamicsInterface; + std::vector jointNamesDynamics; }; @@ -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}); } }