Autoware.Auto
autoware::prediction Namespace Reference

Functionality relating to prediction, including state estimation, kinematic prediction, maneuver-based prediction, map-aware prediction etc... More...

Namespaces

 detail
 
 kalman_filter
 Contains the kalman filter package and related classes and functionality.
 
 state
 
 state_estimation_nodes
 
 variable
 

Classes

struct  AngleVariable
 A tag struct used to disambiguate variables that store angles from other types. More...
 
class  DifferentialDriveMotionModel
 A generic differential motion model. This class only exists to be specialized for specific motion model implementations. More...
 
class  FilterInterface
 Interface for a filter that can be used to track an object. More...
 
class  GenericState
 A representation of a generic state vectors with specified variables. More...
 
class  History
 This class encapsulates a history of events used with EKF. More...
 
struct  is_angle
 A trait to check if a variable represents an angle. More...
 
struct  is_state
 Forward-declare is_state trait. More...
 
struct  is_state< GenericState< ScalarT, VariableTs... > >
 A specialization of this trait for GenericState type. More...
 
struct  is_variable
 A trait to check if a type is a variable by checking if it inherits from Variable. More...
 
class  KalmanFilter
 A Kalman filter implementation. More...
 
class  KalmanFilterWrapper
 This class provides a high level interface to the Kalman Filter allowing to predict the state of the filter with time and observe it by receiving ROS messages. More...
 
class  LinearMeasurement
 A class that represents a linear measurement. More...
 
class  LinearMotionModel
 A generic linear motion model class. More...
 
class  Measurement
 
struct  MeasurementInterface
 A CRTP interface to any measurement. More...
 
class  MotionModelInterface
 A CRTP interface for any motion model. More...
 
class  NoiseInterface
 A CRTP interface for implementing noise models used for providing motion model noise covariance. More...
 
struct  PredictionEvent
 An event to indicate a prediction step. More...
 
struct  ResetEvent
 An event to reset the state of the filter. More...
 
class  SteadyTimeGrid
 This is a utility class that allows querying timestamps on a 1D grid. More...
 
struct  Variable
 A tag struct used to disambiguate variables from other types. More...
 
class  WienerNoise
 A class that describes the Wiener process noise. More...
 

Typedefs

template<typename ... Ts>
using FloatState = GenericState< common::types::float32_t, Ts... >
 A typedef for the 32 bit floating point state. More...
 
template<typename ... Ts>
using DoubleState = GenericState< common::types::float64_t, Ts... >
 A typedef for the 64 bit floating point state. More...
 
using CvtrMotionModel = DifferentialDriveMotionModel< state::ConstantVelocityAndTurnRate >
 An alias of the differential drive motion model for the state::ConstantVelocityAndTurnRate state. More...
 
using CatrMotionModel = DifferentialDriveMotionModel< state::ConstantAccelerationAndTurnRate >
 An alias of the differential drive motion model for the state::ConstantAccelerationAndTurnRate state. More...
 
using ConstantAccelerationFilter = KalmanFilterWrapper< motion::motion_model::ConstantAcceleration, 6, 2 >
 
using MeasurementPose = Measurement< common::types::float32_t, motion::motion_model::ConstantAcceleration::States::POSE_X, motion::motion_model::ConstantAcceleration::States::POSE_Y >
 
using MeasurementPoseAndSpeed = Measurement< common::types::float32_t, motion::motion_model::ConstantAcceleration::States::POSE_X, motion::motion_model::ConstantAcceleration::States::POSE_Y, motion::motion_model::ConstantAcceleration::States::VELOCITY_X, motion::motion_model::ConstantAcceleration::States::VELOCITY_Y >
 
using MeasurementSpeed = Measurement< common::types::float32_t, motion::motion_model::ConstantAcceleration::States::VELOCITY_X, motion::motion_model::ConstantAcceleration::States::VELOCITY_Y >
 

Functions

