#include <BridgePublisher.hpp>
Public Types | |
| using | ConvertFunc = std::function< void(std::shared_ptr< SimMsg >, std::deque< RosMsg > &)> |
| using | CustomPublisher = typename std::conditional< std::is_same< RosMsg, ImageMsgs::Image >::value, std::shared_ptr< image_transport::Publisher >, std::shared_ptr< rosOrigin::Publisher > >::type |
Public Member Functions | |
| void | addPublisherCallback () |
| std::shared_ptr< image_transport::Publisher > | advertise (int queueSize, std::true_type) |
| std::shared_ptr< rosOrigin::Publisher > | advertise (int queueSize, std::false_type) |
| BridgePublisher (std::shared_ptr< dai::DataOutputQueue > daiMessageQueue, rosOrigin::NodeHandle nh, std::string rosTopic, ConvertFunc converter, int queueSize, std::string cameraParamUri="", std::string cameraName="") | |
| BridgePublisher (std::shared_ptr< dai::DataOutputQueue > daiMessageQueue, rosOrigin::NodeHandle nh, std::string rosTopic, ConvertFunc converter, int queueSize, ImageMsgs::CameraInfo cameraInfoData, std::string cameraName) | |
| BridgePublisher (const BridgePublisher &other) | |
| void | publishHelper (std::shared_ptr< SimMsg > inData) |
| void | startPublisherThread () |
| ~BridgePublisher () | |
Private Member Functions | |
| void | daiCallback (std::string name, std::shared_ptr< ADatatype > data) |
Private Attributes | |
| ImageMsgs::CameraInfo | _cameraInfoData |
| std::shared_ptr< rosOrigin::Publisher > | _cameraInfoPublisher |
| std::string | _cameraName |
| std::string | _cameraParamUri |
| std::string | _camInfoFrameId |
| std::unique_ptr< camera_info_manager::CameraInfoManager > | _camInfoManager |
| ConvertFunc | _converter |
| std::shared_ptr< dai::DataOutputQueue > | _daiMessageQueue |
| bool | _isCallbackAdded = false |
| bool | _isImageMessage = false |
| image_transport::ImageTransport | _it |
| rosOrigin::NodeHandle | _nh |
| std::thread | _readingThread |
| CustomPublisher | _rosPublisher |
| std::string | _rosTopic |
Static Private Attributes | |
| static const std::string | LOG_TAG = "BridgePublisher" |
Definition at line 50 of file BridgePublisher.hpp.
| using dai::ros::BridgePublisher< RosMsg, SimMsg >::ConvertFunc = std::function<void(std::shared_ptr<SimMsg>, std::deque<RosMsg>&)> |
Definition at line 52 of file BridgePublisher.hpp.
| using dai::ros::BridgePublisher< RosMsg, SimMsg >::CustomPublisher = typename std:: conditional<std::is_same<RosMsg, ImageMsgs::Image>::value, std::shared_ptr<image_transport::Publisher>, std::shared_ptr<rosOrigin::Publisher> >::type |
Definition at line 92 of file BridgePublisher.hpp.
| dai::ros::BridgePublisher< RosMsg, SimMsg >::BridgePublisher | ( | std::shared_ptr< dai::DataOutputQueue > | daiMessageQueue, |
| rosOrigin::NodeHandle | nh, | ||
| std::string | rosTopic, | ||
| ConvertFunc | converter, | ||
| int | queueSize, | ||
| std::string | cameraParamUri = "", |
||
| std::string | cameraName = "" |
||
| ) |
Definition at line 233 of file BridgePublisher.hpp.
| dai::ros::BridgePublisher< RosMsg, SimMsg >::BridgePublisher | ( | std::shared_ptr< dai::DataOutputQueue > | daiMessageQueue, |
| rosOrigin::NodeHandle | nh, | ||
| std::string | rosTopic, | ||
| ConvertFunc | converter, | ||
| int | queueSize, | ||
| ImageMsgs::CameraInfo | cameraInfoData, | ||
| std::string | cameraName | ||
| ) |
Definition at line 252 of file BridgePublisher.hpp.
| dai::ros::BridgePublisher< RosMsg, SimMsg >::BridgePublisher | ( | const BridgePublisher< RosMsg, SimMsg > & | other | ) |
Definition at line 289 of file BridgePublisher.hpp.
| dai::ros::BridgePublisher< RosMsg, SimMsg >::~BridgePublisher | ( | ) |
Definition at line 394 of file BridgePublisher.hpp.
| void dai::ros::BridgePublisher< RosMsg, SimMsg >::addPublisherCallback | ( | ) |
Definition at line 345 of file BridgePublisher.hpp.
| std::shared_ptr< image_transport::Publisher > dai::ros::BridgePublisher< RosMsg, SimMsg >::advertise | ( | int | queueSize, |
| std::true_type | |||
| ) |
Tag Dispacher function to to overload the Publisher to ImageTransport Publisher
Definition at line 276 of file BridgePublisher.hpp.
| std::shared_ptr< rosOrigin::Publisher > dai::ros::BridgePublisher< RosMsg, SimMsg >::advertise | ( | int | queueSize, |
| std::false_type | |||
| ) |
Tag Dispacher function to to overload the Publisher to use Default ros::Publisher
Definition at line 271 of file BridgePublisher.hpp.
|
private |
adding this callback will allow you to still be able to consume the data for other processing using get() function .
Definition at line 306 of file BridgePublisher.hpp.
| void dai::ros::BridgePublisher< RosMsg, SimMsg >::publishHelper | ( | std::shared_ptr< SimMsg > | inData | ) |
Definition at line 351 of file BridgePublisher.hpp.
| void dai::ros::BridgePublisher< RosMsg, SimMsg >::startPublisherThread | ( | ) |
Definition at line 313 of file BridgePublisher.hpp.
|
private |
Definition at line 152 of file BridgePublisher.hpp.
|
private |
Definition at line 148 of file BridgePublisher.hpp.
|
private |
Definition at line 156 of file BridgePublisher.hpp.
|
private |
Definition at line 156 of file BridgePublisher.hpp.
|
private |
Definition at line 156 of file BridgePublisher.hpp.
|
private |
Definition at line 157 of file BridgePublisher.hpp.
|
private |
Definition at line 141 of file BridgePublisher.hpp.
|
private |
Definition at line 140 of file BridgePublisher.hpp.
|
private |
Definition at line 158 of file BridgePublisher.hpp.
|
private |
Definition at line 159 of file BridgePublisher.hpp.
|
private |
Definition at line 151 of file BridgePublisher.hpp.
|
private |
Definition at line 147 of file BridgePublisher.hpp.
|
private |
Definition at line 155 of file BridgePublisher.hpp.
|
private |
Definition at line 153 of file BridgePublisher.hpp.
|
private |
Definition at line 156 of file BridgePublisher.hpp.
|
staticprivate |
Definition at line 139 of file BridgePublisher.hpp.