Hi,
I'm trying to calculate the jacobian of the COM of the robot. Is this the right way to do it?
def jacpCOM(model, data):
total_mass = mujoco.mj_getTotalmass(model)
jacp_i = np.zeros((3,model.nv))
jacp_COM = np.zeros((3,model.nv))
for i in range(model.nbody):
mi = model.body_mass[i]/total_mass
mujoco.mj_jacBodyCom(model, data, jacp_i, None, i)
jacp_COM += mi*jacp_i
return jacp_COM
Hi,
I'm trying to calculate the jacobian of the COM of the robot. Is this the right way to do it?