template<typename MotionModelT , typename NoiseModelT >
auto make_kalman_filter (const MotionModelT &motion_model, const NoiseModelT &noise_model, const typename MotionModelT::State &initial_state, const typename MotionModelT::State::Matrix &initial_covariance)
 A utility function that creates a Kalman filter. More...
 
template<typename MotionModelT , typename NoiseModelT >
auto make_kalman_filter (const MotionModelT &motion_model, const NoiseModelT &noise_model, const typename MotionModelT::State &initial_state, const std::vector< typename MotionModelT::State::Scalar > &initial_variances)
 A utility function that creates a Kalman filter from a vector of variances. More...
 
template<typename MeasurementT , typename MessageT >
MeasurementT message_to_measurement (const MessageT &, const Eigen::Isometry3f &)
 Interface for converting a message into a measurement. More...
 
template<typename MeasurementT , typename MessageT >
MeasurementT message_to_measurement (const MessageT &, const Eigen::Isometry3f &, const Eigen::Isometry3f &)
 Interface for converting a message into a measurement that accepts an additional transformation. More...
 
template<std::int32_t kStateDimentionality, typename FloatT >
static constexpr Eigen::Transform< FloatT, kStateDimentionality, Eigen::TransformTraits::Isometry > downscale_isometry (const Eigen::Transform< FloatT, 3, Eigen::TransformTraits::Isometry > &isometry)
 Downscale the isometry to a lower dimension if needed. More...
 
template<>
STATE_ESTIMATION_NODES_PUBLIC MeasurementPoseAndSpeed message_to_measurement (const nav_msgs::msg::Odometry &msg, const Eigen::Isometry3f &tf__world__frame_id, const Eigen::Isometry3f &tf__world__child_frame_id)
 Specialization of message_to_measurement for odometry message. More...
 
template<>
STATE_ESTIMATION_NODES_PUBLIC MeasurementSpeed message_to_measurement (const geometry_msgs::msg::TwistWithCovarianceStamped &msg, const Eigen::Isometry3f &tf__world__frame_id)
 Specialization of message_to_measurement for twist message. More...
 
template<>
STATE_ESTIMATION_NODES_PUBLIC MeasurementPose message_to_measurement (const geometry_msgs::msg::PoseWithCovarianceStamped &msg, const Eigen::Isometry3f &tf__world__frame_id)
 Specialization of message_to_measurement for pose message. More...
 

Detailed Description

Functionality relating to prediction, including state estimation, kinematic prediction, maneuver-based prediction, map-aware prediction etc...

Typedef Documentation

◆ CatrMotionModel

◆ ConstantAccelerationFilter

◆ CvtrMotionModel

◆ DoubleState

template<typename ... Ts>
using autoware::prediction::DoubleState = typedef GenericState<common::types::float64_t, Ts...>

A typedef for the 64 bit floating point state.

◆ FloatState

template<typename ... Ts>
using autoware::prediction::FloatState = typedef GenericState<common::types::float32_t, Ts...>

A typedef for the 32 bit floating point state.

◆ MeasurementPose

◆ MeasurementPoseAndSpeed

◆ MeasurementSpeed

Function Documentation

◆ downscale_isometry()

template<std::int32_t kStateDimentionality, typename FloatT >
static constexpr Eigen::Transform< FloatT, kStateDimentionality, Eigen::TransformTraits::Isometry> autoware::prediction::downscale_isometry ( const Eigen::Transform< FloatT, 3, Eigen::TransformTraits::Isometry > &  isometry)
staticconstexpr

Downscale the isometry to a lower dimension if needed.

Parameters
[in]isometryThe isometry transform
Template Parameters
kStateDimentionalityDimensionality of the space.
FloatTType of scalar.
Returns
Downscaled isometry.

◆ make_kalman_filter() [1/2]

