Closed Kate88L closed 1 year ago
Hi, thanks for using Quad-SDK. I am not sure if I understand what you mean by simple vs complex models here. I am assuming you are referring to centroidal model vs full body model. Currently, we compute the desired ground reaction forces using the centroidal model and pass it to an inverse dynamics controller to realize those as joint torques. In theory, you could customize the existing framework and use the full-body model instead to directly compute joint torques. However, that would require bypassing some of the existing functionality in the robot driver.
In casadi, we have defined the Lagrangian dynamics of our model and it automatically generates c-code that the NMPC uses from the gen folder, so you could do the same for a different dynamics model.
Thank you for a clear answer. However, when you implemented adaptive and mixed complexity for the Spirit robot, you in fact allowed for a full body model in NMPC. Yet, in the available matlab script, I can see only model where legs don't have any specifi geometry. I assume you had to generate casadi functions and c-code for the full body model. Did you also use matlab for this code generation? Is there a tool you would recommend to define the dynamic model for a full body dynamics (with urdf support, probably)?
i have the same question @ardalantj
@Kate88L and @Czworldy I see, you are looking at the code that was used for the adaptive complexity MPC paper (https://arxiv.org/abs/2209.02849). That is not the default controller we use on hardware and using the more complex model in its current state is not able to run in real-time. If you want to run a robust controller on a quadruped hardware platform, I suggest using the existing NMPC controller as it does run pretty well under various disturbances.
I will close this issue, but feel free to open a new one for any follow ups.
As far as I understand, when updating the matlab script main, one can modify the parameters in the dynamics model for a custom robot and generate new casadi functions. However, this matlab script generates simple model only. Is there currently I "simple" way to generate casadi functions for the complex dynamics model in the existing matlab script? What have you used to generate the necessary casadi functions for complex dynamics model for the spirit robot?