Galaxis Codebase  1.0.0
Team Galaxis software stack for the Carolo Cup 2023 - ROS2 based software
VCINode.hpp
Go to the documentation of this file.
1 #ifndef VCINODE_HPP
2 #define VCINODE_HPP
3 
4 #include <memory>
5 #include <mutex>
6 
7 #include "AsyncCamera.hpp"
8 
9 #include "rclcpp/rclcpp.hpp"
10 #include <galaxis/GalaxisNode.hpp>
11 
12 #include <sensor_msgs/msg/image.hpp>
13 #include <image_transport/image_transport.h>
14 #include <cv_bridge/cv_bridge.h>
15 
16 #include <functional>
17 #include <memory>
18 #include <chrono>
19 
20 #include "com/SharedMemory.hpp"
21 
22 using namespace cv;
23 
24 class VCINodeAsync : public GalaxisNode {
25 private:
27  image_transport::Publisher m_laneImagePublisher;
28  rclcpp::Publisher<sensor_msgs::msg::Image>::SharedPtr m_imagePublisherNew;
29 
30  cv_bridge::CvImage m_imgBridge;
31 
33  size_t m_imageSizeBytes = 512*256*3; // width * height * RGB
34 
35 public:
36  VCINodeAsync();
37 
38 private:
39  void camera_publish_loop();
40  // void camera_callback(std::pair<std::shared_ptr<rclcpp::Time>, std::shared_ptr<cv::Mat>> imgSPtr);
41 };
42 
43 #endif // VCINODE_HPP
com::SharedMemory
Definition: SharedMemory.hpp:24
AsyncCamera.hpp
AlviumAsyncCamera
Definition: AsyncCamera.hpp:43
SharedMemory.hpp
VCINodeAsync::m_sharedMemory
com::SharedMemory m_sharedMemory
Definition: VCINode.hpp:32
VCINodeAsync::m_imgBridge
cv_bridge::CvImage m_imgBridge
Definition: VCINode.hpp:30
VCINodeAsync
Definition: VCINode.hpp:24
GalaxisNode.hpp
VCINodeAsync::m_laneImagePublisher
image_transport::Publisher m_laneImagePublisher
Definition: VCINode.hpp:27
GalaxisNode
Definition: GalaxisNode.hpp:21
VCINodeAsync::m_imagePublisherNew
rclcpp::Publisher< sensor_msgs::msg::Image >::SharedPtr m_imagePublisherNew
Definition: VCINode.hpp:28
VCINodeAsync::m_camera
AlviumAsyncCamera m_camera
Definition: VCINode.hpp:26