robotology / walking-teleoperation

Software related to walking and teleoperation.
BSD 3-Clause "New" or "Revised" License
30 stars 14 forks source link

RobotMotorsEstimation.cpp uses a non initialized variable m_n #145

Open S-Dafarra opened 1 month ago

S-Dafarra commented 1 month ago

While working on https://github.com/robotology/walking-teleoperation/issues/110 I noticed that here https://github.com/robotology/walking-teleoperation/blob/82d3dd9d8d8fbaa3679b856b0cea2c93a0d48642/modules/HapticGlove_module/src/RobotMotorsEstimation.cpp#L129-L132 a variable named m_n is used, defined here https://github.com/robotology/walking-teleoperation/blob/82d3dd9d8d8fbaa3679b856b0cea2c93a0d48642/modules/HapticGlove_module/include/RobotMotorsEstimation.hpp#L34

but it seems never initialized. It seems to affect how the motor state estimator covariance is obtained, but I am not sure if the output is actually used in other ways than just logging.

S-Dafarra commented 1 month ago

I guess this has to be equal to 3 as in https://github.com/robotology/walking-teleoperation/blob/82d3dd9d8d8fbaa3679b856b0cea2c93a0d48642/modules/HapticGlove_module/src/MotorEstimation.cpp#L10