Class FrontEndBase

Inheritance Relationships

Base Types

Class Documentation

class FrontEndBase : public mola::ExecutableBase, public mola::RawDataConsumer

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 incoming data (smart pointer). Actual processing can be normally done by any of these two ways:

  • Wait until spinOnce() is called, at the rate specified in the yaml file (default=1 Hz), or

  • Use your own logic to enqueue a task into a worker thread pool (preferred).

Public Functions

FrontEndBase()
virtual ~FrontEndBase() = default
virtual void initialize(const Yaml &cfg) final override

Loads common parameters for all front-ends.

These parameters are handled here:

  • raw_data_source: A list of one (e.g. raw_data_source: ‘moduleName) or multiple (e.g.raw_data_source: [moduleName1, moduleName2]`) MOLA module names to which to subscribe for input raw observations.

Recall that module names are given in the name: field of the mola-cli launch YAML file.

Note that no individual sensor label is read in this abstract class since it is up to the derived classes to specify whether to subscribe to one or more sensor sources, and use descriptive names in the case of multiple sensors.

Protected Functions

virtual void initialize_frontend(const Yaml &cfg) = 0

Loads children specific parameters

Protected Attributes

std::set<std::string> front_end_source_names_

A list of one or multiple MOLA module names to which to subscribe for input raw observations.

BackEndBase::Ptr slam_backend_

A reference to my associated SLAM backend. Populated by initialize_common()

WorldModel::Ptr worldmodel_
VizInterface::Ptr visualizer_