From 6b39a770694af233dbf2884ab328c5e9084faebe Mon Sep 17 00:00:00 2001 From: suchang Date: Fri, 15 Jul 2022 15:02:48 +0800 Subject: [PATCH 1/3] read float param Signed-off-by: suchang --- .../launch/lidar_apollo_instance_segmentation.launch.xml | 2 +- perception/lidar_apollo_instance_segmentation/src/detector.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/perception/lidar_apollo_instance_segmentation/launch/lidar_apollo_instance_segmentation.launch.xml b/perception/lidar_apollo_instance_segmentation/launch/lidar_apollo_instance_segmentation.launch.xml index 9fed29828ed9f..78127590685fb 100644 --- a/perception/lidar_apollo_instance_segmentation/launch/lidar_apollo_instance_segmentation.launch.xml +++ b/perception/lidar_apollo_instance_segmentation/launch/lidar_apollo_instance_segmentation.launch.xml @@ -13,7 +13,7 @@ - + diff --git a/perception/lidar_apollo_instance_segmentation/src/detector.cpp b/perception/lidar_apollo_instance_segmentation/src/detector.cpp index af8b29f55f340..1241519285599 100644 --- a/perception/lidar_apollo_instance_segmentation/src/detector.cpp +++ b/perception/lidar_apollo_instance_segmentation/src/detector.cpp @@ -29,6 +29,7 @@ LidarApolloInstanceSegmentation::LidarApolloInstanceSegmentation(rclcpp::Node * std::string prototxt_file; std::string caffemodel_file; score_threshold_ = node_->declare_parameter("score_threshold", 0.8); + std::cout<<"score_threshold_:"<declare_parameter("range", 60); width = node_->declare_parameter("width", 640); height = node_->declare_parameter("height", 640); @@ -38,7 +39,7 @@ LidarApolloInstanceSegmentation::LidarApolloInstanceSegmentation(rclcpp::Node * use_intensity_feature = node_->declare_parameter("use_intensity_feature", true); use_constant_feature = node_->declare_parameter("use_constant_feature", true); target_frame_ = node_->declare_parameter("target_frame", "base_link"); - z_offset_ = node_->declare_parameter("z_offset", 2); + z_offset_ = node_->declare_parameter("z_offset", 2); // load weight file std::ifstream fs(engine_file); From 939459ce5f9e79e1175039b9ffe6638dcbe71998 Mon Sep 17 00:00:00 2001 From: suchang Date: Fri, 15 Jul 2022 15:11:10 +0800 Subject: [PATCH 2/3] remove cout Signed-off-by: suchang --- perception/lidar_apollo_instance_segmentation/src/detector.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/perception/lidar_apollo_instance_segmentation/src/detector.cpp b/perception/lidar_apollo_instance_segmentation/src/detector.cpp index 1241519285599..2ef5403626f82 100644 --- a/perception/lidar_apollo_instance_segmentation/src/detector.cpp +++ b/perception/lidar_apollo_instance_segmentation/src/detector.cpp @@ -29,7 +29,6 @@ LidarApolloInstanceSegmentation::LidarApolloInstanceSegmentation(rclcpp::Node * std::string prototxt_file; std::string caffemodel_file; score_threshold_ = node_->declare_parameter("score_threshold", 0.8); - std::cout<<"score_threshold_:"<declare_parameter("range", 60); width = node_->declare_parameter("width", 640); height = node_->declare_parameter("height", 640); From bb81c611117c34a48d4f3aeb82469cfbc99b438b Mon Sep 17 00:00:00 2001 From: suchang Date: Fri, 15 Jul 2022 17:43:44 +0800 Subject: [PATCH 3/3] change default z_offset Signed-off-by: suchang --- perception/lidar_apollo_instance_segmentation/src/detector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perception/lidar_apollo_instance_segmentation/src/detector.cpp b/perception/lidar_apollo_instance_segmentation/src/detector.cpp index 2ef5403626f82..77eee2c551846 100644 --- a/perception/lidar_apollo_instance_segmentation/src/detector.cpp +++ b/perception/lidar_apollo_instance_segmentation/src/detector.cpp @@ -38,7 +38,7 @@ LidarApolloInstanceSegmentation::LidarApolloInstanceSegmentation(rclcpp::Node * use_intensity_feature = node_->declare_parameter("use_intensity_feature", true); use_constant_feature = node_->declare_parameter("use_constant_feature", true); target_frame_ = node_->declare_parameter("target_frame", "base_link"); - z_offset_ = node_->declare_parameter("z_offset", 2); + z_offset_ = node_->declare_parameter("z_offset", -2.0); // load weight file std::ifstream fs(engine_file);