Class SpatialDetectionConverter

Class Documentation

class SpatialDetectionConverter

Public Functions

SpatialDetectionConverter(std::string frameName, int width, int height, bool normalized = false, bool getBaseDeviceTimestamp = false)
~SpatialDetectionConverter()
void updateRosBaseTime()

Handles cases in which the ROS time shifts forward or backward Should be called at regular intervals or on-change of ROS time, depending on monitoring.

inline void setUpdateRosBaseTimeOnToRosMsg(bool update = true)

Commands the converter to automatically update the ROS base time on message conversion based on variable.

Parameters:

update – bool whether to automatically update the ROS base time on message conversion

void toRosMsg(std::shared_ptr<dai::SpatialImgDetections> inNetData, std::deque<SpatialMessages::SpatialDetectionArray> &opDetectionMsg)
void toRosVisionMsg(std::shared_ptr<dai::SpatialImgDetections> inNetData, std::deque<vision_msgs::msg::Detection3DArray> &opDetectionMsg)
SpatialDetectionArrayPtr toRosMsgPtr(std::shared_ptr<dai::SpatialImgDetections> inNetData)