ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How can I compute the tensor of inertia using the link's inertia properties?

asked 2019-12-28 06:30:29 -0500

spyros_mech gravatar image

updated 2019-12-28 07:14:57 -0500

gvdhoorn gravatar image

Dear all,

I am interested to compute the dynamics of a robot given its URDF file. In the URDF the inertia is given in the form

<inertia ixx="0.4" ixy="0.0" ixz="0.0" iyy="0.4" iyz="0.0" izz="0.2"/>

In http://wiki.ros.org/urdf/Tutorials/Ad... the "rotational inertia matrix" is given in the form: [Ixx Ixy Ixz;Ixy Iyy Iyz;Ixz Iyz Izz].

My question is, which is the relationship between the "rotational inertia matrix" and the Tensor of inertia [Ixx -Ixy -Ixz;-Ixy Iyy -Iyz;-Ixz -Iyz Izz] used in order to compute the robot dynamics.

Thank you in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-12-31 09:33:30 -0500

guru_florida gravatar image

updated 2019-12-31 09:35:51 -0500

I am working on this in ROS2 as we speak. I have created a new node and imported the dependencies orocos_kdl and kdl_parser. These are both available in ROS or ROS2 as they are used by TF. I then followed the example in this test unit of the kdl_parser: https://github.com/ros2/kdl_parser/bl...

However, the test is actually a False Positive and fails to test anything but passes! Simple bug they forgot to size the torques_1/2 arrays using chain.getNrOfJoints(). Still, this test is a good code example of computing the Inverse Dynamics and with the simple code fix of torques_1.resize( chain.getNrOfJoints() )added it works. I have a github issue posted here: https://github.com/ros/kdl_parser/iss...

So in this code you pass in q, qdot and qdotdot and wrenches (f_ext) vectors: Parameters:

  • q The current joint positions
  • q_dot The current joint velocities
  • q_dotdot The current joint accelerations
  • f_ext The external forces (no gravity) on the segments. Gravity vector is provided in the constructor.

Output parameters:

  • torques the resulting torques for the joints

There are other Solvers in the orocos_kdl and kdl_parser libraries. If solving this kind if ID problem is not what your looking for take a look around the github code, unit tests, and docs and I bet there is the one you are looking for. If you are using ROS2 I can share my code...I just made it yesterday so dont expect much lol but we could possibly work on it together if we are solving the same problem. At the moment I am adding gravity compensation for a humanoid, but will be moving on to contact detection and other issues.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-12-28 06:30:29 -0500

Seen: 246 times

Last updated: Dec 31 '19