dair_pll.integrator
Classes for time integration on state spaces
This module implements an Integrator
abstract type which is a
convenience wrapper for various forms of integrating dynamics in time over a
StateSpace
. As state spaces are assumed to be the product space of a Lie
group and its associated algebra (G x g), there are several options for which a
“partial step” partial_step
might be defined for mapping current states
to next states:
x -> x’ in G x g (current state to next state)
x -> dx in g x R^n_v, and x’ = x * exp(dx) (current state to state delta)
x -> v’ in g, and q’ = q * exp(v’) (current state to next velocity)
x -> dv in R^n_v, v’ = v + dv (current state to velocity delta)
x -> q’ in G, and v’ = log(q’ * inv(q))/dt (current state to next configuration)
x -> dq in g, q’ = q * exp(dq), v’ = log(q’ * inv(q))/dt (current state to configuration delta).
Each option is implemented as a convenience class inheriting from
Integrator
.
In addition to this state mapping, the integrator allows for an additional
hidden state denoted as carry
to be propagated through .
Integrator
objects have a simulation interface that requires an
initial condition in the form of an initial state and carry
.
- class dair_pll.integrator.Integrator(space, partial_step_callback, dt)[source]
-
Class that manages integration in time of given dynamics.
Takes in a
partial_step
callback object which defines the underlying dynamics abstractly. Inheriting classes makes this relationship concrete.This class is primarily used for its
simulate()
method which integrates forward in time from a given initial condition.Inits
Integrator
with specified dynamics.- Parameters:
-
partial_step_callback:
typing.Optional
[typing.Callable
[[Tensor
,Tensor
],Tuple
[Tensor
,Tensor
]]]
- abstract step(x, carry)[source]
Takes single step in time.
Abstract wrapper which inheriting classes incorporate
partial_step()
into to complete a single time step.
- static calc_out_size(space)[source]
Final dimension of output shape of
partial_step()
- Return type:
- class dair_pll.integrator.StateIntegrator(space, partial_step_callback, dt)[source]
Bases:
Integrator
Convenience class for
Integrator
wherepartial_step()
maps current state directly to next state.Inits
Integrator
with specified dynamics.- Parameters:
- class dair_pll.integrator.DeltaStateIntegrator(space, partial_step_callback, dt)[source]
Bases:
Integrator
Convenience class for
Integrator
wherepartial_step()
maps current state to state delta.Inits
Integrator
with specified dynamics.- Parameters:
- class dair_pll.integrator.VelocityIntegrator(space, partial_step_callback, dt)[source]
Bases:
Integrator
Convenience class for
Integrator
wherepartial_step()
maps current state to next velocity.Inits
Integrator
with specified dynamics.- Parameters:
- class dair_pll.integrator.DeltaVelocityIntegrator(space, partial_step_callback, dt)[source]
Bases:
Integrator
Convenience class for
Integrator
wherepartial_step()
maps current state to velocity delta.Inits
Integrator
with specified dynamics.- Parameters:
- class dair_pll.integrator.ConfigurationIntegrator(space, partial_step_callback, dt)[source]
Bases:
Integrator
Convenience class for
Integrator
wherepartial_step()
maps current state to next configuration.Inits
Integrator
with specified dynamics.- Parameters:
- class dair_pll.integrator.DeltaConfigurationIntegrator(space, partial_step_callback, dt)[source]
Bases:
Integrator
Convenience class for
Integrator
wherepartial_step()
maps current state to configuration delta.Inits
Integrator
with specified dynamics.- Parameters: