-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
620 additions
and
593 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 16 additions & 17 deletions
33
pipeline-line-fitting/include/pipeline_line_fitting/pipeline_line_fitting_ros.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
#ifndef PIPELINE_LINE_FITTING_ROS_HPP | ||
#define PIPELINE_LINE_FITTING_ROS_HPP | ||
|
||
#include <rclcpp/rclcpp.hpp> | ||
#include <geometry_msgs/msg/pose_array.hpp> | ||
#include <sensor_msgs/msg/image.hpp> | ||
#include <pipeline_line_fitting/linedetectorPipe.hpp> | ||
#include <cv_bridge/cv_bridge.h> | ||
#include <geometry_msgs/msg/pose_array.hpp> | ||
#include <opencv2/opencv.hpp> | ||
#include <pipeline_line_fitting/linedetectorPipe.hpp> | ||
#include <rclcpp/rclcpp.hpp> | ||
#include <rclcpp_components/register_node_macro.hpp> | ||
#include <sensor_msgs/msg/image.hpp> | ||
|
||
class PipelineLineFittingNode : public rclcpp::Node{ | ||
class PipelineLineFittingNode : public rclcpp::Node { | ||
|
||
public: | ||
PipelineLineFittingNode(const rclcpp::NodeOptions & options); | ||
PipelineLineFittingNode(const rclcpp::NodeOptions &options); | ||
|
||
~PipelineLineFittingNode(){}; | ||
~PipelineLineFittingNode() {}; | ||
|
||
private: | ||
rclcpp::Subscription<sensor_msgs::msg::Image>::SharedPtr image_sub_; | ||
rclcpp::Publisher<sensor_msgs::msg::Image>::SharedPtr | ||
image_visualization_pub_; | ||
rclcpp::Publisher<geometry_msgs::msg::PoseArray>::SharedPtr pose_array_pub_; | ||
|
||
rclcpp::Subscription<sensor_msgs::msg::Image>::SharedPtr image_sub_; | ||
rclcpp::Publisher<sensor_msgs::msg::Image>::SharedPtr image_visualization_pub_; | ||
rclcpp::Publisher<geometry_msgs::msg::PoseArray>::SharedPtr pose_array_pub_; | ||
|
||
LinedetectorPipe pipeline; | ||
bool publish_visualization_; | ||
LinedetectorPipe pipeline; | ||
bool publish_visualization_; | ||
|
||
void image_callback(const sensor_msgs::msg::Image::SharedPtr msg); | ||
void image_callback(const sensor_msgs::msg::Image::SharedPtr msg); | ||
|
||
cv::Mat draw_lines(cv::Mat &image, const vector<Line> &lines); | ||
cv::Mat draw_lines(cv::Mat &image, const vector<Line> &lines); | ||
}; | ||
|
||
|
||
#endif //PIPELINE_LINE_FITTING_ROS_HPP | ||
#endif // PIPELINE_LINE_FITTING_ROS_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 15 additions & 9 deletions
24
pipeline-line-fitting/launch/pipeline_line_fitting.launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
import os | ||
|
||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
pipeline_line_fitting_node = Node( | ||
package='pipeline_line_fitting', | ||
executable='pipeline_line_fitting_node', | ||
name='pipeline_line_fitting_node', | ||
parameters=[os.path.join(get_package_share_directory('pipeline_line_fitting'),'params','pipeline_line_fitting_params.yaml')], | ||
output='screen', | ||
) | ||
return LaunchDescription([ | ||
pipeline_line_fitting_node | ||
]) | ||
package="pipeline_line_fitting", | ||
executable="pipeline_line_fitting_node", | ||
name="pipeline_line_fitting_node", | ||
parameters=[ | ||
os.path.join( | ||
get_package_share_directory("pipeline_line_fitting"), | ||
"params", | ||
"pipeline_line_fitting_params.yaml", | ||
) | ||
], | ||
output="screen", | ||
) | ||
return LaunchDescription([pipeline_line_fitting_node]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.