Version v0.7 is a dramatic reduction in scope from the previous versions.
The focus starting from this version is to provide a simple API for defining
trajectory optimization problems, leaving the task of evaluating and solving
these to the solvers that wish to consume the Problem type.
Some notable changes:
Problemconstructor now hasx0as position argument andxfas keyword argument- The
Problemtype now stores a vector ofRobotDynamics.DiscreteDynamicsmodels, allowing for changing dynamics models (i.e. hybrid dynamics) along the trajectory. - Objectives no longer multiply "stage" costs by the time step automatically. This is left up to the user.
- The package no longer provides methods to evaluate cost or constraint expansions
for the entire problem. Types such as
AbstractConstraintValsorCostExpansionhave been removed. - The package no longer provides native support for
MathOptInterface. This functionality should be implemented by the solvers themselves.
Treats equality constraints as cones.
Fixes deprecation warnings and small API changes from RobotDynamics v0.4.3, including:
- Replacing
TrajwithSampledTrajectory - Using
RobotDynamics.dimsinstead ofBase.size - Using
RobotDynamics.errstate_jacobian!instead ofRobotDynamics.state_diff_jacobian!
Allows for both inplace and out-of-place dynamics, cost, and constraint evaluations. Jacobians can be calculated using finite differences, forward AD, or user-specified. Avoids prohibitively long compilation times for larger state and control dimensions.
- Replaced
lengthandsizemethods withstate_dim,control_dim,output_dimanddims. Problemconstructor is now of the formProblem(model, obj, xf, tf, [x0, constraints]) Note thatx0is now a required positional argument andxf` is an optional keyword argument.- Integration for dynamics is now specified by the model instead of a type parameter.
- Support for direct collocation via MathOptInterface has been removed (will be implemented in a separate repo in the future)
Added support for finite differencing with FiniteDiff for dynamics, constraints, and cost functions.
Generic nonlinear costs are now officially supported and can be automatically differentiated using either ForwardDiff or FiniteDiff.
The new Expansion type is provided for storing cost expansions, and is now preferred for use over QuadraticCost. It supports both xx,xu,uu,x,u and Q,H,R,q,r fields.
In general, the way cost functions were used has been cleaned up. QuadraticObjective and other such type aliases have been removed in favor of a less complicated API.
Documentation has been significantly updated.
TrajectoryOptimization now add support for generalized inequalities / conic constraints. As of 0.4.0 only 2 cones are implemented:
NegativeOrthan- equivalent toInequalitySecondOrderCone
Several constraints, most notably NormConstraint support passing in SecondOrderCone as the sense argument, which enforces that the output of
the evaluate function lies in the second-order cone, with the last element
of the vector being the scalar.
This allows solvers to define their own instantiations of this type, while providing many convenient methods automatically defined on the super-type.
Added DiagonalLieCost that penalizes the geodesic distance between a quaternion in the state and a reference quaternion.