Class DetectionEngine

Class Documentation

class DetectionEngine

Provides interface for extracting objects from sensor data.

Public Functions

virtual ~DetectionEngine() = default
virtual const std::unordered_map<uint64_t, std::string> &class_map() const = 0

Get a map of class_id to class_name.

Returns:

map of ids to names

virtual void update(core::LidarFrame &frame) = 0

Detect objects in a LidarFrame.

Objects will be saved into the frame.

Parameters:

frame[in] lidar frame

virtual void update(core::FrameSet &frame_set) = 0

Detect objects in a FrameSet.

Objects will be saved into the frame_set

Parameters:

frame_set[in] collation of lidar frames

Public Static Functions

static std::unique_ptr<DetectionEngine> create(const std::vector<std::shared_ptr<core::SensorInfo>> &sensor_infos, const ClassicDetectionConfig &config = ClassicDetectionConfig{})

Creates and initializes classic detection engine with default config.

Parameters:
  • sensor_infos[in] a vector of SensorInfo pointers

  • config[in] config for the classic engine (defaults to ClassicDetectionConfig{})

Returns:

unique_ptr to detection engine

static std::unique_ptr<DetectionEngine> create(const std::vector<std::shared_ptr<core::SensorInfo>> &sensor_infos, const std::string &kind)

Creates and initializes a detection engine from a kind string.

Currently only “classic” is supported.

Parameters:
  • sensor_infos[in] a vector of SensorInfo pointers

  • kind[in] backend identifier (e.g. “classic”)

Throws:

std::invalid_argument – if kind is not recognised

Returns:

unique_ptr to detection engine