[Rock-dev] Bug in control/kdl in copy constructor

Anna Born anna.born at dfki.de
Thu Feb 15 12:06:43 CET 2018


Hi,

by copying or assigning the KDL::Tree the inertia information of the 
root segment is not copied and is restored to zero.

The inertia information:

segment.getInertia().getMass() segment.getInertia().getCOG()
segment.getInertia().getRotationalInertia()


Hier is the code:

boolis_success =kdl_parser::treeFromFile(file, this->kdlTree);
printOutTree(this->kdlTree);
KDL::Tree treeTest(kdlTree);
printOutTree(treeTest);

For test the urdf model of asguard was used: 
https://git.hb.dfki.de/models-robots/asguard_v4/blob/master/urdf/asguard_v4.urdf

The original, kdlTree:

---body
*Mass: 2**
**COG: 0.035 0 0.07825**
**RotationalInertia: 0.0281261 0 -0.0054775 0 0.0641161 0 -0.0054775 0 
0.05125*
.......
---wheel_front_right_motor
Mass: 0.1
COG: -0.00031 -0.00016 0.00047
RotationalInertia: 0.00176002 -4.96e-09 1.457e-08 -4.96e-09 0.00346003 
7.52e-09 1.457e-08 7.52e-09 0.00176001


Its copy, treeTest:

---body
*Mass: 0**
**COG: 0 0 0**
**RotationalInertia: 0 0 0 0 0 0 0 0 0*
........
---wheel_front_right_motor
Mass: 0.1
COG: -0.00031 -0.00016 0.00047
RotationalInertia: 0.00176002 -4.96e-09 1.457e-08 -4.96e-09 0.00346003 
7.52e-09 1.457e-08 7.52e-09 0.00176001


Has someone know more about this issue?

I tried with our kdl version (commit: 
264ef3f7c4ad553e7a391e0f104fda1ec5051925) and with the newest kdl 
version (commit: d798f594552cb6f6223981b9c304d3db2b6a7d18). Both 
versions give the same result.


With best regards,

Anna

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20180215/9d6190db/attachment.htm 


More information about the Rock-dev mailing list