Autoware.Auto
autoware::motion::motion_model::CatrModel Class Reference

This is a constant acceleration, constant turn-rate motion model. This model produces clothoidal trajectories and corresponds to a zero order hold on vehicle controls (throttle and steer angle) More...

#include <catr_model.hpp>

Inheritance diagram for autoware::motion::motion_model::CatrModel:
Collaboration diagram for autoware::motion::motion_model::CatrModel:

Public Member Functions

CatrModeloperator= (const CatrModel &rhs)
 Default assignment operator. More...
 
void predict (Eigen::Matrix< float32_t, 6U, 1U > &x, const std::chrono::nanoseconds &dt) const override
 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...
 
void predict (const std::chrono::nanoseconds &dt) override
 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...
 
void compute_jacobian (Eigen::Matrix< float32_t, 6U, 6U > &F, const std::chrono::nanoseconds &dt) override
 Compute the jacobian based on the current state and store the result somewhere else. More...
 
void compute_jacobian_and_predict (Eigen::Matrix< float32_t, 6U, 6U > &F, const std::chrono::nanoseconds &dt) override
 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...
 
float32_t operator[] (const index_t idx) const override
 Get elements of the model's state. More...
 
void reset (const Eigen::Matrix< float32_t, 6U, 1U > &x) override
 Set the state. More...
 
const Eigen::Matrix< float32_t, 6U, 1U > & get_state () const override
 const access to internal state More...
 
- Public Member Functions inherited from autoware::motion::motion_model::MotionModel< 6U >
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 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 void reset (const Eigen::Matrix< float32_t, NumStates, 1U > &x)=0
 Set the state. More...
 
constexpr index_t get_num_states () const noexcept
 get dimensionality of this model More...
 
virtual ~MotionModel ()=default
 Destructor. More...
 

Detailed Description

This is a constant acceleration, constant turn-rate motion model. This model produces clothoidal trajectories and corresponds to a zero order hold on vehicle controls (throttle and steer angle)

Member Function Documentation

◆ compute_jacobian()

void autoware::motion::motion_model::CatrModel::compute_jacobian ( Eigen::Matrix< float32_t, 6U, 6U > &  F,
const std::chrono::nanoseconds &  dt 
)
override

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

◆ compute_jacobian_and_predict()

void autoware::motion::motion_model::CatrModel::compute_jacobian_and_predict ( Eigen::Matrix< float32_t, 6U, 6U > &  F,
const std::chrono::nanoseconds &  dt 
)
override

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

◆ get_state()

const Eigen::Matrix< float32_t, 6U, 1U > & autoware::motion::motion_model::CatrModel::get_state ( ) const
overridevirtual

const access to internal state

Returns
const reference to internal state vector

Implements autoware::motion::motion_model::MotionModel< 6U >.

◆ operator=()

CatrModel & autoware::motion::motion_model::CatrModel::operator= ( const CatrModel rhs)

Default assignment operator.

Parameters
[in]rhsObject to copy
Returns
reference to this object

◆ operator[]()

float autoware::motion::motion_model::CatrModel::operator[] ( const index_t  idx) const
overridevirtual

Get elements of the model's state.

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

Implements autoware::motion::motion_model::MotionModel< 6U >.

◆ predict() [1/2]

void autoware::motion::motion_model::CatrModel::predict ( Eigen::Matrix< float32_t, 6U, 1U > &  x,
const std::chrono::nanoseconds &  dt 
) const
override

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

◆ predict() [2/2]

void autoware::motion::motion_model::CatrModel::predict ( const std::chrono::nanoseconds &  dt)
overridevirtual

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

Implements autoware::motion::motion_model::MotionModel< 6U >.

◆ reset()

void autoware::motion::motion_model::CatrModel::reset ( const Eigen::Matrix< float32_t, 6U, 1U > &  x)
override

Set the state.

Parameters
[in]xthe state to store internally

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