Open GiulioRomualdi opened 2 years ago
Checking with @prashanthr05 we noticed that a a possible bottleneck is due to yarp-to-idyntree copy
Not sure if that copy can be so expensive, even considering that the buffers are already allocated and of the right size. Anyhow, worth investigating.
I'm trying to run WBD at 1khz. As discussed in https://github.com/ami-iit/robots-configuration/pull/10 I increased the rate of all the devices used by wbd.
In the context of xprize I wrote a simple time profiler for wbd https://github.com/robotology/whole-body-estimators/commit/e44b223b3fc1890b8454863d270141c6ed2b5180. Running the profiler with wbd at 1khz I obtain the following result
Accordingly to the table there seems that wbd spends considerably amount of time in publishing and removing offsets (low pass filtering). Checking with @prashanthr05 we noticed that a a possible bottleneck is due to yarp-to-idyntree copy
https://github.com/robotology/whole-body-estimators/blob/bf7d5ff892c38ed2346857477b603a3dd386e36e/devices/wholeBodyDynamics/WholeBodyDynamicsDevice.cpp#L2183-L2292
To avoid these copies we could replace the yarp vectors in ctrLibRT filters with eigen refs/vectors.
cc @prashanthr05 @HosameldinMohamed @traversaro @isorrentino @S-Dafarra