Class LossLoader

Class Documentation

class LossLoader

Load a loss function using pluginlib::ClassLoader.

The loader objects loads a loss function using pluginlib::ClassLoader. This is typically run from a sensor or motion model on initialization, so the loss functions are later passed to the constraints they create. Since the class loader must outlive the loss objects it creates, this class implements the singleton pattern.

Public Functions

LossLoader(const LossLoader&) = delete
LossLoader(LossLoader&&) = delete
LossLoader &operator=(const LossLoader&) = delete
LossLoader &operator=(LossLoader&&) = delete
inline pluginlib::UniquePtr<fuse_core::Loss> createUniqueInstance(const std::string &lookup_name)

Create unique instance of a loss function loaded with pluginlib.

Parameters:

lookup_name[in] Loss function lookup name

Returns:

Loss function instance handled by an std::unique_ptr<>

Public Static Functions

static inline LossLoader &getInstance()

Get singleton instance.

Returns:

Loss loader singleton instance

Protected Functions

inline LossLoader()

Constructor.