robotology / whole-body-estimators

YARP devices that implement estimators for humanoid robots.
26 stars 12 forks source link

[wholeBodyDynamics] bug in loading settings and model as the estimator is opened #92

Closed GiulioRomualdi closed 3 years ago

GiulioRomualdi commented 3 years ago

@prashanthr05 says,

We are trying to use a fixed frame as the kinematics source for the whole body dynamics estimation algorithm. While testing this, we identified a bug due to the order in which the methods are called within the open() function.

The openEstimator() method where the iDYnTree model is actually loaded is called after the loadConfigSettings() method which contains a check on the frame index using the iDynTree model object. Please see,

https://github.com/robotology/whole-body-estimators/blob/085d7a6b05d9de207c34aae7b4f64d6080a0a045/devices/wholeBodyDynamics/WholeBodyDynamicsDevice.cpp#L841-L858

and

https://github.com/robotology/whole-body-estimators/blob/085d7a6b05d9de207c34aae7b4f64d6080a0a045/devices/wholeBodyDynamics/WholeBodyDynamicsDevice.cpp#L1297-L1311

At this point, the model is not loaded and the conditional check against the valid frame index fails, causing the estimator to exit.

This bug comes into effect only when assume_fixed is used, I suppose.

traversaro commented 3 years ago

This make sense. @prashanthr05 do you know how proceed or do you need my input?

prashanthr05 commented 3 years ago

This make sense. @prashanthr05 do you know how proceed or do you need my input?

I will proceed.