drake::solvers::SolverOptions options;
options.SetOption(drake::solvers::**?**, "verbose", {0, 1}); //{0,1} for verbose, {0,0} for no verbosity
const auto result = Solve(ik.prog(), {}, options);
const auto q_sol = result.GetSolution(ik.q());
What do I set the SolverId to for solving the Inverse Kinematics nlp problem?
You have two options here:
result
std::cout << result.get_solver_id().name() << "\n";
if it prints "IPOPT", then you can do options.SetOption(drake::solvers::IpoptSolver::id(), ...)
.options.SetOption(CommonSolverOption::kPrintToConsole, 1);
which will print the output information to the console for any solver that supports console printing. You can also do options.SetOption(CommonSolverOption::kPrintFileName, "output.txt")
which will print the output to output.txt
file.