Closed Joaoloula closed 4 years ago
Good morning, @Joaoloula. For questions like this, we'd ask for you please to post the question to StackOverflow, instead of the issue database. (Use the #drake tag to get our attention there.)
I'll also add that from a very quick skim of the example above, it looks like the problematic situation has all revolute joints initialized to a zero initial guess prior to solving. That particular kind of configuration has historically been very difficult for SNOPT to solve. I consider it a best practice to set revolute joints initial guesses to non-zero -- even a fairly small initial angle seems to be enough to unstick SNOPT. I do not know whether kInfeasibleConstraints
is to be expected in this case.
I've encountered a situation where 1) calling SNOPT on a problem that is feasible by construction yields kInfeasibleConstraints, 2) the problem goes away if a random initialization is used. It's an inverse kinematics problem, and the code is here:
and here's the simple 3-dof model for reproduction:
Is this behavior correct? I assume this has something to do with the problem not being well-posed, but my understanding is that the behavior is still strange---I'm happy for the solver to fail here, but the infeasible constraints flag seems misleading. I've tried adding a tolerance, both in the constraints and through SolverOptions, and the output only changes around values of ~1. Let me know if there are clarifications or variations I could run that would be helpful.