RobotLocomotion/drake — pull request #76 by hongkai-dai (2014-03-28 01:30:28+00:00)
Title: Nonlinear program

1. Create a generic `Constraint` class, and its subclass `NonlinearConstraint`, `LinearConstraint`,`QuadraticConstraint` and `BoundingBoxConstraint`. Specifically, `NonlinearConstraint` can take a function handle as an input argument, for its `eval` function, or we can override its `eval` function in the subclass of `NonlinearConstraint`.
2. Modify `NonlinearProgram` class. I tested it with fmincon and snopt
3. Create a subclass `NonlinearProgramWConstraint`. The user need to add acceptable `Constraint` objects to this class through `addNonlinearConstraint`, `addLinearConstraint`, `addBoundingBoxConstraint` or `addCost`, this class then parses these constraints/costs and construct an NLP.
4. All `RigidBodyConstraint` has a method `generateConstraint`. The generated `Constraint` objects will be added to the NonlinearProgram
5. Rewrite `InverseKin` and `InverseKinTraj` in MATLAB as subclasses of `NonlinearProgramWConstraint`. The improvements are
* We can specify a richer class of cost and constraints. Just create the cost/constraint and add them to the IK through appropriate methods.
* Richer support for `QuasiStaticConstraint` in `InverseKinTraj`. Previously either a single `QuasiStaticConstraint` is enforced for the whole time interval, or there is no `QuasiStaticConstraint`. Now the `QuasiStaticConstraint` can be enforced for a fraction of the time, and we can support multiple `QuasiStaticConstraint` in the whole time interval, as long as they do not overlap in time.