dojo-sim / Dojo.jl

A differentiable physics engine for robotics
MIT License
294 stars 25 forks source link

Calculate mechanism state from Quaternion? #61

Closed MrstupidJ closed 1 year ago

MrstupidJ commented 1 year ago

Hi,

I am trying some custom-built controller with Dojo simulator, but I could not find the full mechanism state I need.

I can get the mechanism state with "get_minimal_state(mechanism)", however it is just for one time step. The "Storage" variable stores full trajectories from simulation but it does not include the mechanism state (the closest one I guess is the Quaternion in "Storage.q").

Is there any built-in function in Dojo so that I can transfer those Quaternion to system states? If not, do you have any suggested approach for me to attempt?

Thanks for your help!

MrstupidJ commented 1 year ago

Please check out following functions for converting states:
minimal_to_maximal(mechanism, y) maximal_to_minimal(mechanism, z)