Schortenger
Schortenger

Reputation: 1

Drake with GurobiSolver for mixed integer programming problem

I'm trying to use Drake to solve mixed integer programming problem. One challenge is that my dynamics is nonlinear, with rotation matrix. I tried Gurobi solver to solve this problem, but it shows error like "GurobiSolver is unable to solve because a GenericConstraint was declared but is not supported." May I ask how to deal with this kind of problem in Drake with GurobiSolver?

By the way, I know one way is as this link pointed out, but using SNOPT with hard constraints doesn't produce good results. I think GurobiSolver might be better for this kind of MIQP problem.

Upvotes: 0

Views: 142

Answers (1)

Hongkai Dai
Hongkai Dai

Reputation: 2766

When you use rotation matrix in your optimization problem, you will need the SO(3) constraints

RᵀR=I

Do you mean you want to impose this as a quadratic equality constraint? Theoretically Gurobi could handle this non-convex quadratic constraints (but currently not supported from Drake's interface). In practice we find that if you have several non-convex quadratic constraints, Gurobi will be quite slow.

If the only non-convex quadratic constraints in your problem is just rotation matrix SO(3) constraints, then Drake has implemented a customized mixed-integer linear/second-order-cone constraints to approximately satisfy SO(3) constraints. The code is in https://github.com/RobotLocomotion/drake/blob/eb4df7d3cde2db48c697943c43395a3f2b74e00c/solvers/mixed_integer_rotation_constraint.h#L50. One example is in https://github.com/RobotLocomotion/drake/blob/eb4df7d3cde2db48c697943c43395a3f2b74e00c/multibody/inverse_kinematics/global_inverse_kinematics.cc#L113. The math is described in our paper

Upvotes: 0

Related Questions