Template Class Detection

Inheritance Relationships

Base Type

Class Documentation

template<typename T>
class Detection : public depthai_ros_driver::dai_nodes::BaseNode

Public Functions

inline Detection(const std::string &daiNodeName, rclcpp::Node *node, std::shared_ptr<dai::Pipeline> pipeline, const dai::CameraBoardSocket &socket = dai::CameraBoardSocket::CAM_A)

Constructor of the class Detection. Creates a DetectionNetwork node in the pipeline. Also creates an ImageManip node in the pipeline. The ImageManip node is used to resize the input frames to the size required by the DetectionNetwork node.

Parameters:
  • daiNodeName[in] The dai node name

  • node – The node

  • pipeline – The pipeline

~Detection() = default
inline virtual void setupQueues(std::shared_ptr<dai::Device> device) override

Sets up the queues for the DetectionNetwork node and the ImageManip node. Also sets up the publishers for the DetectionNetwork node and the ImageManip node.

Parameters:

device – The device

inline virtual void link(dai::Node::Input in, int) override

Links the input of the DetectionNetwork node to the output of the ImageManip node.

Parameters:
  • in[in] The input of the DetectionNetwork node

  • linkType[in] The link type (not used)

inline virtual dai::Node::Input getInput(int) override

Gets the input of the DetectionNetwork node.

Parameters:

linkType[in] The link type (not used)

Returns:

The input of the DetectionNetwork node.

inline virtual void setNames() override

Sets the names of the queues.

inline virtual void setXinXout(std::shared_ptr<dai::Pipeline> pipeline) override

Sets the XLinkOut for the DetectionNetwork node and the ImageManip node. Additionally enables the passthrough.

Parameters:

pipeline – The pipeline

inline virtual void closeQueues() override

Closes the queues for the DetectionNetwork node and the passthrough.

inline virtual void updateParams(const std::vector<rclcpp::Parameter> &params) override