Calculating Mass Inertia Matrix from URDF
Posted: 04 Nov 2016, 13:57
Hi,
I want to calculate the Mass Inertia Matrix from URDF in Lua. Earlier, I was using pykdl [1] in ros (python), which has a function for calculating inertia matrix [2,3]. pykdl uses KDL structure internally, which can be initialized from URDF file.
The python library pykdl, internally uses Orocos Kinematics Dynamics library [4], which is written in CPP. At this moment, I can think of two possible solutions to calculate Mass Inertia Matrix from URDF file-
1. Write the code completely in Lua
2. Call the CPP library from Lua
In case of point 1, I need to first read the URDF (xml) file and construct the KDL structure. then using this structure calculate the Mass Inertia Matrix as done in [4]. This is looking like re-inventing the wheel again. In case of point 2, I doubt on the efficiency.
Any idea please.
References-
[1] http://wiki.ros.org/pykdl_utils
[2] https://github.com/gt-ros-pkg/hrl-kdl/b ... cs.py#L293
[3] https://github.com/rethink-kmaroney/bax ... ics.py#L68
[4] https://github.com/orocos/orocos_kinema ... am.cpp#L46
-
Thanks
I want to calculate the Mass Inertia Matrix from URDF in Lua. Earlier, I was using pykdl [1] in ros (python), which has a function for calculating inertia matrix [2,3]. pykdl uses KDL structure internally, which can be initialized from URDF file.
The python library pykdl, internally uses Orocos Kinematics Dynamics library [4], which is written in CPP. At this moment, I can think of two possible solutions to calculate Mass Inertia Matrix from URDF file-
1. Write the code completely in Lua
2. Call the CPP library from Lua
In case of point 1, I need to first read the URDF (xml) file and construct the KDL structure. then using this structure calculate the Mass Inertia Matrix as done in [4]. This is looking like re-inventing the wheel again. In case of point 2, I doubt on the efficiency.
Any idea please.
References-
[1] http://wiki.ros.org/pykdl_utils
[2] https://github.com/gt-ros-pkg/hrl-kdl/b ... cs.py#L293
[3] https://github.com/rethink-kmaroney/bax ... ics.py#L68
[4] https://github.com/orocos/orocos_kinema ... am.cpp#L46
-
Thanks