class mola::FrontEndBase


Virtual interface for SLAM front-ends. More…

#include <FrontEndBase.h>

class FrontEndBase:
    public mola::ExecutableBase,
    private mola::RawDataConsumer
    // methods

    virtual void onNewObservation(CObservation::Ptr& o) = 0;
    virtual void initialize_common(const Yaml& cfg);

// direct descendants

class G2ODataset;
class LidarOdometry;
class WheelOdometry;

Detailed Documentation

Virtual interface for SLAM front-ends.

Instructions for implementing new front-ends: Raw observations arrive via calls to the virtual method onNewObservation(), which must be implemented. Minimum time should be spent there, just copy the incomming data (smart pointer). Actual processing can be normally done by any of these two ways:

  • Wait until spinOnce() is called, at the rate especified in the yaml file (default=1 Hz), or
  • Use your own logic to enque a task into a worker thread pool (preferred).


virtual void onNewObservation(CObservation::Ptr& o) = 0

To be called whenever a new observation arrives. It should return as fast as possible, enqueuing the data for processing in another thread.

virtual void initialize_common(const Yaml& cfg)

Loads common parameters for all front-ends. Called by launcher just before initialize().