Giter Club home page Giter Club logo

differentialdynamicsmodels.jl's Introduction

DifferentialDynamicsModels.jl

Build Status Build status codecov.io

Originally written to support MotionPlanning.jl, this package contains a core set of abstractions for working with dynamical systems of the form differential dynamics model, where x and u represent the state and control input of the system, respectively. This package is not intended to be a substitute for more comprehensive/domain-specific packages (e.g., DynamicalSystems.jl, RigidBodyDynamics.jl, or DifferentialEquations.jl); instead it aims to be as lightweight as possible while offering an extensible framework for operations on state/control trajectories relevant to robot trajectory planning.

DifferentialDynamicsModels.jl exports the following types:

  • DifferentialDynamics — abstract type representing the f in differential dynamics model. Instances of concrete subtypes should be callable, i.e., implement (::MyDynamics)(x, u). Examples include:
  • ControlInterval — abstract type representing a control function defined over a time interval. Concrete subtypes include:
    • StepControl (a.k.a. ZeroOrderHoldControl) — constant control input over a time interval.
    • RampControl (a.k.a. FirstOrderHoldControl) — linear interpolation between two control inputs over a time interval.
    • BVPControl — a wrapper around state/control trajectory functions produced, e.g., by an external boundary value problem solver.
  • CostFunctional - abstract type representing an objective for optimal control. Concrete subtypes include:
  • SteeringBVP{D<:DifferentialDynamics,C<:CostFunctional,SC<:SteeringConstraints,SD<:SteeringCache} — concrete type that serves as a container that both defines a two-point boundary value problem (i.e., "steering problem" connecting two states in robot motion planning parlance) and provides the means to solve it. Instances should be callable, i.e., users should define (::SteeringBVP{MyDynamics,MyCostFunctional,MySteeringConstraints,MySteeringCache}) returning a named tuple (cost=..., controls=...), leveraging Julia's multiple-dispatch on the SteeringBVP type parameters to select the right implementation. Examples include:

DifferentialDynamicsModels.jl defines the following functions that can and should be extended by dependent packages if applicable:

  • state_dim(::DifferentialDynamics) — dimension of the state x.
  • control_dim(::DifferentialDynamics) — dimension of the control input u.
  • duration(controls) — length of the time interval over which controls is defined; controls may be a single ControlInterval or an iterable container (e.g., a Vector) of ControlIntervals.
  • propagate(f::DifferentialDynamics, x::State, controls, ts) — propagates the dynamics ODE f starting from x to return a state or sequence of states at times ts. controls may be a single ControlInterval or an iterable of ControlIntervals. ts may be a single Number, an iterable of Numbers, or not be included as an argument at all, in which case it defaults to duration(controls).
  • waypoints(f::DifferentialDynamics, x::State, controls, dt_or_N) — similar to propagate but returns equally spaced states (in time) along the controlled trajectory. dt_or_N may be an AbstractFloat or an Int, corresponding to a desired spacing dt or a desired total number of waypoints N.
  • instantaneous_control(controls, ts) — similar to propagate but returns the control input instead of the state at ts.

Performance-oriented users may note that the last three functions allocate and return Vectors in the case that ts is an iterable; this package also defines the Propagate and InstantaneousControl iterators constructed in the same ways that their function counterparts are called (waypoints_itr also exists, and returns a Propagate iterator).

differentialdynamicsmodels.jl's People

Contributors

schmrlng avatar paiopaio avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.