diff --git a/include/raspimouse_ros2_examples/camera_line_follower_component.hpp b/include/raspimouse_ros2_examples/camera_line_follower_component.hpp index a960457..0e7a756 100644 --- a/include/raspimouse_ros2_examples/camera_line_follower_component.hpp +++ b/include/raspimouse_ros2_examples/camera_line_follower_component.hpp @@ -59,7 +59,7 @@ class Camera_Follower : public rclcpp_lifecycle::LifecycleNode std::string mat_type2encoding(const int mat_type) const; void convert_frame_to_message( const cv::Mat & frame, - sensor_msgs::msg::Image & msg); + sensor_msgs::msg::Image & msg) const; bool detecting_line(const cv::Mat & input_frame, cv::Mat & result_frame); diff --git a/src/camera_line_follower_component.cpp b/src/camera_line_follower_component.cpp index f429f87..cc7ba99 100644 --- a/src/camera_line_follower_component.cpp +++ b/src/camera_line_follower_component.cpp @@ -112,7 +112,7 @@ std::string Camera_Follower::mat_type2encoding(const int mat_type) const // Ref: https://github.com/ros2/demos/blob/dashing/image_tools/src/cam2image.cpp void Camera_Follower::convert_frame_to_message( - const cv::Mat & frame, sensor_msgs::msg::Image & msg) + const cv::Mat & frame, sensor_msgs::msg::Image & msg) const { // copy cv information into ros message msg.height = frame.rows;