template<typename MotionModelT , typename NoiseModelT >
auto autoware::prediction::make_kalman_filter ( const MotionModelT &  motion_model,
const NoiseModelT &  noise_model,
const typename MotionModelT::State &  initial_state,
const std::vector< typename MotionModelT::State::Scalar > &  initial_variances 
)

A utility function that creates a Kalman filter from a vector of variances.

        Mostly this is needed to avoid passing the template parameters explicitly and let
        the compiler infer them from the objects passed into this function.
Parameters
[in]motion_modelA motion model.
[in]noise_modelA noise model.
[in]initial_stateInitial state.
[in]initial_variancesInitial variances as a vector.
Template Parameters
MotionModelTType of the motion model.
NoiseModelTType of the noise model.
Returns
Returns a valid KalmanFilter instance.

◆ make_kalman_filter() [2/2]

template<typename MotionModelT , typename NoiseModelT >
auto autoware::prediction::make_kalman_filter ( const MotionModelT &  motion_model,
const NoiseModelT &  noise_model,
const typename MotionModelT::State &  initial_state,
const typename MotionModelT::State::Matrix &  initial_covariance 
)

A utility function that creates a Kalman filter.

Mostly this is needed to avoid passing the template parameters explicitly and let the compiler infer them from the objects passed into this function.

Parameters
[in]motion_modelA motion model.
[in]noise_modelA noise model.
[in]initial_stateThe initial state
[in]initial_covarianceThe initial covariance
Template Parameters
MotionModelTType of the motion model.
NoiseModelTType of the noise model.
Returns
Returns a valid KalmanFilter instance.

◆ message_to_measurement() [1/5]

template<>
MeasurementPose autoware::prediction::message_to_measurement ( const geometry_msgs::msg::PoseWithCovarianceStamped &  msg,
const Eigen::Isometry3f &  tf__world__frame_id 
)

Specialization of message_to_measurement for pose message.

Parameters
[in]msgThe pose message.
[in]tf__world__frame_idA transform from message frame_id to world frame.
Returns
The measurement containing pose.

◆ message_to_measurement() [2/5]

template<>
MeasurementSpeed autoware::prediction::message_to_measurement ( const geometry_msgs::msg::TwistWithCovarianceStamped &  msg,
const Eigen::Isometry3f &  tf__world__frame_id 
)

Specialization of message_to_measurement for twist message.

Parameters
[in]msgThe twist message.
[in]tf__world__frame_idA transform from message frame_id to world frame.
Returns
The measurement containing speed.

◆ message_to_measurement() [3/5]

template<typename MeasurementT , typename MessageT >
MeasurementT autoware::prediction::message_to_measurement ( const MessageT &  ,
const Eigen::Isometry3f &   
)

Interface for converting a message into a measurement.

Template Parameters
MeasurementTType of measurement.
MessageTType of ROS 2 message.
Returns
The measurement created from a message.

◆ message_to_measurement() [4/5]

template<typename MeasurementT , typename MessageT >
MeasurementT autoware::prediction::message_to_measurement ( const MessageT &  ,
const Eigen::Isometry3f &  ,
const Eigen::Isometry3f &   
)

Interface for converting a message into a measurement that accepts an additional transformation.

This function is needed to transform messages like Odometry, where different parts of the measurement must be transformed with different transformation matrices.

Template Parameters
MeasurementTType of measurement.
MessageTType of ROS 2 message.
Returns
The measurement created from a message.

◆ message_to_measurement() [5/5]

template<>
MeasurementPoseAndSpeed autoware::prediction::message_to_measurement ( const nav_msgs::msg::Odometry &  msg,
const Eigen::Isometry3f &  tf__world__frame_id,
const Eigen::Isometry3f &  tf__world__child_frame_id 
)

Specialization of message_to_measurement for odometry message.

Parameters
[in]msgThe odometry message.
[in]tf__world__frame_idA transform from message frame_id to world frame.
[in]tf__world__child_frame_idA transform from message frame_id to child_frame_id.
Returns
The measurement containing pose and speed.