Estimating the inertia matrix for the bracket

Questions that are not language-specific
Post Reply
kayke
Posts: 2
Joined: Mon Jul 13, 2020 6:22 pm

Estimating the inertia matrix for the bracket

Post by kayke » Mon Aug 24, 2020 2:35 pm

Hi all!

I am updating the HRDF for my hebi arm kit. The arm adds one more joint to the standard 6-DOF kit. Because our application requires high-accuracy modeling, I replaced the brackets and links in the hrdf file with custom rigid body whose transformation parameters represent more accurately our setup.

I hope to use the get_grav_comp function that comes with the Hebi API which uses the inertia matrix in the updated HRDF file. I need to know how to estimate the inertia matrix for the brackets and links that I replaced. The parameters don't need to be very accurate, as long as they are accurate enough for the get_grav_comp function.

My hebi arm used the X5HeavyRightOutside, X5LightRight and X5LightLeft brackets and the X5 extension links. I attached a previous version of my HRDF to show my set up.

Right now, I use the following code to modify this HRDF. Note that I used an identity matrix as inertia for now.

Code: Select all

newmodel.add_actuator('X8-16')
DH_transformation=get_DH_transformation(FK[1,0],FK[1,1],FK[1,2]-0.0451,0)
newmodel.add_rigid_body(np.identity(4), np.ones(6), 1.0,
                          DH_transformation, False)
newmodel.add_actuator('X8-9')
If you can tell us how to roughly estimate the inertia or at least the CoM it would be great!

Best
Kay
Attachments
chopstick7D.hrdf.tar.gz
Old HRDF file that uses default bracket and link
(279 Bytes) Downloaded 15 times
kayke
Posts: 2
Joined: Mon Jul 13, 2020 6:22 pm

Re: Estimating the inertia matrix for the bracket

Post by kayke » Mon Aug 24, 2020 2:59 pm

I am inspecting the URDF generated by hebi_description repo (https://github.com/personalrobotics/hebi_description) and found that there are rough estimations for inertia and CoM there.

For example, the URDF contains some inertia for the X5 Bracket Light that connects two X5 joints:
<inertial>
<origin rpy="0 0 0" xyz="0 -.0215 .02"/>
<mass value="0.1"/>
<inertia ixx="0.000144" ixy="0.0" ixz="0.0" iyy="0.000144" iyz="0.0" izz="0.000144"/>
</inertial>
1) Are those the same estimations that the HRDF is normally based on?
2) Can I copy those parameters directly and use them to specify the CoM and inertia for my HRDF? e.g. Are those in the correct frames for HRDF already?

One additional question: I found that the URDF estimate the X5 actuator to have 0.311 depth whereas the HRDF default suggest that the depth should be 0.3105, which one should I follow? I would hope to keep my parameters consistent between the HRDF ( which we use as kinematic model ) and URDF (which we generate a dynamic model from).

Best
Kay
User avatar
matt_tesch
HEBI Official
Posts: 11
Joined: Mon Mar 30, 2020 9:14 am
Location: Pittsburgh, USA

Re: Estimating the inertia matrix for the bracket

Post by matt_tesch » Tue Aug 25, 2020 12:54 am

Thanks for the great question!

A couple of notes:
I need to know how to estimate the inertia matrix for the brackets and links that I replaced. The parameters don't need to be very accurate, as long as they are accurate enough for the get_grav_comp function.


Since the "get grav comp" function returns the efforts required to maintain static equilibrium, the inertia is not used by this function. It is passed into the API as a placeholder for future capabilities (using this to provide more accurate dynamics for the "get dynamic comp efforts" function in the future, primarily), but is currently unused internally. You can pass the identity matrix, or use the values from the URDF file.

As you indicated, though, you will need the mass and center of mass properties. The URDF files are designed to match the frame conventions of the HRDF, so these values are safe to use. The xacro elements that create these URDFs are modeled using the same masses and inertias as our APIs set internally. The inertias for the APIs and URDF files are generated through assumptions of a sphere centered at the COM for the brackets and actuators, and a thin rod for the links. If you are interested in the exact dimensions used for the calculations there, I can share those, but it is only a rough approximation. Given the speeds the actuators move at, and considering the relative contribution of different forces, these estimates are probably enough for most applications. However, we haven't done significant tests to identify the actual inertia values here.

It seems like you have done this next set of steps, but I wanted to clarify this for other readers:

If you like, you can also query the properties of the HRDF via the "get masses" and "get forward kinematics" functions through the robot model class; this returns the mass of each body and the FK can be used to determine the COM. You can do this by:
(a) calling "get forward kinematics" with the "Input" frame type
(b) calling "get forward kinematics" with the "Center of Mass" frame type
(c) transforming the COM 4x4 transform by the inverse of the input frame 4x4 transform to get the COM relative to the input of that element.

The small difference you noted here is due to periodic adjustment of the masses and center of masses as we refine our estimates. For example, small hardware changes may result in tiny changes of the mass between subsequent revisions of the hardware, or we may determine a different average mass as we take more samples, for example. These changes are small (half of a millimeter, or less than 0.2%), and so should not affect the calculations. However, if I had to pick a ground truth I would go with the URDF estimates in your case, b/c that is where you are generating the dynamic model, and these are dynamic parameters.

Hope this helps!
Matt
Post Reply