Class PipelineGenerator

Class Documentation

class PipelineGenerator

Public Functions

PipelineGenerator()
~PipelineGenerator()
std::string validatePipeline(std::shared_ptr<rclcpp::Node> node, const std::string &typeStr, int sensorNum, const std::string &deviceName)

Validates the pipeline type. If the pipeline type is not valid for the number of sensors, it will be changed to the default type.

Parameters:
  • node – The node used for logging

  • type[in] The type

  • sensorNum[in] The sensor number

Returns:

The validated pipeline type.

std::vector<std::unique_ptr<dai_nodes::BaseNode>> createPipeline(std::shared_ptr<rclcpp::Node> node, std::shared_ptr<dai::Device> device, std::shared_ptr<dai::Pipeline> pipeline, const std::string &pipelineType, const std::string &nnType)

Creates the pipeline by using a plugin. Plugin types need to be of type depthai_ros_driver::pipeline_gen::BasePipeline.

Parameters:
  • node – The node

  • device – The device

  • pipeline – The pipeline

  • pipelineType[in] The pipeline type name (plugin name or one of the default types)

  • nnType[in] The neural network type (none, rgb, spatial)

  • enableImu[in] Indicates if IMU is enabled

Returns:

Vector BaseNodes created.

Protected Attributes

std::unordered_map<std::string, std::string> pluginTypeMap
std::unordered_map<std::string, PipelineType> pipelineTypeMap