Hello Aditya, we are glad you are using one of the HEBI Robots.
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)
We don't provide the
manipulator inertia matrix M(q) of the individual modules and links. However, treating each as a point mass gets you most of the way there on the respective bodies. Then forming the M(q) matrix for the system is still a bit manual there but shouldn't be too hard.
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)
You will have to manipulate or create a modify get_dynamic_comp_efforts function that gets the output to be just M(q) and not M(q)(q**) for your use case. The original get_dynamic_comp_efforts code is available here:
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.