Class BaseConverter

Inheritance Relationships

Derived Types

Class Documentation

class BaseConverter

Subclassed by depthai_bridge::DisparityConverter, depthai_bridge::GridMapConverter, depthai_bridge::ImageConverter, depthai_bridge::ImgDetectionConverter, depthai_bridge::ImuConverter, depthai_bridge::PointCloudConverter, depthai_bridge::SpatialDetectionConverter, depthai_bridge::TrackDetectionConverter, depthai_bridge::TrackSpatialDetectionConverter, depthai_bridge::TrackedFeaturesConverter, depthai_bridge::TransformDataConverter

Public Functions

explicit BaseConverter(std::string frameName, bool getBaseDeviceTimestamp = false)
virtual ~BaseConverter()
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

std_msgs::msg::Header getRosHeader(const std::shared_ptr<dai::Buffer> &inData, bool addExpOffset = false, dai::CameraExposureOffset offset = dai::CameraExposureOffset())
inline std::string getFrameName() const
inline bool isGetBaseDeviceTimestamp() const
inline bool isUpdateRosBaseTimeOnToRosMsg() const

Protected Attributes

const std::string frameName
std::chrono::time_point<std::chrono::steady_clock> steadyBaseTime
rclcpp::Time rosBaseTime
bool getBaseDeviceTimestamp
int64_t totalNsChange
bool updateRosBaseTimeOnToRosMsg