Is there a way to get Coriolis and Gravitational forces from the dynamics engine as PyTorch tensors in the same way as Jacobian and mass matrices?

Is there a way to get Coriolis and Gravitational forces from the dynamics engine as PyTorch tensors in the same way as Jacobian and mass matrices?

It’s my question too, there is nothing in the documents. It’s possible to calculate them indirectly though too much work!

My question is the same.
Also I want to access pd force from the pd controller in positional control mode.
Otherwise I need to manually write a code to calculate control force but I need Coriolis and Gravitational forces instead to implement stable pd controller, which is still impossible.

We had a long discussion about this here:

1-It seems like we don’t have access to Coriolis and Gravitational matrices in Gym since we don’t have full access to PhysX from Gym environment, they might add it in the future though.
2- Using force sensors you get sum of all the forces applying to a joint or body so not much helpful!
3- You might be able to back propagate from PD controller output and calculate the input, something like this: Force= Kp(theta-theta0)+Kd(v-v0) but only for each step, not sub steps. Better way is to make your own PID controller for position and velocity control, legged gym environment is a good example for this method.

1 Like

Thank you for providing relevant discussion :)
Like what you’ve mentioned here, I chose to approximate control force from the simple PD controller.
This alternative method seems okay so far, but once I found this can be problematic due to error I will refer to the legged gym environment.
Thank you for your advice.

1 Like

Having your own PID controller for position control in effort mode is very easy and as good as position mode, easier than calculating force from that approximation.

2 Likes