Autoware.Auto
autoware::motion::motion_model::MotionModel< NumStates > Class Template Referenceabstract

Virtual interface for all motion models for use with prediction. More...

#include <motion_model.hpp>

Inheritance diagram for autoware::motion::motion_model::MotionModel< NumStates >:

Public Member Functions

virtual void predict (Eigen::Matrix< float32_t, NumStates, 1U > &x, const std::chrono::nanoseconds &dt) const =0
 Do motion based on current state, store result somewhere else. This is intended to be used with motion planning/collision avoidance, i.e. to make multiple calls to predict with different time deltas for a rollout to get a concrete representation of predicted trajectories. This function does not mutate the core state of the motion model, and should only mutate some cached worker variables at most. More...
 
virtual void predict (const std::chrono::nanoseconds &dt)=0
 Update current state with a given motion. Note that this should be called after compute_jacobian() as it will change the object's state. This is meant to be called before doing assignment and observation updating. This is the equivalent of temporal update for the state. This function mutates the core state of the motion model. More...
 
virtual void compute_jacobian (Eigen::Matrix< float32_t, NumStates, NumStates > &F, const std::chrono::nanoseconds &dt)=0
 Compute the jacobian based on the current state and store the result somewhere else. More...
 
virtual void compute_jacobian_and_predict (Eigen::Matrix< float32_t, NumStates, NumStates > &F, const std::chrono::nanoseconds &dt)=0
 This is called by Esrcf. This should be first a computation of the jacobian, and then a motion to update the state. This is a distinct function because depending on the motion model, there is some caching and optimization that can be done computing both the motion and jacobian together. More...
 
virtual float32_t operator[] (const index_t idx) const =0
 Get elements of the model's state. More...
 
virtual void reset (const Eigen::Matrix< float32_t, NumStates, 1U > &x)=0
 Set the state. More...
 
virtual const Eigen::Matrix< float32_t, NumStates, 1U > & get_state () const =0
 const access to internal state More...
 
constexpr index_t get_num_states () const noexcept
 get dimensionality of this model More...
 
virtual ~MotionModel ()=default
 Destructor. More...
 

Detailed Description

template<int32_t NumStates>
class autoware::motion::motion_model::MotionModel< NumStates >

Virtual interface for all motion models for use with prediction.

Template Parameters
NumStatesdimensionality of this model's state space

Constructor & Destructor Documentation

◆ ~MotionModel()

template<int32_t NumStates>
virtual autoware::motion::motion_model::MotionModel< NumStates >::~MotionModel ( )
virtualdefault

Destructor.

Member Function Documentation

◆ compute_jacobian()

template<int32_t NumStates>
virtual void autoware::motion::motion_model::MotionModel< NumStates >::compute_jacobian ( Eigen::Matrix< float32_t, NumStates, NumStates > &  F,
const std::chrono::nanoseconds &  dt 
)
pure virtual

Compute the jacobian based on the current state and store the result somewhere else.

Parameters
[out]Fmatrix to store jacobian into
[in]dtprediction horizon to build jacobian off of

Implemented in autoware::motion::motion_model::ParameterEstimator< NumStates >.

◆ compute_jacobian_and_predict()

template<int32_t NumStates>
virtual void autoware::motion::motion_model::MotionModel< NumStates >::compute_jacobian_and_predict ( Eigen::Matrix< float32_t, NumStates, NumStates > &  F,
const std::chrono::nanoseconds &  dt 
)
pure virtual

This is called by Esrcf. This should be first a computation of the jacobian, and then a motion to update the state. This is a distinct function because depending on the motion model, there is some caching and optimization that can be done computing both the motion and jacobian together.

Parameters
[out]Fmatrix to store jacobian into
[in]dtprediction horizon to build jacobian off of

Implemented in autoware::motion::motion_model::ParameterEstimator< NumStates >.

◆ get_num_states()

template<int32_t NumStates>
constexpr index_t autoware::motion::motion_model::MotionModel< NumStates >::get_num_states ( ) const
inlineconstexprnoexcept

get dimensionality of this model

Returns
number of dimensions in this model

◆ get_state()

template<int32_t NumStates>
virtual const Eigen::Matrix<float32_t, NumStates, 1U>& autoware::motion::motion_model::MotionModel< NumStates >::get_state ( ) const
pure virtual

const access to internal state

Returns
const reference to internal state vector

Implemented in autoware::motion::motion_model::ParameterEstimator< NumStates >.

◆ operator[]()

template<int32_t NumStates>
virtual float32_t autoware::motion::motion_model::MotionModel< NumStates >::operator[] ( const index_t  idx) const
pure virtual

Get elements of the model's state.

Parameters
[in]idxindex of state variable to get
Returns
copy of state variable

Implemented in autoware::motion::motion_model::ParameterEstimator< NumStates >, autoware::motion::motion_model::ConstantAcceleration, autoware::motion::motion_model::ConstantVelocity, and autoware::motion::motion_model::CatrModel.

◆ predict() [1/2]

template<int32_t NumStates>
virtual void autoware::motion::motion_model::MotionModel< NumStates >::predict ( const std::chrono::nanoseconds &  dt)
pure virtual

Update current state with a given motion. Note that this should be called after compute_jacobian() as it will change the object's state. This is meant to be called before doing assignment and observation updating. This is the equivalent of temporal update for the state. This function mutates the core state of the motion model.

Parameters
[in]dtprediction horizon based on current state

Implemented in autoware::motion::motion_model::ConstantAcceleration, autoware::motion::motion_model::ParameterEstimator< NumStates >, autoware::motion::motion_model::ConstantVelocity, and autoware::motion::motion_model::CatrModel.

◆ predict() [2/2]

template<int32_t NumStates>
virtual void autoware::motion::motion_model::MotionModel< NumStates >::predict ( Eigen::Matrix< float32_t, NumStates, 1U > &  x,
const std::chrono::nanoseconds &  dt 
) const
pure virtual

Do motion based on current state, store result somewhere else. This is intended to be used with motion planning/collision avoidance, i.e. to make multiple calls to predict with different time deltas for a rollout to get a concrete representation of predicted trajectories. This function does not mutate the core state of the motion model, and should only mutate some cached worker variables at most.

Parameters
[out]xvector to store result into
[in]dtprediction horizon based on current state

Implemented in autoware::motion::motion_model::ParameterEstimator< NumStates >.

◆ reset()

template<int32_t NumStates>
virtual void autoware::motion::motion_model::MotionModel< NumStates >::reset ( const Eigen::Matrix< float32_t, NumStates, 1U > &  x)
pure virtual

Set the state.

Parameters
[in]xthe state to store internally

Implemented in autoware::motion::motion_model::ParameterEstimator< NumStates >.


The documentation for this class was generated from the following file: