Skip to content

Navigation Menu

Sign in
Sign up

Questions about some details of the solver #1301

Answered by cmastalli
lrchit asked this question in Q&A
Discussion options

Hi,

Thanks for your incredible work! Crocoddyl is really fast! I'm using Crocoddyl for some trajectory optimization of quadruped robot and I still have some questions about the process.

I notice that in your example, problem->quasiStatic() is called before calling solver->solve(). I wonder if this should be done every time before calling of solver. If not, what should init_xs and init_us be as initial guess? My understanding is that x_init should be the current state replicated n+1 times, and u_init should be the solution produced from the previous iteration. I'm not sure if I should do "rollout" to obtain a feasible trajectory here.

Moreover, in forward dynamics mpc, the intuitive approach would be using contact forces and joint torques as inputs, but in Crocoddyl contact forces are implicitly considered as constraints through pinocchio::forwardDyanmics(). What are the benefits of doing this?

Lastly, can I customize the dynamics and their discretization modules and then use the FDDP solver in Crocoddyl? I would like to do some other forward dynamics mpcs, in which contact impulse might be determined by states and inputs and thus the motion function is used to obtain qdd, like this: https://arxiv.org/pdf/2312.08961.

Thanks in advance for your response!

Best,
Ruochen

You must be logged in to vote

Hi @lrchit,

When solving nonlinear optimal control problems, passing an initial guess of the solution is convenient. This is what your question is about. For instance, the quasiStatic function computes quasi-static inputs for given system configurations. This function is generally expensive to run as it requires a pseudo-inverse for contact dynamics.

As you can see in our examples, these simple initialization strategy leads to good convergence in plenty of practical problems in robotics. However, we can implement more appropriate strategies in model predictive control (MPC). For instance, one classical approach is to use the previous MPC solution. Other alternatives can be done via levera...

Replies: 1 comment 1 reply

Comment options

Hi @lrchit,

When solving nonlinear optimal control problems, passing an initial guess of the solution is convenient. This is what your question is about. For instance, the quasiStatic function computes quasi-static inputs for given system configurations. This function is generally expensive to run as it requires a pseudo-inverse for contact dynamics.

As you can see in our examples, these simple initialization strategy leads to good convergence in plenty of practical problems in robotics. However, we can implement more appropriate strategies in model predictive control (MPC). For instance, one classical approach is to use the previous MPC solution. Other alternatives can be done via leveraging learning such as demonstrated in one of our works:

In forward dynamics cases, the contact forces are implicitly optimized and indeed store them and compute the analytical derivatives as explained at https://arxiv.org/pdf/2203.07554. The benefit of doing this is reducing the number of decision variables, which reduces the computation time.

You can develop your dynamics and solvers; however, these could be unlikely to be merged as Crocoddyl v3 (under development in my lab) has already significant changes in the dynamics and solver API. This is because Crocoddyl will handle optimal estimation problems in the future, as we recently reported in this paper:

Regards,
Carlos

You must be logged in to vote
1 reply
Comment options

Hi, @cmastalli,

Thank you for your prompt reply. I will take a look at your paper. Looking forward to the release of your new version.

Best,
Ruochen

Answer selected by lrchit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1299 on September 07, 2024 07:26.

AltStyle によって変換されたページ (->オリジナル) /