The interface definition for motion model plugins in the fuse ecosystem. More...
#include <motion_model.h>

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... | |
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.
|
virtualdefault |
Destructor.
|
protecteddefault |
Default Constructor.
|
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.
| [in,out] | transaction | The transaction object that should be augmented with motion model constraints |
Implemented in fuse_core::AsyncMotionModel.
| fuse_core::MotionModel::FUSE_SMART_PTR_ALIASES_ONLY | ( | MotionModel | ) |
|
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.
| [in] | graph | A 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.
|
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.
| [in] | name | A unique name to give this plugin instance |
Implemented in fuse_core::AsyncMotionModel.
|
pure virtual |
Get the unique name of this motion model.
Implemented in fuse_core::AsyncMotionModel.
|
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.
|
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.