1 #ifndef STOPLINE_DETECTION_NODE_HPP
2 #define STOPLINE_DETECTION_NODE_HPP
7 #include "rclcpp/rclcpp.hpp"
10 #include <sensor_msgs/msg/image.hpp>
11 #include <image_transport/image_transport.h>
12 #include <cv_bridge/cv_bridge.h>
17 #include <opencv2/core/mat.hpp>
20 #include "std_msgs/msg/header.hpp"
26 bool m_simulationMode =
false;
27 bool m_debugMode =
false;
28 bool m_startlineDetectionMode =
true;
29 bool m_stopLineDetectionMode =
true;
47 bool m_stopLineDetectedInLastStep =
false;
49 int m_stopLineHoughMinLineLength = 25;
50 int m_stopLineHoughMaxLineGap = 10;
51 int m_stopLineHoughThreshold = 70;
53 int m_startLineGreynessLowerThreshold = 80;
54 double m_startLineQualityLevel = 0.35;
55 double m_startLineMinDistance = 10;
56 int m_startLineBlockSize = 3;
57 double m_startLineK = 0.04;
58 int m_startLineClusterEps = 10;
59 int m_startLinePointsCountThreshold = 9;
70 void on_stop_line_detection_callback(sensor_msgs::msg::Image::SharedPtr msg);
71 bool detect_startline(cv::Mat &image, std_msgs::msg::Header
const& header);
72 bool detect_stopline(cv::Mat &image, std_msgs::msg::Header
const& header);
73 rcl_interfaces::msg::SetParametersResult new_parameters_callback(
const std::vector<rclcpp::Parameter>& parameters);
76 #endif // AUTOPILOT_NODE_HPP