Public Member Functions | Protected Member Functions | List of all members
fuse_core::MotionModel Class Referenceabstract

The interface definition for motion model plugins in the fuse ecosystem. More...

#include <motion_model.h>

Inheritance diagram for fuse_core::MotionModel:
Inheritance graph
[legend]

Public Member Functions

virtual bool apply (Transaction &transaction)=0
 Augment a transaction object such that all involved timestamps are connected by motion model constraints. More...
 
 FUSE_SMART_PTR_ALIASES_ONLY (MotionModel)
 
virtual void graphCallback (Graph::ConstSharedPtr)
 Function to be executed whenever the optimizer has completed a Graph update. More...
 
virtual void initialize (const std::string &name)=0
 Perform any required post-construction initialization, such as subscribing to topics or reading from the parameter server. More...
 
virtual const std::string & name () const =0
 Get the unique name of this motion model. More...
 
virtual void start ()
 Function to be executed whenever the optimizer is ready to receive transactions. More...
 
virtual void stop ()
 Function to be executed whenever the optimizer is no longer ready to receive transactions. More...
 
virtual ~MotionModel ()=default
 Destructor. More...
 

Protected Member Functions

 MotionModel ()=default
 Default Constructor. More...
 

Detailed Description

The interface definition for motion model plugins in the fuse ecosystem.

A model model plugin is responsible for generating constraints that link together timestamps introduced by other sensors in the system.

Definition at line 53 of file motion_model.h.

Constructor & Destructor Documentation

◆ ~MotionModel()

virtual fuse_core::MotionModel::~MotionModel ( )
virtualdefault

Destructor.

◆ MotionModel()

fuse_core::MotionModel::MotionModel ( )
protecteddefault

Default Constructor.

Member Function Documentation

◆ apply()

virtual bool fuse_core::MotionModel::apply ( Transaction transaction)
pure virtual

Augment a transaction object such that all involved timestamps are connected by motion model constraints.

This function will be called by the optimizer (in the Optimizer's thread) for each received transaction.

Parameters
[in,out]transactionThe transaction object that should be augmented with motion model constraints
Returns
True if the motion models were generated successfully, false otherwise

Implemented in fuse_core::AsyncMotionModel.

◆ FUSE_SMART_PTR_ALIASES_ONLY()

fuse_core::MotionModel::FUSE_SMART_PTR_ALIASES_ONLY ( MotionModel  )

◆ graphCallback()

virtual void fuse_core::MotionModel::graphCallback ( Graph::ConstSharedPtr  )
inlinevirtual

Function to be executed whenever the optimizer has completed a Graph update.

This method will be called by the optimizer, in the optimizer's thread, after each Graph update is complete. This generally means that new variables have been inserted into the Graph, and new optimized values are available. To simplify synchronization between the motion models and other consumers of Graph data, the provided Graph object will never be updated by anyone. Thus, only read access to the Graph is provided. Information may be accessed or computed, but it cannot be changed. The optimizer provides the motion models with Graph updates by sending a new Graph object, not by modifying this Graph object.

Parameters
[in]graphA read-only pointer to the graph object, allowing queries to be performed whenever needed.

Reimplemented in fuse_core::AsyncMotionModel.

Definition at line 85 of file motion_model.h.

◆ initialize()

virtual void fuse_core::MotionModel::initialize ( const std::string &  name)
pure virtual

Perform any required post-construction initialization, such as subscribing to topics or reading from the parameter server.

This will be called on each plugin after construction, and after the ros node has been initialized. Plugins are encouraged to subnamespace any of their parameters to prevent conflicts and allow the same plugin to be used multiple times with different settings and topics.

Parameters
[in]nameA unique name to give this plugin instance

Implemented in fuse_core::AsyncMotionModel.

◆ name()

virtual const std::string& fuse_core::MotionModel::name ( ) const
pure virtual

Get the unique name of this motion model.

Implemented in fuse_core::AsyncMotionModel.

◆ start()

virtual void fuse_core::MotionModel::start ( )
inlinevirtual

Function to be executed whenever the optimizer is ready to receive transactions.

This method will be called by the optimizer, in the optimizer's thread, once the optimizer has been initialized and is ready to receive transactions. It may also be called as part of a stop-start cycle when the optimizer has been requested to reset itself. This allows the motion model to reset any internal state before the optimizer begins processing after a reset. No calls to apply() will happen before the optimizer calls start().

Reimplemented in fuse_core::AsyncMotionModel.

Definition at line 112 of file motion_model.h.

◆ stop()

virtual void fuse_core::MotionModel::stop ( )
inlinevirtual

Function to be executed whenever the optimizer is no longer ready to receive transactions.

This method will be called by the optimizer, in the optimizer's thread, before the optimizer shutdowns. It may also be called as part of a stop-start cycle when the optimizer has been requested to reset itself. This allows the motion model to reset any internal state before the optimizer begins processing after a reset. No calls to apply() will happen until start() has been called again.

Reimplemented in fuse_core::AsyncMotionModel.

Definition at line 122 of file motion_model.h.


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


fuse_core
Author(s): Stephen Williams
autogenerated on Thu Apr 24 2025 02:18:55