We're working on a Daisy Hexapod and we're trying to do something with the torque data from the joints. For our application to be fruitful we need to find out the different terms of the standard equation for dynamic torque:
Tau = M(q)(q••) + C(q, q•)(q•) + g(q) + Tau_end-effector
Where M is the inertia matrix, C is the Coriolis and Centripetal matrix, g is the torque due to gravity, q is the angle of joints, q• is the angular velocity, q•• is the angular acceleration and Tau is the torque.
Which can be generated by the Euler-Lagrange equations formulated using the Lagrangian.
Is there any tool present to help in finding any of these out? The closest thing I could find was the getMasses function that outputs the location of the centre of masses of the links, in the body the body frame. Even using this, a lot of manual calculation is required to actually get the M and C matrices or form the Lagrangian, let alone differentiate it to get this equation.
Thanks for your help ,
We don't have a particular function that can calculate all parts of the equation of motions, but we do provide the tools to get you 90% of the way there.
To compute the effect of gravitational forces g(q) on the legs, you can use our gravity compensation torques to get the 3x1 external forces matrix. This should get a very good approximation.
Make sure you are on the newest version of the HEBI Python API.
Code: Select all
''' Main Function: get_grav_comp_efforts(positions: npt.NDArray[np.float64], gravity: npt.NDArray[np.floating[Any]], output=None) ''' position = arm.last_feedback.position gravity = [0,0,-9.81] gravComp_Array = arm.robot_model.get_grav_comp_efforts(position, gravity, output=None)
The "get dynamics comp torques" logic we supply in the APIs and examples also takes care of most of this -- it basically provides to solution to M(q)(q**), and in that function, =the matrix we create is essentially M(q) (assuming point masses)
Code: Select all
get_dynamic_comp_efforts(fbk_positions, cmd_positions, cmd_velocities, cmd_accels, dt=0.001)
https://github.com/HebiRobotics/HEBI-Co ... l.py#L800
Lastly, with the relative masses and the speeds we are moving at, I believe the coriolis terms are inconsequential and can be assumed to be zero. There are much more significant sources of error here.
Link to HEBI Python ARM API: https://files.hebi.us/docs/python/2.6.1 ... mp_efforts
Let me know if you have anymore questions.