Apartment Navigation By Classic Wheeled Robot
Comprehensive Production Grade Repository For Apartment Navigation Project (Inspired By Udacity Course)
 
Loading...
Searching...
No Matches
process_image_node.hpp
1#pragma once
2
3#include "image_utils.hpp"
4
5#include <custom_interfaces/srv/drive_to_target.hpp>
6#include <rclcpp/rclcpp.hpp>
7#include <sensor_msgs/msg/image.hpp>
8
10
18class ProcessImage : public rclcpp::Node {
19 public:
27
28 private:
32 struct VelocityParams {
33 double linear;
34 double angular;
35 };
36
42 void imageCallback(sensor_msgs::msg::Image::SharedPtr msg);
43
49 void processRgb8(const sensor_msgs::msg::Image::SharedPtr &msg);
50
56 void driveRobot(const VelocityParams &velocity);
57
58 rclcpp::Subscription<sensor_msgs::msg::Image>::SharedPtr m_imageSub;
59 rclcpp::Client<custom_interfaces::srv::DriveToTarget>::SharedPtr m_driveClient;
60
61 VelocityParams m_velocity;
62 RgbThreshold m_whiteBallThreshold;
63
64 bool m_wasMoving;
65};
66
67} // namespace robot_control::ball_chaser
ProcessImage()
Constructs and initializes the ProcessImage node.
Definition process_image_node.cpp:10
Ball detection and chasing logic.
Definition image_utils.hpp:5
RGB color threshold values for ball detection.
Definition image_utils.hpp:10