Class BaseNode

Inheritance Relationships

Derived Types

Class Documentation

class BaseNode

Subclassed by depthai_ros_driver::dai_nodes::FeatureTracker, depthai_ros_driver::dai_nodes::Imu, depthai_ros_driver::dai_nodes::Mono, depthai_ros_driver::dai_nodes::NNWrapper, depthai_ros_driver::dai_nodes::RGB, depthai_ros_driver::dai_nodes::SensorWrapper, depthai_ros_driver::dai_nodes::SpatialNNWrapper, depthai_ros_driver::dai_nodes::Stereo, depthai_ros_driver::dai_nodes::Stereo, depthai_ros_driver::dai_nodes::Sync, depthai_ros_driver::dai_nodes::SysLogger, depthai_ros_driver::dai_nodes::Thermal, depthai_ros_driver::dai_nodes::ToF, depthai_ros_driver::dai_nodes::nn::Detection< T >, depthai_ros_driver::dai_nodes::nn::Segmentation, depthai_ros_driver::dai_nodes::nn::SpatialDetection< T >

Public Functions

BaseNode(const std::string &daiNodeName, std::shared_ptr<rclcpp::Node> node, std::shared_ptr<dai::Pipeline> pipeline)

Constructor of the class BaseNode. Creates a node in the pipeline.

Parameters:
  • daiNodeName[in] The dai node name

  • node – The node

  • pipeline – The pipeline

virtual ~BaseNode()
virtual void updateParams(const std::vector<rclcpp::Parameter> &params)
virtual void link(dai::Node::Input in, int linkType = 0)
virtual dai::Node::Input getInput(int linkType = 0)
virtual dai::Node::Input getInputByName(const std::string &name = "")
virtual std::vector<std::shared_ptr<sensor_helpers::ImagePublisher>> getPublishers()
virtual void setupQueues(std::shared_ptr<dai::Device> device) = 0
virtual void setNames() = 0

Sets the names of the queues.

virtual void setXinXout(std::shared_ptr<dai::Pipeline> pipeline) = 0

Link inputs and outputs.

Parameters:

pipeline – The pipeline

std::shared_ptr<sensor_helpers::ImagePublisher> setupOutput(std::shared_ptr<dai::Pipeline> pipeline, const std::string &qName, std::function<void(dai::Node::Input input)> nodeLink, bool isSynced = false, const utils::VideoEncoderConfig &encoderConfig = {})
virtual void closeQueues() = 0
std::shared_ptr<dai::node::XLinkOut> setupXout(std::shared_ptr<dai::Pipeline> pipeline, const std::string &name)
void setNodeName(const std::string &daiNodeName)
void setROSNodePointer(std::shared_ptr<rclcpp::Node> node)
std::shared_ptr<rclcpp::Node> getROSNode()

Gets the ROS node pointer.

Returns:

The ROS node pointer.

std::string getName()

Gets the name of the node.

Returns:

The name.

std::string getTFPrefix(const std::string &frameName = "")

Append ROS node name to the frameName given.

Parameters:

frameName[in] The frame name

std::string getOpticalTFPrefix(const std::string &frameName = "")

Append ROS node name to the frameName given and append optical frame suffix to it.

Parameters:

frameName[in] The frame name

bool ipcEnabled()
std::string getSocketName(dai::CameraBoardSocket socket)
bool rsCompabilityMode()
rclcpp::Logger getLogger()