#include <VCINode.hpp>
Definition at line 24 of file VCINode.hpp.
◆ VCINodeAsync()
| VCINodeAsync::VCINodeAsync |
( |
| ) |
|
Definition at line 21 of file VCINode.cpp.
30 log_warning(
"Failed to allocate shared memory. Trying again (",maxTries,
")");
31 std::this_thread::sleep_for(1000ms);
40 log_warning(
"Failed to initialize camera. Trying again (",maxTries,
")");
41 std::this_thread::sleep_for(1000ms);
References com::SharedMemory::allocate(), camera_publish_loop(), galaxis::utils::log_warning(), m_camera, m_imageSizeBytes, m_laneImagePublisher, m_sharedMemory, and AlviumAsyncCamera::start_grabbing_detached().
◆ camera_publish_loop()
| void VCINodeAsync::camera_publish_loop |
( |
| ) |
|
|
private |
Definition at line 51 of file VCINode.cpp.
58 log_warning(
"[ASYNC-VCINODE] camera_publish_loop: Image is nullptr.");
59 std::this_thread::sleep_for(1ms);
64 data.
tv_sec = msg->header.stamp.sec;
65 data.
tv_nsec = msg->header.stamp.nanosec;
66 data.
data = msg->data.data();
73 log(
"[ASYNC-VCINODE] camera_publish_loop: Image published via Shared Memory and ROS2.");
74 log_debug(
"[ASYNC-VCINODE] camera_publish_loop: Timestamp sec.nsec:", msg->header.stamp.sec,
".",msg->header.stamp.nanosec);
References com::SharedData::data, com::SharedData::dataSize, galaxis::utils::log(), galaxis::utils::log_debug(), galaxis::utils::log_warning(), m_camera, m_laneImagePublisher, m_sharedMemory, AlviumAsyncCamera::pop_image(), com::SharedData::tv_nsec, com::SharedData::tv_sec, and com::SharedMemory::write_mutexed().
Referenced by VCINodeAsync().
◆ m_camera
◆ m_imagePublisherNew
| rclcpp::Publisher<sensor_msgs::msg::Image>::SharedPtr VCINodeAsync::m_imagePublisherNew |
|
private |
◆ m_imageSizeBytes
| size_t VCINodeAsync::m_imageSizeBytes = 512*256*3 |
|
private |
◆ m_imgBridge
| cv_bridge::CvImage VCINodeAsync::m_imgBridge |
|
private |
◆ m_laneImagePublisher
| image_transport::Publisher VCINodeAsync::m_laneImagePublisher |
|
private |
◆ m_sharedMemory
The documentation for this class was generated from the following files: