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

Anna Born anna.born at dfki.de
Fri Feb 16 14:06:32 CET 2018


I have opened the issue yesterday. 
(https://github.com/orocos/orocos_kinematics_dynamics/issues/130)

Since the kdl is used in several projects, please participate in the 
issue discussion.

I took a look in our kdl_parser library that creates kdl::Tree from URDF 
file: 
https://github.com/rock-control/control-kdl_parser/blob/master/src/kdl_parser.cpp

At the row 202-207 the inertial information is added into the root 
segment. Even there is a comment "//warn if root link has inertia. KDL 
does not support this". But sadly no warning. o.O

So we should decide:

- we forbidden to use inertial information in root segment, therefore it 
is required to use empty root link in urdf

- or we discuss this issue with kdl developers to add the support for 
inertial information of the root link

Best regards,

Anna


On 16.02.2018 12:13, Sylvain Joyeux wrote:
> Seems legit to me ... I would suggest reporting this to the KDL
> developers (preferably with a correcting pull request ;-))
>
> https://github.com/orocos/orocos_kinematics_dynamics.git
>
> Sylvain
>
> On Thu, Feb 15, 2018 at 9:06 AM, Anna Born <anna.born at dfki.de> wrote:
>> 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:
>>
>> bool is_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
>>
>>
>> _______________________________________________
>> Rock-dev mailing list
>> Rock-dev at dfki.de
>> http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20180216/3516a03d/attachment.htm 


More information about the Rock-dev mailing list