Mass Inertia Matrix from URDF file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Mass Inertia Matrix from URDF file

Ravi Joshi
Hello,

I am using Lua for Dynamic Simulation of Baxter Robot. For this purpose, I need to calculate Mass Inertia Matrix from URDF file. 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/blob/hydro/pykdl_utils/src/pykdl_utils/kdl_kinematics.py#L293
[3] https://github.com/rethink-kmaroney/baxter_pykdl/blob/master/scripts/baxter_kinematics.py#L68
[4] https://github.com/orocos/orocos_kinematics_dynamics/blob/master/orocos_kdl/src/chaindynparam.cpp#L46


Thanks

-
Ravi
Reply | Threaded
Open this post in threaded view
|

Re: Mass Inertia Matrix from URDF file

Paul E. Merrell, J.D.
On Fri, Nov 4, 2016 at 1:34 AM, Ravi Joshi [via Lua]
<[hidden email]> wrote:

Hi, Ravi,

Your project is way outside my area of expertise. You'd be far better
off posting to the lua-l mailing list.
<https://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/lua-l-lists.lua.org>.

Best regards,

Paul



--
[Notice not included in the above original message:  The U.S. National
Security Agency neither confirms nor denies that it intercepted this
message.]
Reply | Threaded
Open this post in threaded view
|

Re: Mass Inertia Matrix from URDF file

Jonathan Goble
On Fri, Nov 4, 2016 at 4:40 AM, Paul E. Merrell, J.D. <[hidden email]> wrote:

> On Fri, Nov 4, 2016 at 1:34 AM, Ravi Joshi [via Lua]
> <[hidden email]> wrote:
>
> Hi, Ravi,
>
> Your project is way outside my area of expertise. You'd be far better
> off posting to the lua-l mailing list.
> <https://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/lua-l-lists.lua.org>.
>
> Best regards,
>
> Paul

Uh... what? This is the lua-l mailing list. :-P

Reply | Threaded
Open this post in threaded view
|

Re: Mass Inertia Matrix from URDF file

Jorge Visca
In reply to this post by Ravi Joshi

ROS having a C++ API was a bad, bad design decision.

I'd go whatever is faster to write. Probably the binding. On the other hand, writing algorithms is way more rewarding than messing around with C++ bindings (YMMV).

I'd not worry about the performance on either alternative. If at some point in the future it shows to be a problem (unlikely), only then I'd look into it.

Jorge


On 04/11/16 05:34, Ravi Joshi wrote:
Hello,

I am using Lua for Dynamic Simulation of Baxter Robot. For this purpose, I need to calculate Mass Inertia Matrix from URDF file. 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-


Thanks

-
Ravi

Reply | Threaded
Open this post in threaded view
|

Re: Mass Inertia Matrix from URDF file

Paul E. Merrell, J.D.
In reply to this post by Jonathan Goble
On Fri, Nov 4, 2016 at 1:43 AM, Jonathan Goble [via Lua]
<[hidden email]> wrote:

> Uh... what? This is the lua-l mailing list. :-P

Weird email header, I guess. According to it, it went only to me, not
to the list.

--
[Notice not included in the above original message:  The U.S. National
Security Agency neither confirms nor denies that it intercepted this
message.]