-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/radar_lidar_calibration' of github.com:tier4/Ca…
…librationTools into feature/radar_lidar_calibration
- Loading branch information
Showing
102 changed files
with
13,536 additions
and
239 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
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
string[] files |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
bool success |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Files[] files_list | ||
--- | ||
bool success |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Files files | ||
--- | ||
bool success |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
cmake_minimum_required(VERSION 3.5) | ||
project(tier4_tag_utils) | ||
|
||
find_package(autoware_cmake REQUIRED) | ||
find_package(OpenCV REQUIRED) | ||
|
||
autoware_package() | ||
|
||
ament_auto_add_library(tier4_tag_utils_lib SHARED | ||
src/cv/sqpnp.cpp | ||
src/lidartag_hypothesis.cpp | ||
src/apriltag_hypothesis.cpp | ||
) | ||
|
||
target_link_libraries(tier4_tag_utils_lib | ||
${OpenCV_LIBS} | ||
) | ||
|
||
target_include_directories(tier4_tag_utils_lib | ||
PUBLIC | ||
include | ||
${OpenCV_INCLUDE_DIRS}) | ||
|
||
ament_export_include_directories( | ||
include | ||
${OpenCV_INCLUDE_DIRS} | ||
) | ||
|
||
ament_auto_add_library(apriltag_filter SHARED | ||
src/apriltag_filter.cpp | ||
) | ||
|
||
ament_auto_add_library(lidartag_filter SHARED | ||
src/lidartag_filter.cpp | ||
) | ||
|
||
target_link_libraries(apriltag_filter | ||
${OpenCV_LIBS} | ||
tier4_tag_utils_lib | ||
) | ||
|
||
target_link_libraries(lidartag_filter | ||
${OpenCV_LIBS} | ||
tier4_tag_utils_lib | ||
) | ||
|
||
rclcpp_components_register_node(apriltag_filter | ||
PLUGIN "tier4_tag_utils::ApriltagFilter" | ||
EXECUTABLE apriltag_filter_node | ||
) | ||
|
||
rclcpp_components_register_node(lidartag_filter | ||
PLUGIN "tier4_tag_utils::LidartagFilter" | ||
EXECUTABLE lidartag_filter_node | ||
) | ||
|
||
ament_auto_package( | ||
INSTALL_TO_SHARE | ||
launch | ||
) |
77 changes: 77 additions & 0 deletions
77
common/tier4_tag_utils/include/tier4_tag_utils/apriltag_filter.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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// Copyright 2022 Tier IV, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef TIER4_TAG_UTILS__APRILTAG_FILTER_HPP_ | ||
#define TIER4_TAG_UTILS__APRILTAG_FILTER_HPP_ | ||
|
||
#include <opencv2/opencv.hpp> | ||
#include <rclcpp/rclcpp.hpp> | ||
#include <tier4_tag_utils/apriltag_hypothesis.hpp> | ||
|
||
#include <apriltag_msgs/msg/april_tag_detection.hpp> | ||
#include <apriltag_msgs/msg/april_tag_detection_array.hpp> | ||
#include <sensor_msgs/msg/camera_info.hpp> | ||
|
||
#include <string> | ||
#include <unordered_map> | ||
#include <vector> | ||
|
||
namespace tier4_tag_utils | ||
{ | ||
|
||
class ApriltagFilter : public rclcpp::Node | ||
{ | ||
public: | ||
explicit ApriltagFilter(const rclcpp::NodeOptions & options); | ||
|
||
protected: | ||
void cameraInfoCallback(const sensor_msgs::msg::CameraInfo::SharedPtr camera_info_msg); | ||
|
||
void detectionsCallback( | ||
const apriltag_msgs::msg::AprilTagDetectionArray::SharedPtr detections_msg); | ||
|
||
void publishFilteredDetections(const std_msgs::msg::Header & header); | ||
|
||
// Parameters | ||
std::unordered_map<std::string, double> tag_sizes_map_; | ||
|
||
double max_no_observation_time_; | ||
double new_hypothesis_transl_; | ||
double measurement_noise_transl_; | ||
double process_noise_transl_; | ||
double min_tag_size_; | ||
double max_tag_distance_; | ||
double max_allowed_homography_error_; | ||
int max_hamming_error_; | ||
double min_margin_; | ||
|
||
// ROS Interface | ||
rclcpp::Publisher<apriltag_msgs::msg::AprilTagDetectionArray>::SharedPtr pub_; | ||
|
||
rclcpp::Subscription<sensor_msgs::msg::CameraInfo>::SharedPtr camera_info_sub_; | ||
|
||
rclcpp::Subscription<apriltag_msgs::msg::AprilTagDetectionArray>::SharedPtr | ||
apriltag_detections_array_sub_; | ||
|
||
// ROS Data | ||
sensor_msgs::msg::CameraInfo camera_info_; | ||
image_geometry::PinholeCameraModel pinhole_camera_model_; | ||
|
||
std::unordered_map<std::string, ApriltagHypothesis> hypotheses_map_; | ||
std::unordered_map<std::string, apriltag_msgs::msg::AprilTagDetection> detection_map_; | ||
}; | ||
|
||
} // namespace tier4_tag_utils | ||
|
||
#endif // TIER4_TAG_UTILS__APRILTAG_FILTER_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
File renamed without changes.
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
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
70 changes: 70 additions & 0 deletions
70
common/tier4_tag_utils/include/tier4_tag_utils/lidartag_filter.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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// Copyright 2022 Tier IV, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef TIER4_TAG_UTILS__LIDARTAG_FILTER_HPP_ | ||
#define TIER4_TAG_UTILS__LIDARTAG_FILTER_HPP_ | ||
|
||
#include <opencv2/opencv.hpp> | ||
#include <rclcpp/rclcpp.hpp> | ||
#include <tier4_tag_utils/lidartag_hypothesis.hpp> | ||
|
||
#include <lidartag_msgs/msg/lidar_tag_detection_array.hpp> | ||
|
||
#include <iostream> | ||
#include <string> | ||
#include <unordered_map> | ||
#include <vector> | ||
|
||
namespace tier4_tag_utils | ||
{ | ||
|
||
class LidartagFilter : public rclcpp::Node | ||
{ | ||
public: | ||
LidartagFilter(const rclcpp::NodeOptions & options); | ||
|
||
protected: | ||
void lidarTagDetectionsCallback( | ||
const lidartag_msgs::msg::LidarTagDetectionArray::SharedPtr detections_msg); | ||
|
||
void updateHypothesis( | ||
const lidartag_msgs::msg::LidarTagDetection & detection, const std_msgs::msg::Header & header); | ||
|
||
void publishFilteredDetections(const std_msgs::msg::Header & header); | ||
|
||
// Parameters | ||
double max_no_observation_time_; | ||
double new_hypothesis_distance_; | ||
double new_hypothesis_transl_; | ||
double new_hypothesis_rot_; | ||
double measurement_noise_transl_; | ||
double measurement_noise_rot_; | ||
double process_noise_transl_; | ||
double process_noise_transl_dot_; | ||
double process_noise_rot_; | ||
double process_noise_rot_dot_; | ||
|
||
// ROS Interface | ||
rclcpp::Publisher<lidartag_msgs::msg::LidarTagDetectionArray>::SharedPtr pub_; | ||
|
||
rclcpp::Subscription<lidartag_msgs::msg::LidarTagDetectionArray>::SharedPtr sub_; | ||
|
||
// Hypotheses | ||
std::unordered_map<int, LidartagHypothesis> hypotheses_map_; | ||
std::unordered_map<int, lidartag_msgs::msg::LidarTagDetection> detection_map_; | ||
}; | ||
|
||
} // namespace tier4_tag_utils | ||
|
||
#endif // TIER4_TAG_UTILS__LIDARTAG_FILTER_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
Oops, something went wrong.