Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
DoublePoseUpdater Class Reference

TODO: abandoned for now, not working properly. More...

#include <double_pose_updater.hpp>

Inheritance diagram for DoublePoseUpdater:
Inheritance graph
Collaboration diagram for DoublePoseUpdater:
Collaboration graph

Public Member Functions

 DoublePoseUpdater (const SLAMParameters &params)
 
 DoublePoseUpdater (const DoublePoseUpdater &other)
 
DoublePoseUpdateroperator= (const DoublePoseUpdater &other)
 
std::shared_ptr< PoseUpdaterclone () const override
 Clone the pose updater.
 
void predict_pose (const MotionData &motion_data, std::shared_ptr< V2PMotionModel > motion_model) override
 Updates the last pose and returns the pose difference.
 
Eigen::Vector3d get_second_accumulated_pose_difference () const override
 Get the accumulated pose difference from the second source.
 
bool second_pose_difference_ready () const override
 Check if the second pose difference is ready.
 
- Public Member Functions inherited from DifferenceBasedReadyPoseUpdater
 DifferenceBasedReadyPoseUpdater (const SLAMParameters &params)
 
 DifferenceBasedReadyPoseUpdater (const DifferenceBasedReadyPoseUpdater &other)
 
DifferenceBasedReadyPoseUpdateroperator= (const DifferenceBasedReadyPoseUpdater &other)
 
virtual ~DifferenceBasedReadyPoseUpdater ()
 
virtual bool pose_ready_for_graph_update () const override
 Check if the accumulated pose difference is greater than the minimum threshold.
 
- Public Member Functions inherited from PoseUpdater
 PoseUpdater (const SLAMParameters &params)
 
 PoseUpdater (const PoseUpdater &other)
 
PoseUpdateroperator= (const PoseUpdater &other)
 
virtual ~PoseUpdater ()
 
virtual void update_pose (const Eigen::Vector3d &last_pose)
 Updates the last pose with the given pose.
 
Eigen::Matrix3d get_adjoint_operator_matrix (double x_translation, double y_translation, double rotation_angle) const
 
Eigen::Vector3d get_last_pose () const
 
Eigen::Vector3d get_last_graphed_pose () const
 
Eigen::Vector3d get_pose_difference_noise () const
 
rclcpp::Time get_last_pose_update () const
 
size_t pose_buffer_size () const
 
size_t pose_buffer_capacity () const
 
Eigen::Vector3d get_pose_at_timestamp (const rclcpp::Time &timestamp) const
 

Private Attributes

bool _received_first_velocities_
 
bool _received_first_odometry_ = false
 
rclcpp::Time _last_velocities_receive_time_
 Last pose update timestamp for velocities.
 
Eigen::Vector3d _accumulated_odometry_pose_difference_
 Accumulated odometry pose difference since the last pose update.
 
Eigen::Vector3d _last_odometry_pose_ = Eigen::Vector3d::Zero()
 

Additional Inherited Members

- Protected Attributes inherited from PoseUpdater
Eigen::Vector3d _last_pose_
 
Eigen::Vector3d _last_graphed_pose_
 
Eigen::Matrix3d _last_pose_covariance_
 
rclcpp::Time _last_pose_update_
 
bool _received_first_motion_data_ = false
 
bool _new_pose_from_graph_ = false
 
CircularBuffer< TimedPose_pose_buffer_
 

Detailed Description

TODO: abandoned for now, not working properly.

Definition at line 13 of file double_pose_updater.hpp.

Constructor & Destructor Documentation

◆ DoublePoseUpdater() [1/2]

DoublePoseUpdater::DoublePoseUpdater ( const SLAMParameters params)
explicit

Definition at line 3 of file double_pose_updater.cpp.

◆ DoublePoseUpdater() [2/2]

DoublePoseUpdater::DoublePoseUpdater ( const DoublePoseUpdater other)

Definition at line 13 of file double_pose_updater.cpp.

Member Function Documentation

◆ clone()

std::shared_ptr< PoseUpdater > DoublePoseUpdater::clone ( ) const
inlineoverridevirtual

Clone the pose updater.

This method is used to create a copy of the pose updater It is useful for polymorphic classes that use pointers to base class

Returns
A shared pointer to the cloned pose updater

Reimplemented from DifferenceBasedReadyPoseUpdater.

Definition at line 33 of file double_pose_updater.hpp.

◆ get_second_accumulated_pose_difference()

Eigen::Vector3d DoublePoseUpdater::get_second_accumulated_pose_difference ( ) const
overridevirtual

Get the accumulated pose difference from the second source.

Returns
Eigen::Vector3d The accumulated pose difference from the second source

Implements SecondPoseInputTrait.

Definition at line 43 of file double_pose_updater.cpp.

◆ operator=()

DoublePoseUpdater & DoublePoseUpdater::operator= ( const DoublePoseUpdater other)

Definition at line 22 of file double_pose_updater.cpp.

Here is the call graph for this function:

◆ predict_pose()

void DoublePoseUpdater::predict_pose ( const MotionData motion_data,
std::shared_ptr< V2PMotionModel motion_model 
)
overridevirtual

Updates the last pose and returns the pose difference.

Parameters
motion_dataMotion data containing the velocities and timestamp
motion_modelMotion model to apply the velocities

Reimplemented from PoseUpdater.

Definition at line 36 of file double_pose_updater.cpp.

◆ second_pose_difference_ready()

bool DoublePoseUpdater::second_pose_difference_ready ( ) const
overridevirtual

Check if the second pose difference is ready.

Returns
true if the second pose difference is ready, false otherwise

Implements SecondPoseInputTrait.

Definition at line 39 of file double_pose_updater.cpp.

Member Data Documentation

◆ _accumulated_odometry_pose_difference_

Eigen::Vector3d DoublePoseUpdater::_accumulated_odometry_pose_difference_
private
Initial value:
=
Eigen::Vector3d::Zero()

Accumulated odometry pose difference since the last pose update.

Definition at line 21 of file double_pose_updater.hpp.

◆ _last_odometry_pose_

Eigen::Vector3d DoublePoseUpdater::_last_odometry_pose_ = Eigen::Vector3d::Zero()
private

Definition at line 24 of file double_pose_updater.hpp.

◆ _last_velocities_receive_time_

rclcpp::Time DoublePoseUpdater::_last_velocities_receive_time_
private
Initial value:
=
rclcpp::Time(0)

Last pose update timestamp for velocities.

Definition at line 18 of file double_pose_updater.hpp.

◆ _received_first_odometry_

bool DoublePoseUpdater::_received_first_odometry_ = false
private

Definition at line 16 of file double_pose_updater.hpp.

◆ _received_first_velocities_

bool DoublePoseUpdater::_received_first_velocities_
private
Initial value:
=
false

Definition at line 14 of file double_pose_updater.hpp.


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