Pause Walking unexpectedly triggered during motion #52
Replies: 9 comments
-
From your last screenshot it seems the controller is stuck in I have never run into that one. I'm not sure how it would happen if you are using SingleSupport.cpp from this repository, since the state's logic is very simple regarding transitions:
Anyhow, this is easy to check: you can print out On a side note: judging from your other two screenshots, you are using jrl-umi3218's maintained version of the controller, which is a good idea 😉 It is better to ask your question on the corresponding issue tracker then, so that package maintainers can also chime in (e.g. if this would be due to some change in another part of the framework). |
Beta Was this translation helpful? Give feedback.
-
@arntanguy It should be mentioned that after this happens, I have to force quit the terminal for closing Choreonoid. Another point is that I think the transition between states does not happen only if Please let me know if you have ideas to resolve this issue. |
Beta Was this translation helpful? Give feedback.
-
Hi, We figured out the root cause of this issue in our internal bug tracker a while ago, sorry I forgot to report it here.
We haven't investigated further, and for the time being we internally reverted to using the LSSOL solver which doesn't suffer from this issue and always manages to find a solution. Unfortunately we can't release this publicly, so you're stuck with trying to figure out why quadprog gets stuck looking for a solution. It may also be that the problem is ill-formed at that moment, and in that case we'd need to figure out if there is anything wrong with the According to the stack trace, above, it seems to get stuck somewhere in the fortran code of the solver. However it got interrupted here, so the reported error line is not necessarely here it fails (but it's likely to be in that particular loop). c
c and r = R^{-1} d_1, check also if r has positive elements (among the
c entries corresponding to inequalities constraints).
c
t1inf = .TRUE.
do 95 i=nact,1,-1
sum = work(i)
l = iwrm+(i*(i+3))/2
l1 = l-i
do 96 j=i+1,nact
sum = sum - work(l)*work(iwrv+j)
l = l+j
96 continue
sum = sum / work(l1)
work(iwrv+i) = sum #
if (iact(i) .LE. meq) goto 95
if (sum .LE. 0.d0) goto 95
7 t1inf = .FALSE.
it1 = i
95 continue I don't have time right now to try and look further into it, and am definitely not familiar with the internals of quadprog. Maybe @aescande has some further insights? |
Beta Was this translation helpful? Give feedback.
-
Thank you all,
@aescande, @arntanguy @stephane-caron
|
Beta Was this translation helpful? Give feedback.
-
Hi, That's a good summary of your options.
|
Beta Was this translation helpful? Give feedback.
-
That would be great if I could have Stephane's and Adrien's opinions as well @stephane-caron @aescande |
Beta Was this translation helpful? Give feedback.
-
Hi there, doing anything at Quadprog's level (option 1) will likely be tricky, but will always start by having a repro code for the problem. I don't think the solver can be stuck in the exact loops that Arnaud pinpointed, but it's more likely in the outer loop that contains this code. The easiest patch could be to put a maximum iteration number on this outer loop. I don't have time to delve into the fortran code right now, but I could review a patch. About the different QPs (option 2): Quadprog was chosen because it was faster than LSSOL for this problem, but LSSOL works fine. There are plenty of other QP solvers out there, some for which we have Eigen wrapping, but I cannot comment on their robustness with respect to your problem. As Arnaud said, LSSOL is available for licensing. The cost of an academic licence is iirc 200-300$. About algebraic resolution: do you have anything specific in mind ? As far as I know, algebraic resolution with inequalities quickly becomes impracticable (we're looking at exponential or double exponential complexity in the problem dimension here). |
Beta Was this translation helpful? Give feedback.
-
Waow! Good to know about these corner cases with Switching QP solver@Ahmadreza-Shahrokhshahi I guess the closest option for you then would be to switch the Removing the QP solver
By "algebraic system of equations", I'm interpreting you go for some generalized inverse (there are 2 contact wrenches summing up to 1 net wrench, so the problem is underdetermined), which is equivalent to an unconstrained least-squares optimization, which is also equivalent to removing contact wrench inequalities from the wrench distribution QP (WDQP). I haven't tried that. For you it sounds like more work, since you would need to change not only the call to the QP solver in the code but also build another set of matrices. Assuming this is done, I would expect the resulting closed-loop system to behave:
Bonus version: you can also solve unconstrained least-squares then clip wrench inequalities afterwards. This is still worse than WDQP, since numerically it will return a sub-optimum (whereas the QP solution is the constrained optimum), but it might work reasonably well. Hoping this helps! |
Beta Was this translation helpful? Give feedback.
-
Thank you all for the updates and suggestions. |
Beta Was this translation helpful? Give feedback.
-
Hi Stephane,
I am simulating the walking on a curb (single step) and the motion is automatically paused/stopped sometimes. It was first happening when I was simulating with greater heights, but in the recent simulations it also happens in the standing phase sometimes. Here are some explanation points:
It would be great to have your comments about the possible reasons for this issue.
Thanks
P.S. I have attached photos of the moment this pause happens in Standing and Curb-up motions, and also the terminal where I run Choreonoid.
Beta Was this translation helpful? Give feedback.
All reactions