From efb6c0aa7d87b4faa18427bbe84335e4bb64de95 Mon Sep 17 00:00:00 2001 From: Amadeusz Szymko Date: Fri, 26 Dec 2025 14:04:31 +0900 Subject: [PATCH 01/14] feat: jazzy support Signed-off-by: Amadeusz Szymko --- .github/workflows/build-and-test-differential.yaml | 6 +++--- .github/workflows/build-and-test.yaml | 6 +++--- .github/workflows/check-build-depends.yaml | 6 +++--- .github/workflows/sync-tier4-universe-to-humble.yml | 8 ++++---- README.md | 5 ++--- build_depends.repos | 6 +++--- calibration_tools_autoware.repos | 12 ++++++++---- calibration_tools_standalone.repos | 10 +++++----- .../src/ground_plane_calibrator.cpp | 2 +- .../fov_residual.hpp | 2 +- .../lidar_to_lidar_2d_calibrator/CMakeLists.txt | 3 +++ .../src/lidar_to_lidar_2d_calibrator.cpp | 2 +- calibrators/mapping_based_calibrator/CMakeLists.txt | 2 ++ .../src/camera_calibrator.cpp | 2 +- .../src/mapping_based_calibrator.cpp | 12 ++++++------ .../src/marker_radar_lidar_calibrator.cpp | 10 +++++----- calibrators/tag_based_pnp_calibrator/CMakeLists.txt | 8 ++++++++ .../calibration_estimator.hpp | 2 +- .../tag_calibrator_visualizer.hpp | 2 +- .../src/tag_based_pnp_calibrator.cpp | 6 +++--- calibrators/tag_based_sfm_calibrator/CMakeLists.txt | 3 +++ .../ceres/camera_residual.hpp | 2 +- .../src/ceres/calibration_problem.cpp | 2 +- .../src/tag_based_sfm_calibrator.cpp | 2 +- .../joint_icp_extended_impl.hpp | 2 +- .../include/tier4_tag_utils/apriltag_hypothesis.hpp | 2 +- common/tier4_tag_utils/src/apriltag_filter.cpp | 2 +- docker/Dockerfile | 10 ++++++---- 28 files changed, 79 insertions(+), 58 deletions(-) diff --git a/.github/workflows/build-and-test-differential.yaml b/.github/workflows/build-and-test-differential.yaml index 2144d724..ca07210a 100644 --- a/.github/workflows/build-and-test-differential.yaml +++ b/.github/workflows/build-and-test-differential.yaml @@ -11,10 +11,10 @@ jobs: fail-fast: false matrix: rosdistro: - - humble + - jazzy include: - - rosdistro: humble - container: ros:humble + - rosdistro: jazzy + container: ros:jazzy build-depends-repos: build_depends.repos steps: - name: Cancel previous runs diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index fa1abd8c..3cb8696c 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -15,10 +15,10 @@ jobs: fail-fast: false matrix: rosdistro: - - humble + - jazzy include: - - rosdistro: humble - container: ros:humble + - rosdistro: jazzy + container: ros:jazzy build-depends-repos: build_depends.repos steps: - name: Check out repository diff --git a/.github/workflows/check-build-depends.yaml b/.github/workflows/check-build-depends.yaml index c790c213..2d5e470d 100644 --- a/.github/workflows/check-build-depends.yaml +++ b/.github/workflows/check-build-depends.yaml @@ -13,10 +13,10 @@ jobs: fail-fast: false matrix: rosdistro: - - humble + - jazzy include: - - rosdistro: humble - container: ros:humble + - rosdistro: jazzy + container: ros:jazzy build-depends-repos: build_depends.repos steps: - name: Check out repository diff --git a/.github/workflows/sync-tier4-universe-to-humble.yml b/.github/workflows/sync-tier4-universe-to-humble.yml index c8371533..eb93f608 100644 --- a/.github/workflows/sync-tier4-universe-to-humble.yml +++ b/.github/workflows/sync-tier4-universe-to-humble.yml @@ -1,4 +1,4 @@ -name: sync-tier4-universe-to-humble +name: sync-tier4-universe-to-jazzy on: schedule: - cron: 0 0 * * * @@ -19,9 +19,9 @@ jobs: uses: autowarefoundation/autoware-github-actions/sync-branches@v1 with: token: ${{ steps.generate-token.outputs.token }} - base-branch: humble + base-branch: jazzy sync-target-repository: git@github.com:tier4/CalibrationTools.git sync-target-branch: tier4/universe - sync-branch: sync-tier4-universe-to-humble - pr-title: "chore: sync tier4/universe to humble" + sync-branch: sync-tier4-universe-to-jazzy + pr-title: "chore: sync tier4/universe to jazzy" auto-merge-method: merge diff --git a/README.md b/README.md index 11dda3f9..80a80a49 100644 --- a/README.md +++ b/README.md @@ -26,14 +26,13 @@ Calibration tools for sensors used in autonomous driving and robotics (camera, l - [Using your vehicle/robot](#using-your-vehiclerobot) - [Create a new project](#create-a-new-project) - [Integrate a new calibrator](#integrate-a-new-calibrator) - - [Troubleshooting & known issues](TROUBLESHOOTING.md) ## Installation ### Requirements -- Ubuntu 22.04 -- ROS2 Humble +- Ubuntu 24.04 +- ROS2 Jazzy ### Installation alongside autoware diff --git a/build_depends.repos b/build_depends.repos index 3dc98c1e..2641fc6d 100644 --- a/build_depends.repos +++ b/build_depends.repos @@ -25,7 +25,7 @@ repositories: version: tier4/universe autoware/universe: type: git - url: https://github.com/autowarefoundation/autoware.universe.git + url: https://github.com/autowarefoundation/autoware_universe.git version: main vendor/lidartag: type: git @@ -42,11 +42,11 @@ repositories: vendor/apriltag_ros: type: git url: https://github.com/christianrauch/apriltag_ros.git - version: e814e9e5d5f1bfb60a4aa685d30977c632bbc540 + version: 6a6c04a16502413f114649f9bdb166c784d4fcfb vendor/ros2_numpy: type: git url: https://github.com/Box-Robotics/ros2_numpy.git - version: humble + version: jazzy vendor/ndt_omp: type: git url: https://github.com/tier4/ndt_omp.git diff --git a/calibration_tools_autoware.repos b/calibration_tools_autoware.repos index 3b973546..71cae23e 100644 --- a/calibration_tools_autoware.repos +++ b/calibration_tools_autoware.repos @@ -1,8 +1,8 @@ repositories: autoware/calibration_tools: type: git - url: https://github.com/tier4/CalibrationTools.git - version: tier4/universe + url: https://github.com/amadeuszsz/CalibrationTools.git # TODO: restore upstream + version: feat/jazzy-support # TODO: restore tier4/universe branch vendor/lidartag: type: git url: https://github.com/tier4/LiDARTag.git @@ -18,12 +18,16 @@ repositories: vendor/apriltag_ros: type: git url: https://github.com/christianrauch/apriltag_ros.git - version: e814e9e5d5f1bfb60a4aa685d30977c632bbc540 + version: 6a6c04a16502413f114649f9bdb166c784d4fcfb vendor/ros2_numpy: type: git url: https://github.com/Box-Robotics/ros2_numpy.git - version: humble + version: jazzy vendor/image_pipeline: type: git url: https://github.com/tier4/image_pipeline.git version: 47964112293eb19f9f57254b2e6b68706954cc63 + vendor/ndt_omp: + type: git + url: https://github.com/tier4/ndt_omp.git + version: tier4/main diff --git a/calibration_tools_standalone.repos b/calibration_tools_standalone.repos index d869534b..e74d6164 100644 --- a/calibration_tools_standalone.repos +++ b/calibration_tools_standalone.repos @@ -1,8 +1,8 @@ repositories: calibration_tools: type: git - url: https://github.com/tier4/CalibrationTools.git - version: tier4/universe + url: https://github.com/amadeuszsz/CalibrationTools.git # TODO: restore upstream + version: feat/jazzy-support # TODO: restore tier4/universe branch autoware/autoware_cmake: type: git url: https://github.com/autowarefoundation/autoware_cmake.git @@ -29,7 +29,7 @@ repositories: version: tier4/universe autoware/universe: type: git - url: https://github.com/autowarefoundation/autoware.universe.git + url: https://github.com/autowarefoundation/autoware_universe.git version: main vendor/lidartag: type: git @@ -46,11 +46,11 @@ repositories: vendor/apriltag_ros: type: git url: https://github.com/christianrauch/apriltag_ros.git - version: e814e9e5d5f1bfb60a4aa685d30977c632bbc540 + version: 6a6c04a16502413f114649f9bdb166c784d4fcfb vendor/ros2_numpy: type: git url: https://github.com/Box-Robotics/ros2_numpy.git - version: humble + version: jazzy vendor/ndt_omp: type: git url: https://github.com/tier4/ndt_omp.git diff --git a/calibrators/ground_plane_calibrator/src/ground_plane_calibrator.cpp b/calibrators/ground_plane_calibrator/src/ground_plane_calibrator.cpp index 5df40e60..65b06e27 100644 --- a/calibrators/ground_plane_calibrator/src/ground_plane_calibrator.cpp +++ b/calibrators/ground_plane_calibrator/src/ground_plane_calibrator.cpp @@ -103,7 +103,7 @@ ExtrinsicGroundPlaneCalibrator::ExtrinsicGroundPlaneCalibrator(const rclcpp::Nod std::bind( &ExtrinsicGroundPlaneCalibrator::requestReceivedCallback, this, std::placeholders::_1, std::placeholders::_2), - rmw_qos_profile_services_default, srv_callback_group_); + rclcpp::ServicesQoS(), srv_callback_group_); // Initialize the filter kalman_filter_.setA(Eigen::DiagonalMatrix(1.0, 1.0, 1.0, 1.0, 1.0, 1.0)); diff --git a/calibrators/intrinsic_camera_calibrator/ceres_intrinsic_camera_calibrator/include/ceres_intrinsic_camera_calibrator/fov_residual.hpp b/calibrators/intrinsic_camera_calibrator/ceres_intrinsic_camera_calibrator/include/ceres_intrinsic_camera_calibrator/fov_residual.hpp index 6866c1f4..a06c8695 100644 --- a/calibrators/intrinsic_camera_calibrator/ceres_intrinsic_camera_calibrator/include/ceres_intrinsic_camera_calibrator/fov_residual.hpp +++ b/calibrators/intrinsic_camera_calibrator/ceres_intrinsic_camera_calibrator/include/ceres_intrinsic_camera_calibrator/fov_residual.hpp @@ -341,7 +341,7 @@ std::vector> getCameraPoints( auto backprojection_err = ceres::sqrt(ceres::pow(u - u_bpr, 2) + ceres::pow(v - v_bpr, 2)); auto sign_shift_x = u <= T(0.0) ? T(-1.0) : u >= width - T(1.0) ? T(1.0) : T(0.0); auto sign_shift_y = v <= T(0.0) ? T(-1.0) : v >= height - T(1.0) ? T(1.0) : T(0.0); - if (ceres::IsNaN(backprojection_err) || backprojection_err > backprojection_err_thr) { + if (ceres::isnan(backprojection_err) || backprojection_err > backprojection_err_thr) { camera_points.push_back({x, y, depth, sign_shift_x, sign_shift_y, backprojection_err, false}); return false; } diff --git a/calibrators/lidar_to_lidar_2d_calibrator/CMakeLists.txt b/calibrators/lidar_to_lidar_2d_calibrator/CMakeLists.txt index 40a3db63..daf8c7c3 100755 --- a/calibrators/lidar_to_lidar_2d_calibrator/CMakeLists.txt +++ b/calibrators/lidar_to_lidar_2d_calibrator/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.5) project(lidar_to_lidar_2d_calibrator) +add_compile_options(-Wno-array-bounds) +add_compile_options(-Wno-stringop-overflow) + find_package(autoware_cmake REQUIRED) find_package(OpenCV REQUIRED) # TODO: consider removing this one later diff --git a/calibrators/lidar_to_lidar_2d_calibrator/src/lidar_to_lidar_2d_calibrator.cpp b/calibrators/lidar_to_lidar_2d_calibrator/src/lidar_to_lidar_2d_calibrator.cpp index 665fac9b..fc6605d6 100644 --- a/calibrators/lidar_to_lidar_2d_calibrator/src/lidar_to_lidar_2d_calibrator.cpp +++ b/calibrators/lidar_to_lidar_2d_calibrator/src/lidar_to_lidar_2d_calibrator.cpp @@ -115,7 +115,7 @@ LidarToLidar2DCalibrator::LidarToLidar2DCalibrator(const rclcpp::NodeOptions & o std::bind( &LidarToLidar2DCalibrator::requestReceivedCallback, this, std::placeholders::_1, std::placeholders::_2), - rmw_qos_profile_services_default, srv_callback_group_); + rclcpp::ServicesQoS(), srv_callback_group_); // Initialize the filter kalman_filter_.setA(Eigen::DiagonalMatrix(1.0, 1.0, 1.0)); diff --git a/calibrators/mapping_based_calibrator/CMakeLists.txt b/calibrators/mapping_based_calibrator/CMakeLists.txt index 1b8d02f8..2dcc903a 100644 --- a/calibrators/mapping_based_calibrator/CMakeLists.txt +++ b/calibrators/mapping_based_calibrator/CMakeLists.txt @@ -5,6 +5,8 @@ project(mapping_based_calibrator) # cSpell:ignore DEIGEN #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DEIGEN_NO_DEBUG -march=native -Wl,--no-as-needed") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") +add_compile_options(-Wno-array-bounds) +add_compile_options(-Wno-stringop-overflow) find_package(autoware_cmake REQUIRED) find_package(OpenMP) diff --git a/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp b/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp index 0496c820..f71262c2 100644 --- a/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp +++ b/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include diff --git a/calibrators/mapping_based_calibrator/src/mapping_based_calibrator.cpp b/calibrators/mapping_based_calibrator/src/mapping_based_calibrator.cpp index 8842fff0..b9e819e2 100644 --- a/calibrators/mapping_based_calibrator/src/mapping_based_calibrator.cpp +++ b/calibrators/mapping_based_calibrator/src/mapping_based_calibrator.cpp @@ -272,9 +272,9 @@ ExtrinsicMappingBasedCalibrator::ExtrinsicMappingBasedCalibrator( this->create_publisher("keyframe_markers", 10); auto rosbag2_pause_client_ = this->create_client( - "/rosbag2_player/pause", rmw_qos_profile_services_default); + "/rosbag2_player/pause", rclcpp::ServicesQoS()); auto rosbag2_resume_client_ = this->create_client( - "/rosbag2_player/resume", rmw_qos_profile_services_default); + "/rosbag2_player/resume", rclcpp::ServicesQoS()); // Set up mapper mapper_ = std::make_shared( @@ -335,7 +335,7 @@ ExtrinsicMappingBasedCalibrator::ExtrinsicMappingBasedCalibrator( std::bind( &ExtrinsicMappingBasedCalibrator::requestReceivedCallback, this, std::placeholders::_1, std::placeholders::_2), - rmw_qos_profile_services_default, srv_callback_group_); + rclcpp::ServicesQoS(), srv_callback_group_); // Set up sensor callbacks assert( @@ -404,7 +404,7 @@ ExtrinsicMappingBasedCalibrator::ExtrinsicMappingBasedCalibrator( mapper_->stop(); RCLCPP_INFO_STREAM(this->get_logger(), "Mapper stopped through service"); }, - rmw_qos_profile_services_default); + rclcpp::ServicesQoS()); load_database_server_ = this->create_service( @@ -412,7 +412,7 @@ ExtrinsicMappingBasedCalibrator::ExtrinsicMappingBasedCalibrator( std::bind( &ExtrinsicMappingBasedCalibrator::loadDatabaseCallback, this, std::placeholders::_1, std::placeholders::_2), - rmw_qos_profile_services_default); + rclcpp::ServicesQoS()); save_database_server_ = this->create_service( @@ -420,7 +420,7 @@ ExtrinsicMappingBasedCalibrator::ExtrinsicMappingBasedCalibrator( std::bind( &ExtrinsicMappingBasedCalibrator::saveDatabaseCallback, this, std::placeholders::_1, std::placeholders::_2), - rmw_qos_profile_services_default); + rclcpp::ServicesQoS()); publisher_timer_ = rclcpp::create_timer( this, this->get_clock(), 5s, std::bind(&CalibrationMapper::publisherTimerCallback, mapper_)); diff --git a/calibrators/marker_radar_lidar_calibrator/src/marker_radar_lidar_calibrator.cpp b/calibrators/marker_radar_lidar_calibrator/src/marker_radar_lidar_calibrator.cpp index ef867465..648fd7df 100644 --- a/calibrators/marker_radar_lidar_calibrator/src/marker_radar_lidar_calibrator.cpp +++ b/calibrators/marker_radar_lidar_calibrator/src/marker_radar_lidar_calibrator.cpp @@ -269,14 +269,14 @@ ExtrinsicReflectorBasedCalibrator::ExtrinsicReflectorBasedCalibrator( std::bind( &ExtrinsicReflectorBasedCalibrator::requestReceivedCallback, this, std::placeholders::_1, std::placeholders::_2), - rmw_qos_profile_services_default, calibration_api_srv_callback_group_); + rclcpp::ServicesQoS(), calibration_api_srv_callback_group_); background_model_service_server_ = this->create_service( "extract_background_model", std::bind( &ExtrinsicReflectorBasedCalibrator::backgroundModelRequestCallback, this, std::placeholders::_1, std::placeholders::_2), - rmw_qos_profile_services_default, calibration_ui_srv_callback_group_); + rclcpp::ServicesQoS(), calibration_ui_srv_callback_group_); timer_ = rclcpp::create_timer( this, get_clock(), std::chrono::seconds(1), @@ -329,7 +329,7 @@ void ExtrinsicReflectorBasedCalibrator::timerCallback() std::bind( &ExtrinsicReflectorBasedCalibrator::trackingRequestCallback, this, std::placeholders::_1, std::placeholders::_2), - rmw_qos_profile_services_default, calibration_ui_srv_callback_group_); + rclcpp::ServicesQoS(), calibration_ui_srv_callback_group_); } if (calibration_valid_ && !send_calibration_service_server_) { @@ -338,7 +338,7 @@ void ExtrinsicReflectorBasedCalibrator::timerCallback() std::bind( &ExtrinsicReflectorBasedCalibrator::sendCalibrationCallback, this, std::placeholders::_1, std::placeholders::_2), - rmw_qos_profile_services_default, calibration_ui_srv_callback_group_); + rclcpp::ServicesQoS(), calibration_ui_srv_callback_group_); } if (converged_tracks_.size() > 0 && !delete_track_service_server_) { @@ -347,7 +347,7 @@ void ExtrinsicReflectorBasedCalibrator::timerCallback() std::bind( &ExtrinsicReflectorBasedCalibrator::deleteTrackRequestCallback, this, std::placeholders::_1, std::placeholders::_2), - rmw_qos_profile_services_default, calibration_ui_srv_callback_group_); + rclcpp::ServicesQoS(), calibration_ui_srv_callback_group_); } } diff --git a/calibrators/tag_based_pnp_calibrator/CMakeLists.txt b/calibrators/tag_based_pnp_calibrator/CMakeLists.txt index b2502e16..01275fd7 100644 --- a/calibrators/tag_based_pnp_calibrator/CMakeLists.txt +++ b/calibrators/tag_based_pnp_calibrator/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.5) project(tag_based_pnp_calibrator) +add_compile_options(-Wno-array-bounds) +add_compile_options(-Wno-stringop-overflow) + find_package(autoware_cmake REQUIRED) find_package(OpenCV REQUIRED) @@ -21,6 +24,11 @@ ament_auto_add_executable(tag_based_pnp_calibrator src/math.cpp ) +target_include_directories(tag_based_pnp_calibrator PUBLIC + include + ${OpenCV_INCLUDE_DIRS} +) + target_link_libraries(tag_based_pnp_calibrator ${OpenCV_LIBS} ) diff --git a/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/calibration_estimator.hpp b/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/calibration_estimator.hpp index 1bcc7e83..40bcad67 100644 --- a/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/calibration_estimator.hpp +++ b/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/calibration_estimator.hpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp b/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp index a97ed4e4..87de96d4 100644 --- a/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp +++ b/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include diff --git a/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp b/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp index 6821b289..8ab3e422 100644 --- a/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp +++ b/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp @@ -13,6 +13,7 @@ // limitations under the License. #include // note: this header must come before +#include #include #include #include @@ -22,8 +23,7 @@ #include -#include -#include +#include #include #include @@ -159,7 +159,7 @@ ExtrinsicTagBasedPNPCalibrator::ExtrinsicTagBasedPNPCalibrator(const rclcpp::Nod std::bind( &ExtrinsicTagBasedPNPCalibrator::requestReceivedCallback, this, std::placeholders::_1, std::placeholders::_2), - rmw_qos_profile_services_default, srv_callback_group_); + rclcpp::ServicesQoS(), srv_callback_group_); visualizer_ = std::make_unique(filtered_projections_markers_pub_); diff --git a/calibrators/tag_based_sfm_calibrator/CMakeLists.txt b/calibrators/tag_based_sfm_calibrator/CMakeLists.txt index 7cf42b59..1c87ee9a 100644 --- a/calibrators/tag_based_sfm_calibrator/CMakeLists.txt +++ b/calibrators/tag_based_sfm_calibrator/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.5) project(tag_based_sfm_calibrator) +add_compile_options(-Wno-array-bounds) +add_compile_options(-Wno-stringop-overflow) + find_package(rclcpp REQUIRED) find_package(rclpy REQUIRED) find_package(apriltag REQUIRED) diff --git a/calibrators/tag_based_sfm_calibrator/include/tag_based_sfm_calibrator/ceres/camera_residual.hpp b/calibrators/tag_based_sfm_calibrator/include/tag_based_sfm_calibrator/ceres/camera_residual.hpp index a1c06abb..0ef53b1f 100644 --- a/calibrators/tag_based_sfm_calibrator/include/tag_based_sfm_calibrator/ceres/camera_residual.hpp +++ b/calibrators/tag_based_sfm_calibrator/include/tag_based_sfm_calibrator/ceres/camera_residual.hpp @@ -382,7 +382,7 @@ struct CameraResidual : public SensorResidual std::array & fixed_camera_pose_inv, bool fix_camera_pose, bool optimize_intrinsics) { - std::array null_tag_rotation_z; + std::array null_tag_rotation_z = {}; auto f = new CameraResidual( camera_uid, intrinsics, detection, fixed_camera_pose_inv, null_tag_rotation_z, diff --git a/calibrators/tag_based_sfm_calibrator/src/ceres/calibration_problem.cpp b/calibrators/tag_based_sfm_calibrator/src/ceres/calibration_problem.cpp index 6a5360cb..15b36148 100644 --- a/calibrators/tag_based_sfm_calibrator/src/ceres/calibration_problem.cpp +++ b/calibrators/tag_based_sfm_calibrator/src/ceres/calibration_problem.cpp @@ -13,6 +13,7 @@ // limitations under the License. #include +#include #include #include #include @@ -29,7 +30,6 @@ #include #include -#include #include #include diff --git a/calibrators/tag_based_sfm_calibrator/src/tag_based_sfm_calibrator.cpp b/calibrators/tag_based_sfm_calibrator/src/tag_based_sfm_calibrator.cpp index 55d7d851..e225079a 100644 --- a/calibrators/tag_based_sfm_calibrator/src/tag_based_sfm_calibrator.cpp +++ b/calibrators/tag_based_sfm_calibrator/src/tag_based_sfm_calibrator.cpp @@ -304,7 +304,7 @@ ExtrinsicTagBasedBaseCalibrator::ExtrinsicTagBasedBaseCalibrator( std::bind( &ExtrinsicTagBasedBaseCalibrator::calibrationRequestCallback, this, std::placeholders::_1, std::placeholders::_2), - rmw_qos_profile_services_default, calibration_api_srv_group_); + rclcpp::ServicesQoS(), calibration_api_srv_group_); // Scene related services add_external_camera_images_srv_ = diff --git a/common/tier4_calibration_pcl_extensions/include/tier4_calibration_pcl_extensions/joint_icp_extended_impl.hpp b/common/tier4_calibration_pcl_extensions/include/tier4_calibration_pcl_extensions/joint_icp_extended_impl.hpp index 68ac4f83..3599e0a8 100644 --- a/common/tier4_calibration_pcl_extensions/include/tier4_calibration_pcl_extensions/joint_icp_extended_impl.hpp +++ b/common/tier4_calibration_pcl_extensions/include/tier4_calibration_pcl_extensions/joint_icp_extended_impl.hpp @@ -326,7 +326,7 @@ void pcl::JointIterativeClosestPointExtended:: } // Check whether we have enough correspondences - if (static_cast(correspondences_->size()) < min_number_correspondences_) { + if (correspondences_->size() < static_cast(min_number_correspondences_)) { PCL_ERROR( "[pcl::%s::computeTransformation] Not enough correspondences found. " "Relax your threshold parameters.\n", diff --git a/common/tier4_tag_utils/include/tier4_tag_utils/apriltag_hypothesis.hpp b/common/tier4_tag_utils/include/tier4_tag_utils/apriltag_hypothesis.hpp index 4e4fa6b6..88d0fba8 100644 --- a/common/tier4_tag_utils/include/tier4_tag_utils/apriltag_hypothesis.hpp +++ b/common/tier4_tag_utils/include/tier4_tag_utils/apriltag_hypothesis.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include diff --git a/common/tier4_tag_utils/src/apriltag_filter.cpp b/common/tier4_tag_utils/src/apriltag_filter.cpp index f13568b9..b72625cc 100644 --- a/common/tier4_tag_utils/src/apriltag_filter.cpp +++ b/common/tier4_tag_utils/src/apriltag_filter.cpp @@ -21,7 +21,7 @@ #include -#include +#include #include #include diff --git a/docker/Dockerfile b/docker/Dockerfile index 60816ba2..69c1467c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,25 +1,27 @@ -FROM osrf/ros:humble-desktop-jammy +FROM osrf/ros:jazzy-desktop-noble SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ENV PIP_BREAK_SYSTEM_PACKAGES=1 + RUN apt-get update && apt-get install --no-install-recommends -y \ python3-pip \ wget -RUN echo "source /opt/ros/humble/setup.bash" >> /etc/bash.bashrc +RUN echo "source /opt/ros/jazzy/setup.bash" >> /etc/bash.bashrc WORKDIR /workspace RUN mkdir -p /workspace/src -RUN wget https://raw.githubusercontent.com/tier4/CalibrationTools/tier4/universe/calibration_tools_standalone.repos --directory-prefix=/workspace +RUN wget https://raw.githubusercontent.com/amadeuszsz/CalibrationTools/feat/jazzy-support/calibration_tools_standalone.repos --directory-prefix=/workspace RUN vcs import src < calibration_tools_standalone.repos RUN rosdep install -y --from-paths `colcon list --packages-up-to sensor_calibration_tools -p` --ignore-src -RUN source /opt/ros/humble/setup.bash && colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to sensor_calibration_tools +RUN source /opt/ros/jazzy/setup.bash && colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to sensor_calibration_tools RUN rm -rf /var/lib/apt/lists/* From 218b1785fe44a2a98b4ebedbe91711bd20a36b2d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 8 Jan 2026 04:40:52 +0000 Subject: [PATCH 02/14] ci(pre-commit): autofix --- calibrators/mapping_based_calibrator/src/camera_calibrator.cpp | 2 +- .../include/tag_based_pnp_calibrator/calibration_estimator.hpp | 2 +- .../tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp | 3 +-- .../tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp | 2 +- .../include/tier4_tag_utils/apriltag_hypothesis.hpp | 3 +-- common/tier4_tag_utils/src/apriltag_filter.cpp | 3 +-- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp b/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp index f71262c2..dd049a95 100644 --- a/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp +++ b/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include #include @@ -22,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/calibration_estimator.hpp b/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/calibration_estimator.hpp index 40bcad67..226bfed2 100644 --- a/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/calibration_estimator.hpp +++ b/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/calibration_estimator.hpp @@ -15,6 +15,7 @@ #ifndef TAG_BASED_PNP_CALIBRATOR__CALIBRATION_ESTIMATOR_HPP_ #define TAG_BASED_PNP_CALIBRATOR__CALIBRATION_ESTIMATOR_HPP_ +#include #include #include #include @@ -26,7 +27,6 @@ #include #include -#include #include #include diff --git a/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp b/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp index 87de96d4..81654ba9 100644 --- a/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp +++ b/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp @@ -16,6 +16,7 @@ #define TAG_BASED_PNP_CALIBRATOR__TAG_CALIBRATOR_VISUALIZER_HPP_ #include +#include #include #include #include @@ -27,8 +28,6 @@ #include #include -#include - #include #include #include diff --git a/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp b/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp index 8ab3e422..9221e889 100644 --- a/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp +++ b/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp @@ -14,6 +14,7 @@ #include // note: this header must come before #include +#include #include #include #include @@ -23,7 +24,6 @@ #include -#include #include #include diff --git a/common/tier4_tag_utils/include/tier4_tag_utils/apriltag_hypothesis.hpp b/common/tier4_tag_utils/include/tier4_tag_utils/apriltag_hypothesis.hpp index 88d0fba8..9c69f5b3 100644 --- a/common/tier4_tag_utils/include/tier4_tag_utils/apriltag_hypothesis.hpp +++ b/common/tier4_tag_utils/include/tier4_tag_utils/apriltag_hypothesis.hpp @@ -15,13 +15,12 @@ #ifndef TIER4_TAG_UTILS__APRILTAG_HYPOTHESIS_HPP_ #define TIER4_TAG_UTILS__APRILTAG_HYPOTHESIS_HPP_ +#include #include #include #include #include -#include - #include namespace tier4_tag_utils diff --git a/common/tier4_tag_utils/src/apriltag_filter.cpp b/common/tier4_tag_utils/src/apriltag_filter.cpp index b72625cc..0439991b 100644 --- a/common/tier4_tag_utils/src/apriltag_filter.cpp +++ b/common/tier4_tag_utils/src/apriltag_filter.cpp @@ -13,6 +13,7 @@ // limitations under the License. #include +#include #include #include #include @@ -21,8 +22,6 @@ #include -#include - #include #include #include From 96e96536a84ff24d65dc60404530b056afe93c85 Mon Sep 17 00:00:00 2001 From: Amadeusz Szymko Date: Thu, 8 Jan 2026 13:43:13 +0900 Subject: [PATCH 03/14] fix: cspell Signed-off-by: Amadeusz Szymko --- .cspell.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.cspell.json b/.cspell.json index 2a97aa78..2b8b8ced 100644 --- a/.cspell.json +++ b/.cspell.json @@ -90,6 +90,7 @@ "solvepnp", "sqpnp", "srvs", + "stringop", "subsampled", "subsamples", "subsampling", From 52673f892ba5a498d56088f96fe83e430ca851aa Mon Sep 17 00:00:00 2001 From: Amadeusz Szymko Date: Thu, 8 Jan 2026 13:46:35 +0900 Subject: [PATCH 04/14] docs: adjust dead links Signed-off-by: Amadeusz Szymko --- docs/tutorials/mapping_based_calibrator.md | 2 +- docs/tutorials/marker_radar_lidar_calibrator.md | 2 +- docs/tutorials/tag_based_pnp_calibrator.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/mapping_based_calibrator.md b/docs/tutorials/mapping_based_calibrator.md index b276c93e..12afe63f 100644 --- a/docs/tutorials/mapping_based_calibrator.md +++ b/docs/tutorials/mapping_based_calibrator.md @@ -130,7 +130,7 @@ In the UI of the rdv project, three different TF trees are displayed: `Initial T - The `Initial TF Tree` presents the initial TF connections between sensors needed for calibration. - The `Calibration Tree` shows the calibrated transformation between sensors, in this tutorial, `pandar_top`, `pandar_front`, `pandar_right`and `pandar_left`. -- The `Final TF Tree` depicts the TF tree after incorporating the updated calibrated transformation. As autoware utilizes the concept of [sensor_kit](https://autowarefoundation.github.io/autoware-documentation/main/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-model/creating-sensor-model/), the final transformations required to comply to the specifications is `sensor_kit_base_link` to `pandar_front_base_link`, `pandar_left_base_link`, and `pandar_right_base_link`. These transformations are performed by the [calibrator interface](../../sensor_calibration_manager/sensor_calibration_manager/calibrators/rdv/mapping_based_lidar_lidar_calibrator.py) related to this project. The red arrows indicate that the final transformations changed after the calibration process. +- The `Final TF Tree` depicts the TF tree after incorporating the updated calibrated transformation. As autoware utilizes the concept of [sensor_kit](https://autowarefoundation.github.io/autoware-documentation/main/tutorials/integrating-autoware/creating-vehicle-and-sensor-model/creating-sensor-model/), the final transformations required to comply to the specifications is `sensor_kit_base_link` to `pandar_front_base_link`, `pandar_left_base_link`, and `pandar_right_base_link`. These transformations are performed by the [calibrator interface](../../sensor_calibration_manager/sensor_calibration_manager/calibrators/rdv/mapping_based_lidar_lidar_calibrator.py) related to this project. The red arrows indicate that the final transformations changed after the calibration process.

menu4 diff --git a/docs/tutorials/marker_radar_lidar_calibrator.md b/docs/tutorials/marker_radar_lidar_calibrator.md index 006b01d9..553ac1a3 100644 --- a/docs/tutorials/marker_radar_lidar_calibrator.md +++ b/docs/tutorials/marker_radar_lidar_calibrator.md @@ -220,7 +220,7 @@ In the UI of the X2 project, three different TF trees are displayed: `Initial TF - The `Initial TF Tree` presents the initial TF connections between sensors needed for calibration. - The `Calibration Tree` shows the calibrated transformation between sensors, in this tutorial, `front_center/radar_link` to `pandar_40p_front`. -- The `Final TF Tree` depicts the TF tree after incorporating the updated calibrated transformation. As autoware utilizes the concept of [sensor_kit](https://autowarefoundation.github.io/autoware-documentation/main/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-model/creating-sensor-model/), the final transformation required to comply to the specifications is `front_unit_base_link` to `front_center/radar_link`. This transformation is performed by the [calibrator interface](../../sensor_calibration_manager/sensor_calibration_manager/calibrators/x2/marker_radar_lidar_calibrator.py) related to this project. The red arrow indicates that the final transformation changed after the calibration process. +- The `Final TF Tree` depicts the TF tree after incorporating the updated calibrated transformation. As autoware utilizes the concept of [sensor_kit](https://autowarefoundation.github.io/autoware-documentation/main/tutorials/integrating-autoware/creating-vehicle-and-sensor-model/creating-sensor-model/), the final transformation required to comply to the specifications is `front_unit_base_link` to `front_center/radar_link`. This transformation is performed by the [calibrator interface](../../sensor_calibration_manager/sensor_calibration_manager/calibrators/x2/marker_radar_lidar_calibrator.py) related to this project. The red arrow indicates that the final transformation changed after the calibration process.

menu4 diff --git a/docs/tutorials/tag_based_pnp_calibrator.md b/docs/tutorials/tag_based_pnp_calibrator.md index 572a01f3..51702eb8 100644 --- a/docs/tutorials/tag_based_pnp_calibrator.md +++ b/docs/tutorials/tag_based_pnp_calibrator.md @@ -103,7 +103,7 @@ In the UI of the X2 project, three different TF trees are displayed: `Initial TF - The `Initial TF Tree` presents the initial TF connections between sensors needed for calibration. - The `Calibration Tree` shows the calibrated transformation between sensors, in this tutorial, `camera6/camera_optical_link` to `pandar_40p_front`. -- The `Final TF Tree` depicts the TF tree after incorporating the updated calibrated transformation. As autoware utilizes the concept of [sensor_kit](https://autowarefoundation.github.io/autoware-documentation/main/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-model/creating-sensor-model/), the final transformation required to comply to the specifications is `front_unit_base_link` to `camera6/camera_link`. This transformation is performed by the [calibrator interface](../../sensor_calibration_manager/sensor_calibration_manager/calibrators/x2/tag_based_pnp_calibrator.py) related to this project. The red arrow indicates that the final transformation changed after the calibration process. +- The `Final TF Tree` depicts the TF tree after incorporating the updated calibrated transformation. As autoware utilizes the concept of [sensor_kit](https://autowarefoundation.github.io/autoware-documentation/main/tutorials/integrating-autoware/creating-vehicle-and-sensor-model/creating-sensor-model/), the final transformation required to comply to the specifications is `front_unit_base_link` to `camera6/camera_link`. This transformation is performed by the [calibrator interface](../../sensor_calibration_manager/sensor_calibration_manager/calibrators/x2/tag_based_pnp_calibrator.py) related to this project. The red arrow indicates that the final transformation changed after the calibration process.

menu4 From 227db06da4b42d14499c36dcb7095ec88dba49ac Mon Sep 17 00:00:00 2001 From: Amadeusz Szymko Date: Thu, 8 Jan 2026 13:51:25 +0900 Subject: [PATCH 05/14] refactor: adjust filename Signed-off-by: Amadeusz Szymko --- ...r4-universe-to-humble.yml => sync-tier4-universe-to-jazzy.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{sync-tier4-universe-to-humble.yml => sync-tier4-universe-to-jazzy.yml} (100%) diff --git a/.github/workflows/sync-tier4-universe-to-humble.yml b/.github/workflows/sync-tier4-universe-to-jazzy.yml similarity index 100% rename from .github/workflows/sync-tier4-universe-to-humble.yml rename to .github/workflows/sync-tier4-universe-to-jazzy.yml From 2e40de354673611493d0ac43e1225bf7bd53384f Mon Sep 17 00:00:00 2001 From: Amadeusz Szymko Date: Fri, 9 Jan 2026 15:17:37 +0900 Subject: [PATCH 06/14] feat: keep humble distro compatibility Signed-off-by: Amadeusz Szymko --- .../build-and-test-differential.yaml | 4 +++ .github/workflows/build-and-test.yaml | 4 +++ .github/workflows/check-build-depends.yaml | 4 +++ .../sync-tier4-universe-to-humble.yml | 27 +++++++++++++++++++ README.md | 13 +++++---- .../src/ground_plane_calibrator.cpp | 9 ++++++- .../src/lidar_to_lidar_2d_calibrator.cpp | 9 ++++++- .../src/camera_calibrator.cpp | 8 +++++- .../src/mapping_based_calibrator.cpp | 19 ++++++++----- .../src/marker_radar_lidar_calibrator.cpp | 17 ++++++++---- .../calibration_estimator.hpp | 8 +++++- .../tag_calibrator_visualizer.hpp | 9 ++++++- .../src/tag_based_pnp_calibrator.cpp | 15 ++++++++--- .../src/ceres/calibration_problem.cpp | 8 +++++- .../src/tag_based_sfm_calibrator.cpp | 9 ++++++- .../tier4_tag_utils/apriltag_hypothesis.hpp | 9 ++++++- .../tier4_tag_utils/src/apriltag_filter.cpp | 9 ++++++- docker/Dockerfile | 9 ++++--- 18 files changed, 158 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/sync-tier4-universe-to-humble.yml diff --git a/.github/workflows/build-and-test-differential.yaml b/.github/workflows/build-and-test-differential.yaml index ca07210a..e2a0eab3 100644 --- a/.github/workflows/build-and-test-differential.yaml +++ b/.github/workflows/build-and-test-differential.yaml @@ -12,10 +12,14 @@ jobs: matrix: rosdistro: - jazzy + - humble include: - rosdistro: jazzy container: ros:jazzy build-depends-repos: build_depends.repos + - rosdistro: humble + container: ros:humble + build-depends-repos: build_depends.repos steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 3cb8696c..83ba3b81 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -16,10 +16,14 @@ jobs: matrix: rosdistro: - jazzy + - humble include: - rosdistro: jazzy container: ros:jazzy build-depends-repos: build_depends.repos + - rosdistro: humble + container: ros:humble + build-depends-repos: build_depends.repos steps: - name: Check out repository uses: actions/checkout@v4 diff --git a/.github/workflows/check-build-depends.yaml b/.github/workflows/check-build-depends.yaml index 2d5e470d..528edb83 100644 --- a/.github/workflows/check-build-depends.yaml +++ b/.github/workflows/check-build-depends.yaml @@ -14,10 +14,14 @@ jobs: matrix: rosdistro: - jazzy + - humble include: - rosdistro: jazzy container: ros:jazzy build-depends-repos: build_depends.repos + - rosdistro: humble + container: ros:humble + build-depends-repos: build_depends.repos steps: - name: Check out repository uses: actions/checkout@v4 diff --git a/.github/workflows/sync-tier4-universe-to-humble.yml b/.github/workflows/sync-tier4-universe-to-humble.yml new file mode 100644 index 00000000..c8371533 --- /dev/null +++ b/.github/workflows/sync-tier4-universe-to-humble.yml @@ -0,0 +1,27 @@ +name: sync-tier4-universe-to-humble +on: + schedule: + - cron: 0 0 * * * + workflow_dispatch: + +jobs: + sync-branches: + runs-on: ubuntu-latest + steps: + - name: Generate token + id: generate-token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} + + - name: Run sync-branches + uses: autowarefoundation/autoware-github-actions/sync-branches@v1 + with: + token: ${{ steps.generate-token.outputs.token }} + base-branch: humble + sync-target-repository: git@github.com:tier4/CalibrationTools.git + sync-target-branch: tier4/universe + sync-branch: sync-tier4-universe-to-humble + pr-title: "chore: sync tier4/universe to humble" + auto-merge-method: merge diff --git a/README.md b/README.md index 80a80a49..20514887 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,8 @@ Calibration tools for sensors used in autonomous driving and robotics (camera, l ### Requirements -- Ubuntu 24.04 -- ROS2 Jazzy +- Ubuntu 22.04 / 24.04 +- ROS 2 Humble / Jazzy ### Installation alongside autoware @@ -74,10 +74,13 @@ With a similar motivation to that of the previous Section, in some cases, a nati ```bash # Build -DOCKER_BUILDKIT=1 docker build --ssh default -t ghcr.io/tier4/sensor-calibration-tools:2.0 -f docker/Dockerfile .. +export ROS_DISTRO=humble # for ROS 2 Humble +export ROS_DISTRO=jazzy # for ROS 2 Jazzy + +DOCKER_BUILDKIT=1 docker build --ssh default -t ghcr.io/tier4/sensor-calibration-tools:$ROS_DISTRO -f docker/Dockerfile --build-arg ROS_DISTRO=$ROS_DISTRO .. # Run - Modify if needed -docker run --gpus all --net=host -e ROS_DOMAIN_ID=$ROS_DOMAIN_ID -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --device=/dev/dri:/dev/dri -it ghcr.io/tier4/sensor-calibration-tools:2.0 /bin/bash +docker run --gpus all --net=host -e ROS_DOMAIN_ID=$ROS_DOMAIN_ID -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --device=/dev/dri:/dev/dri -it ghcr.io/tier4/sensor-calibration-tools:${ROS_DISTRO} /bin/bash # If user encounters issues like "Authorization required", use one of the alternatives below. # Solution 1 (Not recommended): @@ -96,7 +99,7 @@ docker run --gpus all --net=host \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -v /tmp/.docker.xauth:/tmp/.docker.xauth \ --device=/dev/dri:/dev/dri \ - -it ghcr.io/tier4/sensor-calibration-tools:2.0 /bin/bash + -it ghcr.io/tier4/sensor-calibration-tools:${ROS_DISTRO} /bin/bash ``` ## Available tools diff --git a/calibrators/ground_plane_calibrator/src/ground_plane_calibrator.cpp b/calibrators/ground_plane_calibrator/src/ground_plane_calibrator.cpp index 65b06e27..8990557b 100644 --- a/calibrators/ground_plane_calibrator/src/ground_plane_calibrator.cpp +++ b/calibrators/ground_plane_calibrator/src/ground_plane_calibrator.cpp @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -23,6 +24,12 @@ #include #include +#if RCLCPP_VERSION_MAJOR <= 16 +#define SERVICE_QOS rmw_qos_profile_services_default +#else +#define SERVICE_QOS rclcpp::ServicesQoS() +#endif + namespace ground_plane_calibrator { @@ -103,7 +110,7 @@ ExtrinsicGroundPlaneCalibrator::ExtrinsicGroundPlaneCalibrator(const rclcpp::Nod std::bind( &ExtrinsicGroundPlaneCalibrator::requestReceivedCallback, this, std::placeholders::_1, std::placeholders::_2), - rclcpp::ServicesQoS(), srv_callback_group_); + SERVICE_QOS, srv_callback_group_); // Initialize the filter kalman_filter_.setA(Eigen::DiagonalMatrix(1.0, 1.0, 1.0, 1.0, 1.0, 1.0)); diff --git a/calibrators/lidar_to_lidar_2d_calibrator/src/lidar_to_lidar_2d_calibrator.cpp b/calibrators/lidar_to_lidar_2d_calibrator/src/lidar_to_lidar_2d_calibrator.cpp index fc6605d6..7b30ba6d 100644 --- a/calibrators/lidar_to_lidar_2d_calibrator/src/lidar_to_lidar_2d_calibrator.cpp +++ b/calibrators/lidar_to_lidar_2d_calibrator/src/lidar_to_lidar_2d_calibrator.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -38,6 +39,12 @@ #include #include +#if RCLCPP_VERSION_MAJOR <= 16 +#define SERVICE_QOS rmw_qos_profile_services_default +#else +#define SERVICE_QOS rclcpp::ServicesQoS() +#endif + namespace lidar_to_lidar_2d_calibrator { @@ -115,7 +122,7 @@ LidarToLidar2DCalibrator::LidarToLidar2DCalibrator(const rclcpp::NodeOptions & o std::bind( &LidarToLidar2DCalibrator::requestReceivedCallback, this, std::placeholders::_1, std::placeholders::_2), - rclcpp::ServicesQoS(), srv_callback_group_); + SERVICE_QOS, srv_callback_group_); // Initialize the filter kalman_filter_.setA(Eigen::DiagonalMatrix(1.0, 1.0, 1.0)); diff --git a/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp b/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp index dd049a95..c10b0b86 100644 --- a/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp +++ b/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include #include @@ -26,12 +25,19 @@ #include #include #include +#include #include #include #include #include +#if RCLCPP_VERSION_MAJOR <= 16 +#include +#else +#include +#endif + CameraCalibrator::CameraCalibrator( const std::string & calibration_camera_optical_link_frame, CalibrationParameters::Ptr & parameters, MappingData::Ptr & mapping_data, diff --git a/calibrators/mapping_based_calibrator/src/mapping_based_calibrator.cpp b/calibrators/mapping_based_calibrator/src/mapping_based_calibrator.cpp index b9e819e2..e18e688e 100644 --- a/calibrators/mapping_based_calibrator/src/mapping_based_calibrator.cpp +++ b/calibrators/mapping_based_calibrator/src/mapping_based_calibrator.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -32,6 +33,12 @@ #include #include +#if RCLCPP_VERSION_MAJOR <= 16 +#define SERVICE_QOS rmw_qos_profile_services_default +#else +#define SERVICE_QOS rclcpp::ServicesQoS() +#endif + #define UPDATE_PARAM(PARAM_STRUCT, NAME) update_param(p, #NAME, PARAM_STRUCT.NAME##_) namespace @@ -272,9 +279,9 @@ ExtrinsicMappingBasedCalibrator::ExtrinsicMappingBasedCalibrator( this->create_publisher("keyframe_markers", 10); auto rosbag2_pause_client_ = this->create_client( - "/rosbag2_player/pause", rclcpp::ServicesQoS()); + "/rosbag2_player/pause", SERVICE_QOS); auto rosbag2_resume_client_ = this->create_client( - "/rosbag2_player/resume", rclcpp::ServicesQoS()); + "/rosbag2_player/resume", SERVICE_QOS); // Set up mapper mapper_ = std::make_shared( @@ -335,7 +342,7 @@ ExtrinsicMappingBasedCalibrator::ExtrinsicMappingBasedCalibrator( std::bind( &ExtrinsicMappingBasedCalibrator::requestReceivedCallback, this, std::placeholders::_1, std::placeholders::_2), - rclcpp::ServicesQoS(), srv_callback_group_); + SERVICE_QOS, srv_callback_group_); // Set up sensor callbacks assert( @@ -404,7 +411,7 @@ ExtrinsicMappingBasedCalibrator::ExtrinsicMappingBasedCalibrator( mapper_->stop(); RCLCPP_INFO_STREAM(this->get_logger(), "Mapper stopped through service"); }, - rclcpp::ServicesQoS()); + SERVICE_QOS); load_database_server_ = this->create_service( @@ -412,7 +419,7 @@ ExtrinsicMappingBasedCalibrator::ExtrinsicMappingBasedCalibrator( std::bind( &ExtrinsicMappingBasedCalibrator::loadDatabaseCallback, this, std::placeholders::_1, std::placeholders::_2), - rclcpp::ServicesQoS()); + SERVICE_QOS); save_database_server_ = this->create_service( @@ -420,7 +427,7 @@ ExtrinsicMappingBasedCalibrator::ExtrinsicMappingBasedCalibrator( std::bind( &ExtrinsicMappingBasedCalibrator::saveDatabaseCallback, this, std::placeholders::_1, std::placeholders::_2), - rclcpp::ServicesQoS()); + SERVICE_QOS); publisher_timer_ = rclcpp::create_timer( this, this->get_clock(), 5s, std::bind(&CalibrationMapper::publisherTimerCallback, mapper_)); diff --git a/calibrators/marker_radar_lidar_calibrator/src/marker_radar_lidar_calibrator.cpp b/calibrators/marker_radar_lidar_calibrator/src/marker_radar_lidar_calibrator.cpp index 648fd7df..9d1d3b63 100644 --- a/calibrators/marker_radar_lidar_calibrator/src/marker_radar_lidar_calibrator.cpp +++ b/calibrators/marker_radar_lidar_calibrator/src/marker_radar_lidar_calibrator.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -42,6 +43,12 @@ #include #include +#if RCLCPP_VERSION_MAJOR <= 16 +#define SERVICE_QOS rmw_qos_profile_services_default +#else +#define SERVICE_QOS rclcpp::ServicesQoS() +#endif + #define UPDATE_PARAM(PARAM_STRUCT, NAME) update_param(parameters, #NAME, PARAM_STRUCT.NAME) namespace @@ -269,14 +276,14 @@ ExtrinsicReflectorBasedCalibrator::ExtrinsicReflectorBasedCalibrator( std::bind( &ExtrinsicReflectorBasedCalibrator::requestReceivedCallback, this, std::placeholders::_1, std::placeholders::_2), - rclcpp::ServicesQoS(), calibration_api_srv_callback_group_); + SERVICE_QOS, calibration_api_srv_callback_group_); background_model_service_server_ = this->create_service( "extract_background_model", std::bind( &ExtrinsicReflectorBasedCalibrator::backgroundModelRequestCallback, this, std::placeholders::_1, std::placeholders::_2), - rclcpp::ServicesQoS(), calibration_ui_srv_callback_group_); + SERVICE_QOS, calibration_ui_srv_callback_group_); timer_ = rclcpp::create_timer( this, get_clock(), std::chrono::seconds(1), @@ -329,7 +336,7 @@ void ExtrinsicReflectorBasedCalibrator::timerCallback() std::bind( &ExtrinsicReflectorBasedCalibrator::trackingRequestCallback, this, std::placeholders::_1, std::placeholders::_2), - rclcpp::ServicesQoS(), calibration_ui_srv_callback_group_); + SERVICE_QOS, calibration_ui_srv_callback_group_); } if (calibration_valid_ && !send_calibration_service_server_) { @@ -338,7 +345,7 @@ void ExtrinsicReflectorBasedCalibrator::timerCallback() std::bind( &ExtrinsicReflectorBasedCalibrator::sendCalibrationCallback, this, std::placeholders::_1, std::placeholders::_2), - rclcpp::ServicesQoS(), calibration_ui_srv_callback_group_); + SERVICE_QOS, calibration_ui_srv_callback_group_); } if (converged_tracks_.size() > 0 && !delete_track_service_server_) { @@ -347,7 +354,7 @@ void ExtrinsicReflectorBasedCalibrator::timerCallback() std::bind( &ExtrinsicReflectorBasedCalibrator::deleteTrackRequestCallback, this, std::placeholders::_1, std::placeholders::_2), - rclcpp::ServicesQoS(), calibration_ui_srv_callback_group_); + SERVICE_QOS, calibration_ui_srv_callback_group_); } } diff --git a/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/calibration_estimator.hpp b/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/calibration_estimator.hpp index 226bfed2..d3859485 100644 --- a/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/calibration_estimator.hpp +++ b/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/calibration_estimator.hpp @@ -15,7 +15,6 @@ #ifndef TAG_BASED_PNP_CALIBRATOR__CALIBRATION_ESTIMATOR_HPP_ #define TAG_BASED_PNP_CALIBRATOR__CALIBRATION_ESTIMATOR_HPP_ -#include #include #include #include @@ -27,6 +26,7 @@ #include #include +#include #include #include @@ -34,6 +34,12 @@ #include #include +#if RCLCPP_VERSION_MAJOR <= 16 +#include +#else +#include +#endif + class CalibrationEstimator { public: diff --git a/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp b/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp index 81654ba9..674e64b5 100644 --- a/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp +++ b/calibrators/tag_based_pnp_calibrator/include/tag_based_pnp_calibrator/tag_calibrator_visualizer.hpp @@ -16,7 +16,6 @@ #define TAG_BASED_PNP_CALIBRATOR__TAG_CALIBRATOR_VISUALIZER_HPP_ #include -#include #include #include #include @@ -28,11 +27,19 @@ #include #include +#include + #include #include #include #include +#if RCLCPP_VERSION_MAJOR <= 16 +#include +#else +#include +#endif + class TagCalibratorVisualizer { public: diff --git a/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp b/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp index 9221e889..7de87828 100644 --- a/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp +++ b/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp @@ -13,8 +13,6 @@ // limitations under the License. #include // note: this header must come before -#include -#include #include #include #include @@ -25,12 +23,23 @@ #include #include +#include #include #include #include #include +#if RCLCPP_VERSION_MAJOR <= 16 +#include +#include +#define SERVICE_QOS rmw_qos_profile_services_default +#else +#include +#include +#define SERVICE_QOS rclcpp::ServicesQoS() +#endif + ExtrinsicTagBasedPNPCalibrator::ExtrinsicTagBasedPNPCalibrator(const rclcpp::NodeOptions & options) : Node("tag_based_pnp_calibrator_node", options), tf_broadcaster_(this), @@ -159,7 +168,7 @@ ExtrinsicTagBasedPNPCalibrator::ExtrinsicTagBasedPNPCalibrator(const rclcpp::Nod std::bind( &ExtrinsicTagBasedPNPCalibrator::requestReceivedCallback, this, std::placeholders::_1, std::placeholders::_2), - rclcpp::ServicesQoS(), srv_callback_group_); + SERVICE_QOS, srv_callback_group_); visualizer_ = std::make_unique(filtered_projections_markers_pub_); diff --git a/calibrators/tag_based_sfm_calibrator/src/ceres/calibration_problem.cpp b/calibrators/tag_based_sfm_calibrator/src/ceres/calibration_problem.cpp index 15b36148..3c7f80ce 100644 --- a/calibrators/tag_based_sfm_calibrator/src/ceres/calibration_problem.cpp +++ b/calibrators/tag_based_sfm_calibrator/src/ceres/calibration_problem.cpp @@ -13,7 +13,6 @@ // limitations under the License. #include -#include #include #include #include @@ -30,6 +29,7 @@ #include #include +#include #include #include @@ -40,6 +40,12 @@ #include #include +#if RCLCPP_VERSION_MAJOR <= 16 +#include +#else +#include +#endif + namespace tag_based_sfm_calibrator { diff --git a/calibrators/tag_based_sfm_calibrator/src/tag_based_sfm_calibrator.cpp b/calibrators/tag_based_sfm_calibrator/src/tag_based_sfm_calibrator.cpp index e225079a..60b9ce93 100644 --- a/calibrators/tag_based_sfm_calibrator/src/tag_based_sfm_calibrator.cpp +++ b/calibrators/tag_based_sfm_calibrator/src/tag_based_sfm_calibrator.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -49,6 +50,12 @@ #include #include +#if RCLCPP_VERSION_MAJOR <= 16 +#define SERVICE_QOS rmw_qos_profile_services_default +#else +#define SERVICE_QOS rclcpp::ServicesQoS() +#endif + namespace tag_based_sfm_calibrator { @@ -304,7 +311,7 @@ ExtrinsicTagBasedBaseCalibrator::ExtrinsicTagBasedBaseCalibrator( std::bind( &ExtrinsicTagBasedBaseCalibrator::calibrationRequestCallback, this, std::placeholders::_1, std::placeholders::_2), - rclcpp::ServicesQoS(), calibration_api_srv_group_); + SERVICE_QOS, calibration_api_srv_group_); // Scene related services add_external_camera_images_srv_ = diff --git a/common/tier4_tag_utils/include/tier4_tag_utils/apriltag_hypothesis.hpp b/common/tier4_tag_utils/include/tier4_tag_utils/apriltag_hypothesis.hpp index 9c69f5b3..dec0f411 100644 --- a/common/tier4_tag_utils/include/tier4_tag_utils/apriltag_hypothesis.hpp +++ b/common/tier4_tag_utils/include/tier4_tag_utils/apriltag_hypothesis.hpp @@ -15,14 +15,21 @@ #ifndef TIER4_TAG_UTILS__APRILTAG_HYPOTHESIS_HPP_ #define TIER4_TAG_UTILS__APRILTAG_HYPOTHESIS_HPP_ -#include #include #include #include #include +#include + #include +#if RCLCPP_VERSION_MAJOR <= 16 +#include +#else +#include +#endif + namespace tier4_tag_utils { diff --git a/common/tier4_tag_utils/src/apriltag_filter.cpp b/common/tier4_tag_utils/src/apriltag_filter.cpp index 0439991b..8929a58f 100644 --- a/common/tier4_tag_utils/src/apriltag_filter.cpp +++ b/common/tier4_tag_utils/src/apriltag_filter.cpp @@ -13,7 +13,6 @@ // limitations under the License. #include -#include #include #include #include @@ -22,10 +21,18 @@ #include +#include + #include #include #include +#if RCLCPP_VERSION_MAJOR <= 16 +#include +#else +#include +#endif + namespace tier4_tag_utils { diff --git a/docker/Dockerfile b/docker/Dockerfile index 69c1467c..f2876fb9 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ - -FROM osrf/ros:jazzy-desktop-noble +ARG ROS_DISTRO=jazzy +FROM osrf/ros:${ROS_DISTRO}-desktop SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -9,19 +9,20 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ python3-pip \ wget -RUN echo "source /opt/ros/jazzy/setup.bash" >> /etc/bash.bashrc +RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc WORKDIR /workspace RUN mkdir -p /workspace/src +# TODO: restore upstream RUN wget https://raw.githubusercontent.com/amadeuszsz/CalibrationTools/feat/jazzy-support/calibration_tools_standalone.repos --directory-prefix=/workspace RUN vcs import src < calibration_tools_standalone.repos RUN rosdep install -y --from-paths `colcon list --packages-up-to sensor_calibration_tools -p` --ignore-src -RUN source /opt/ros/jazzy/setup.bash && colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to sensor_calibration_tools +RUN source /opt/ros/${ROS_DISTRO}/setup.bash && colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to sensor_calibration_tools RUN rm -rf /var/lib/apt/lists/* From dac4bbff52f2352c1ddc8f652ffc171443c4b5d3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 9 Jan 2026 06:18:13 +0000 Subject: [PATCH 07/14] ci(pre-commit): autofix --- .../src/mapping_based_calibrator.cpp | 8 ++++---- .../src/tag_based_pnp_calibrator.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/calibrators/mapping_based_calibrator/src/mapping_based_calibrator.cpp b/calibrators/mapping_based_calibrator/src/mapping_based_calibrator.cpp index e18e688e..436e0d00 100644 --- a/calibrators/mapping_based_calibrator/src/mapping_based_calibrator.cpp +++ b/calibrators/mapping_based_calibrator/src/mapping_based_calibrator.cpp @@ -278,10 +278,10 @@ ExtrinsicMappingBasedCalibrator::ExtrinsicMappingBasedCalibrator( auto keyframe_markers_pub = this->create_publisher("keyframe_markers", 10); - auto rosbag2_pause_client_ = this->create_client( - "/rosbag2_player/pause", SERVICE_QOS); - auto rosbag2_resume_client_ = this->create_client( - "/rosbag2_player/resume", SERVICE_QOS); + auto rosbag2_pause_client_ = + this->create_client("/rosbag2_player/pause", SERVICE_QOS); + auto rosbag2_resume_client_ = + this->create_client("/rosbag2_player/resume", SERVICE_QOS); // Set up mapper mapper_ = std::make_shared( diff --git a/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp b/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp index 7de87828..0f9b3bf7 100644 --- a/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp +++ b/calibrators/tag_based_pnp_calibrator/src/tag_based_pnp_calibrator.cpp @@ -22,8 +22,8 @@ #include -#include #include +#include #include #include From 4ae07d7c763cb7b76f30597a9456c23cd9650567 Mon Sep 17 00:00:00 2001 From: Amadeusz Szymko Date: Fri, 9 Jan 2026 15:21:56 +0900 Subject: [PATCH 08/14] feat: remove outdated sync Signed-off-by: Amadeusz Szymko --- .github/sync-files.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/sync-files.yaml b/.github/sync-files.yaml index 23fac8d2..95fc6933 100644 --- a/.github/sync-files.yaml +++ b/.github/sync-files.yaml @@ -14,11 +14,3 @@ - source: .yamllint.yaml - source: CPPLINT.cfg - source: setup.cfg - -- repository: autowarefoundation/autoware_common - files: - - source: .github/workflows/build-and-test.yaml - - source: .github/workflows/build-and-test-differential.yaml - - source: .github/workflows/check-build-depends.yaml - - source: .github/workflows/clang-tidy-pr-comments.yaml - - source: .github/workflows/sync-files.yaml From ee60c985666c29f79c87e6bd48dcff6ab9cc09e9 Mon Sep 17 00:00:00 2001 From: Amadeusz Szymko Date: Tue, 13 Jan 2026 10:02:29 +0900 Subject: [PATCH 09/14] feat(calibrators): adjust deprecated matplotlib API Signed-off-by: Amadeusz Szymko --- .../intrinsic_camera_calibrator/calibrators/utils.py | 6 +++--- .../scripts/metrics_plotter_node.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/calibrators/intrinsic_camera_calibrator/intrinsic_camera_calibrator/intrinsic_camera_calibrator/calibrators/utils.py b/calibrators/intrinsic_camera_calibrator/intrinsic_camera_calibrator/intrinsic_camera_calibrator/calibrators/utils.py index b615c9da..2f654e1a 100644 --- a/calibrators/intrinsic_camera_calibrator/intrinsic_camera_calibrator/intrinsic_camera_calibrator/calibrators/utils.py +++ b/calibrators/intrinsic_camera_calibrator/intrinsic_camera_calibrator/intrinsic_camera_calibrator/calibrators/utils.py @@ -102,7 +102,7 @@ def plot_calibration_data_statistics( tilt_cells: int = int(2 * np.ceil(max_tilt_deg / tilt_resolution)) fig, axes = plt.subplots(3, 5, figsize=(20, 12)) - fig.canvas.set_window_title("Calibration data statistics") + fig.canvas.manager.set_window_title("Calibration data statistics") def process_detections(detections: List[BoardDetection]): pixel_occupancy = np.zeros((pixel_cells, pixel_cells)) @@ -200,8 +200,8 @@ def plot_calibration_results_statistics( fig1, axes1 = plt.subplots(3, 4, figsize=(20, 12)) fig2, axes2 = plt.subplots(3, 1, figsize=(20, 12)) - fig1.canvas.set_window_title("Calibration result statistics") - fig2.canvas.set_window_title("Calibration result statistics vs single shot calibration") + fig1.canvas.manager.set_window_title("Calibration result statistics") + fig2.canvas.manager.set_window_title("Calibration result statistics vs single shot calibration") def process_detections(detections: List[BoardDetection]): pixel_errors = [[[] for i in range(pixel_cells)] for j in range(pixel_cells)] diff --git a/calibrators/marker_radar_lidar_calibrator/scripts/metrics_plotter_node.py b/calibrators/marker_radar_lidar_calibrator/scripts/metrics_plotter_node.py index eeeb92fb..10330095 100755 --- a/calibrators/marker_radar_lidar_calibrator/scripts/metrics_plotter_node.py +++ b/calibrators/marker_radar_lidar_calibrator/scripts/metrics_plotter_node.py @@ -30,7 +30,7 @@ def __init__(self): self.subplot1 = self.axes[0, 1] self.subplot2 = self.axes[1, 0] self.subplot3 = self.axes[1, 1] - plt.gcf().canvas.set_window_title("Metrics plotter") + plt.gcf().canvas.manager.set_window_title("Metrics plotter") self.color_distance_o = "C0o-" self.color_yaw_o = "C1o-" From c337c60309b684f138436941ddfa7c281810de9d Mon Sep 17 00:00:00 2001 From: Amadeusz Szymko Date: Tue, 13 Jan 2026 10:34:42 +0900 Subject: [PATCH 10/14] chore: update & restore workflows Signed-off-by: Amadeusz Szymko --- .clang-format | 10 ++- .github/dependabot.yaml | 11 ++- .github/sync-files.yaml | 20 +++++- .../build-and-test-differential.yaml | 45 +++++++++--- .github/workflows/build-and-test.yaml | 26 +++++-- .../workflows/cancel-previous-workflows.yaml | 20 ++++++ .github/workflows/check-build-depends.yaml | 16 +++-- .../clang-tidy-pr-comments-manually.yaml | 71 +++++++++++++++++++ .github/workflows/clang-tidy-pr-comments.yaml | 33 +++++++-- .../workflows/spell-check-differential.yaml | 15 +++- .github/workflows/sync-files.yaml | 23 +++--- .markdown-link-check.json | 5 +- .markdownlint.yaml | 8 +++ .pre-commit-config-optional.yaml | 14 +++- .pre-commit-config.yaml | 57 +++++++++++---- .prettierignore | 6 +- .prettierrc.yaml | 6 +- .yamllint.yaml | 7 +- CPPLINT.cfg | 8 ++- setup.cfg | 6 +- 20 files changed, 340 insertions(+), 67 deletions(-) create mode 100644 .github/workflows/cancel-previous-workflows.yaml create mode 100644 .github/workflows/clang-tidy-pr-comments-manually.yaml diff --git a/.clang-format b/.clang-format index 7762ec9d..bbf9715d 100644 --- a/.clang-format +++ b/.clang-format @@ -1,9 +1,14 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + # Modified from https://github.com/ament/ament_lint/blob/master/ament_clang_format/ament_clang_format/configuration/.clang-format Language: Cpp BasedOnStyle: Google AccessModifierOffset: -2 AlignAfterOpenBracket: AlwaysBreak +AllowShortFunctionsOnASingleLine: InlineOnly BraceWrapping: AfterClass: true AfterFunction: true @@ -33,6 +38,9 @@ IncludeCategories: - Regex: .*_msgs/.* Priority: 3 CaseSensitive: true + - Regex: .*_srvs/.* + Priority: 3 + CaseSensitive: true # Other Package headers - Regex: <.*> Priority: 2 @@ -40,4 +48,4 @@ IncludeCategories: # Local package headers - Regex: '".*"' Priority: 1 - CaseSensitive: true + CaseSensitive: true \ No newline at end of file diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 3f3bf243..4b1533c1 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -1,10 +1,15 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + version: 2 updates: - package-ecosystem: github-actions directory: / + # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduleinterval schedule: - interval: daily + interval: monthly open-pull-requests-limit: 1 labels: - - bot - - github-actions + - tag:bot + - type:github-actions \ No newline at end of file diff --git a/.github/sync-files.yaml b/.github/sync-files.yaml index 95fc6933..92246ba6 100644 --- a/.github/sync-files.yaml +++ b/.github/sync-files.yaml @@ -1,16 +1,32 @@ -- repository: autowarefoundation/autoware +- repository: autowarefoundation/sync-file-templates files: - source: .github/dependabot.yaml + - source: .github/workflows/build-and-test.yaml + - source: .github/workflows/build-and-test-differential.yaml + - source: .github/workflows/cancel-previous-workflows.yaml + - source: .github/workflows/check-build-depends.yaml + - source: .github/workflows/clang-tidy-pr-comments.yaml + - source: .github/workflows/clang-tidy-pr-comments-manually.yaml - source: .github/workflows/pre-commit.yaml - source: .github/workflows/pre-commit-optional.yaml - source: .github/workflows/semantic-pull-request.yaml - source: .github/workflows/spell-check-differential.yaml + pre-commands: | + sd " with:\n" " with:\n local-cspell-json: .cspell.json\n" {source} + - source: .github/workflows/spell-check-daily.yaml + pre-commands: | + sd " with:\n" " with:\n local-cspell-json: .cspell.json\n" {source} + - source: .github/workflows/sync-files.yaml - source: .clang-format - source: .markdown-link-check.json - source: .markdownlint.yaml - source: .pre-commit-config-optional.yaml + - source: .pre-commit-config.yaml - source: .prettierignore - source: .prettierrc.yaml - source: .yamllint.yaml + - source: CODE_OF_CONDUCT.md + - source: CONTRIBUTING.md - source: CPPLINT.cfg - - source: setup.cfg + - source: LICENSE + - source: setup.cfg \ No newline at end of file diff --git a/.github/workflows/build-and-test-differential.yaml b/.github/workflows/build-and-test-differential.yaml index e2a0eab3..5fd6415f 100644 --- a/.github/workflows/build-and-test-differential.yaml +++ b/.github/workflows/build-and-test-differential.yaml @@ -1,33 +1,57 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: build-and-test-differential on: pull_request: + types: + - opened + - synchronize + - reopened + - labeled + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true jobs: + require-label: + uses: autowarefoundation/autoware-github-actions/.github/workflows/require-label.yaml@v1 + with: + label: run:build-and-test-differential + build-and-test-differential: - runs-on: ubuntu-latest + needs: require-label + if: ${{ needs.require-label.outputs.result == 'true' }} + runs-on: ubuntu-22.04 container: ${{ matrix.container }} strategy: fail-fast: false matrix: rosdistro: - - jazzy - humble + - jazzy include: - - rosdistro: jazzy - container: ros:jazzy - build-depends-repos: build_depends.repos - rosdistro: humble container: ros:humble build-depends-repos: build_depends.repos + - rosdistro: jazzy + container: ros:jazzy + build-depends-repos: build_depends.repos steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.12.1 + - name: Set PR fetch depth + run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}" - - name: Check out repository + - name: Checkout PR branch and all PR commits uses: actions/checkout@v4 with: - fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: ${{ env.PR_FETCH_DEPTH }} + + - name: Show disk space before the tasks + run: df -h - name: Remove exec_depend uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 @@ -61,3 +85,6 @@ jobs: fail_ci_if_error: false verbose: true flags: differential + + - name: Show disk space after the tasks + run: df -h \ No newline at end of file diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 83ba3b81..d333f1ea 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: build-and-test on: @@ -6,27 +10,36 @@ on: - cron: 0 0 * * * workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + jobs: build-and-test: if: ${{ github.event_name != 'push' || github.ref_name == github.event.repository.default_branch }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 container: ${{ matrix.container }} strategy: fail-fast: false matrix: rosdistro: - - jazzy - humble + - jazzy include: - - rosdistro: jazzy - container: ros:jazzy - build-depends-repos: build_depends.repos - rosdistro: humble container: ros:humble build-depends-repos: build_depends.repos + - rosdistro: jazzy + container: ros:jazzy + build-depends-repos: build_depends.repos steps: - name: Check out repository uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Show disk space before the tasks + run: df -h - name: Remove exec_depend uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 @@ -60,3 +73,6 @@ jobs: fail_ci_if_error: false verbose: true flags: total + + - name: Show disk space after the tasks + run: df -h \ No newline at end of file diff --git a/.github/workflows/cancel-previous-workflows.yaml b/.github/workflows/cancel-previous-workflows.yaml new file mode 100644 index 00000000..b7d02959 --- /dev/null +++ b/.github/workflows/cancel-previous-workflows.yaml @@ -0,0 +1,20 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + +# Deprecated: Use concurrency in each workflow instead. + +name: cancel-previous-workflows + +on: + pull_request_target: + +jobs: + cancel-previous-workflows: + runs-on: ubuntu-22.04 + steps: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + workflow_id: all + all_but_latest: true \ No newline at end of file diff --git a/.github/workflows/check-build-depends.yaml b/.github/workflows/check-build-depends.yaml index 528edb83..0563d9c3 100644 --- a/.github/workflows/check-build-depends.yaml +++ b/.github/workflows/check-build-depends.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: check-build-depends on: @@ -5,20 +9,20 @@ on: paths: - build_depends*.repos +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + jobs: check-build-depends: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 container: ${{ matrix.container }} strategy: fail-fast: false matrix: rosdistro: - - jazzy - humble include: - - rosdistro: jazzy - container: ros:jazzy - build-depends-repos: build_depends.repos - rosdistro: humble container: ros:humble build-depends-repos: build_depends.repos @@ -38,4 +42,4 @@ jobs: with: rosdistro: ${{ matrix.rosdistro }} target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - build-depends-repos: ${{ matrix.build-depends-repos }} + build-depends-repos: ${{ matrix.build-depends-repos }} \ No newline at end of file diff --git a/.github/workflows/clang-tidy-pr-comments-manually.yaml b/.github/workflows/clang-tidy-pr-comments-manually.yaml new file mode 100644 index 00000000..4d7a4070 --- /dev/null +++ b/.github/workflows/clang-tidy-pr-comments-manually.yaml @@ -0,0 +1,71 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + +name: clang-tidy-pr-comments-manually + +on: + workflow_dispatch: + inputs: + workflow_run_id_or_url: + description: The target workflow run ID or URL of the build-and-test-differential workflow + required: true + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + clang-tidy-pr-comments-manually: + runs-on: ubuntu-22.04 + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Download analysis results + run: | + workflow_run_id=$(echo "${{ inputs.workflow_run_id_or_url }}" | sed -e "s|.*runs/||" -e "s|/jobs.*||") + gh run download "$workflow_run_id" -D /tmp || true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Check if the fixes.yaml file exists + id: check-fixes-yaml-existence + uses: autowarefoundation/autoware-github-actions/check-file-existence@v1 + with: + files: /tmp/clang-tidy-result/fixes.yaml + + - name: Set variables + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + id: set-variables + run: | + echo "pr-id=$(cat /tmp/clang-tidy-result/pr-id.txt)" >> $GITHUB_OUTPUT + echo "pr-head-repo=$(cat /tmp/clang-tidy-result/pr-head-repo.txt)" >> $GITHUB_OUTPUT + echo "pr-head-ref=$(cat /tmp/clang-tidy-result/pr-head-ref.txt)" >> $GITHUB_OUTPUT + + - name: Check out PR head + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + uses: actions/checkout@v4 + with: + repository: ${{ steps.set-variables.outputs.pr-head-repo }} + ref: ${{ steps.set-variables.outputs.pr-head-ref }} + persist-credentials: false + + - name: Replace paths in fixes.yaml + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + run: | + sed -i -e "s|/__w/|/home/runner/work/|g" /tmp/clang-tidy-result/fixes.yaml + cat /tmp/clang-tidy-result/fixes.yaml + + - name: Copy fixes.yaml to access from Docker Container Action + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + run: | + cp /tmp/clang-tidy-result/fixes.yaml fixes.yaml + + - name: Run clang-tidy-pr-comments action + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + uses: platisd/clang-tidy-pr-comments@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + clang_tidy_fixes: fixes.yaml + pull_request_id: ${{ steps.set-variables.outputs.pr-id }} \ No newline at end of file diff --git a/.github/workflows/clang-tidy-pr-comments.yaml b/.github/workflows/clang-tidy-pr-comments.yaml index 9d4210a2..7b4f6343 100644 --- a/.github/workflows/clang-tidy-pr-comments.yaml +++ b/.github/workflows/clang-tidy-pr-comments.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: clang-tidy-pr-comments on: @@ -7,28 +11,40 @@ on: types: - completed +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + jobs: clang-tidy-pr-comments: - if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.event == 'pull_request' && contains(fromJson('["success", "failure"]'), github.event.workflow_run.conclusion) }} + runs-on: ubuntu-22.04 steps: - name: Check out repository uses: actions/checkout@v4 - name: Download analysis results run: | - gh run download ${{ github.event.workflow_run.id }} -D /tmp + gh run download ${{ github.event.workflow_run.id }} -D /tmp || true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Check if the fixes.yaml file exists + id: check-fixes-yaml-existence + uses: autowarefoundation/autoware-github-actions/check-file-existence@v1 + with: + files: /tmp/clang-tidy-result/fixes.yaml + - name: Set variables + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} id: set-variables run: | - echo ::set-output name=pr-id::"$(cat /tmp/clang-tidy-result/pr-id.txt)" - echo ::set-output name=pr-head-repo::"$(cat /tmp/clang-tidy-result/pr-head-repo.txt)" - echo ::set-output name=pr-head-ref::"$(cat /tmp/clang-tidy-result/pr-head-ref.txt)" + echo "pr-id=$(cat /tmp/clang-tidy-result/pr-id.txt)" >> $GITHUB_OUTPUT + echo "pr-head-repo=$(cat /tmp/clang-tidy-result/pr-head-repo.txt)" >> $GITHUB_OUTPUT + echo "pr-head-ref=$(cat /tmp/clang-tidy-result/pr-head-ref.txt)" >> $GITHUB_OUTPUT - name: Check out PR head + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} uses: actions/checkout@v4 with: repository: ${{ steps.set-variables.outputs.pr-head-repo }} @@ -36,17 +52,20 @@ jobs: persist-credentials: false - name: Replace paths in fixes.yaml + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} run: | sed -i -e "s|/__w/|/home/runner/work/|g" /tmp/clang-tidy-result/fixes.yaml cat /tmp/clang-tidy-result/fixes.yaml - name: Copy fixes.yaml to access from Docker Container Action + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} run: | cp /tmp/clang-tidy-result/fixes.yaml fixes.yaml - name: Run clang-tidy-pr-comments action + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} uses: platisd/clang-tidy-pr-comments@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} clang_tidy_fixes: fixes.yaml - pull_request_id: ${{ steps.set-variables.outputs.pr-id }} + pull_request_id: ${{ steps.set-variables.outputs.pr-id }} \ No newline at end of file diff --git a/.github/workflows/spell-check-differential.yaml b/.github/workflows/spell-check-differential.yaml index 1fbf2ff4..4440f042 100644 --- a/.github/workflows/spell-check-differential.yaml +++ b/.github/workflows/spell-check-differential.yaml @@ -1,11 +1,19 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: spell-check-differential on: pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + jobs: spell-check-differential: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Check out repository uses: actions/checkout@v4 @@ -13,4 +21,7 @@ jobs: - name: Run spell-check uses: autowarefoundation/autoware-github-actions/spell-check@v1 with: - cspell-json-url: https://raw.githubusercontent.com/tier4/autoware-spell-check-dict/main/.cspell.json + cspell-json-url: https://raw.githubusercontent.com/autowarefoundation/autoware-spell-check-dict/main/.cspell.json + dict-packages: | + https://github.com/autowarefoundation/autoware-spell-check-dict + https://github.com/tier4/cspell-dicts \ No newline at end of file diff --git a/.github/workflows/sync-files.yaml b/.github/workflows/sync-files.yaml index c15244a3..62555eff 100644 --- a/.github/workflows/sync-files.yaml +++ b/.github/workflows/sync-files.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: sync-files on: @@ -5,16 +9,13 @@ on: - cron: 0 0 * * * workflow_dispatch: -jobs: - check-secret: - uses: autowarefoundation/autoware-github-actions/.github/workflows/check-secret.yaml@v1 - secrets: - secret: ${{ secrets.APP_ID }} +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true +jobs: sync-files: - needs: check-secret - if: ${{ needs.check-secret.outputs.set == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Generate token id: generate-token @@ -28,6 +29,6 @@ jobs: with: token: ${{ steps.generate-token.outputs.token }} pr-labels: | - bot - sync-files - auto-merge-method: squash + tag:bot + tag:sync-files + auto-merge-method: squash \ No newline at end of file diff --git a/.markdown-link-check.json b/.markdown-link-check.json index dec3db1a..92766c1d 100644 --- a/.markdown-link-check.json +++ b/.markdown-link-check.json @@ -4,10 +4,13 @@ { "pattern": "^http://localhost" }, + { + "pattern": "^http://127\\.0\\.0\\.1" + }, { "pattern": "^https://github.com/.*/discussions/new" } ], "retryOn429": true, "retryCount": 10 -} +} \ No newline at end of file diff --git a/.markdownlint.yaml b/.markdownlint.yaml index df1f518d..2e658608 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,9 +1,17 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + # See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for all rules. default: true MD013: false MD024: siblings_only: true +MD029: + style: ordered MD033: false MD041: false +MD045: false MD046: false MD049: false +MD059: false \ No newline at end of file diff --git a/.pre-commit-config-optional.yaml b/.pre-commit-config-optional.yaml index a805f120..38f0ece6 100644 --- a/.pre-commit-config-optional.yaml +++ b/.pre-commit-config-optional.yaml @@ -1,6 +1,16 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + +# https://pre-commit.ci/#configuration +ci: + autofix_commit_msg: "style(pre-commit-optional): autofix" + autoupdate_schedule: quarterly + autoupdate_commit_msg: "ci(pre-commit-optional): quarterly autoupdate" + repos: - repo: https://github.com/tcort/markdown-link-check - rev: v3.10.0 + rev: v3.14.2 hooks: - id: markdown-link-check - args: [--config=.markdown-link-check.json] + args: [--quiet, --config=.markdown-link-check.json] \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 31f5c3cb..ac8051c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,16 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + +# https://pre-commit.ci/#configuration ci: - autofix_commit_msg: "ci(pre-commit): autofix" - autoupdate_commit_msg: "ci(pre-commit): autoupdate" + autofix_commit_msg: "style(pre-commit): autofix" + autoupdate_schedule: quarterly + autoupdate_commit_msg: "ci(pre-commit): quarterly autoupdate" repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-json - id: check-merge-conflict @@ -19,7 +25,7 @@ repos: args: [--markdown-linebreak-ext=md] - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.44.0 + rev: v0.47.0 hooks: - id: markdownlint args: [-c, .markdownlint.yaml, --fix] @@ -28,12 +34,18 @@ repos: rev: v4.0.0-alpha.8 hooks: - id: prettier + args: [--no-error-on-unmatched-pattern] - repo: https://github.com/adrienverge/yamllint - rev: v1.37.0 + rev: v1.37.1 hooks: - id: yamllint + - repo: https://github.com/autowarefoundation/autoware-guideline-check + rev: 0.2.0 + hooks: + - id: check-package-depends + - repo: https://github.com/tier4/pre-commit-hooks-ros rev: v0.10.0 hooks: @@ -45,29 +57,30 @@ repos: - id: sort-package-xml - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.10.0.1 + rev: v0.11.0.1 hooks: - id: shellcheck - repo: https://github.com/scop/pre-commit-shfmt - rev: v3.11.0-1 + rev: v3.12.0-2 hooks: - id: shfmt args: [-w, -s, -i=4] - repo: https://github.com/pycqa/isort - rev: 6.0.1 + rev: 7.0.0 hooks: - id: isort + args: [--profile=black, --line-length=100] - - repo: https://github.com/psf/black - rev: 25.1.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 25.12.0 hooks: - id: black args: [--line-length=100] - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v20.1.0 + rev: v21.1.8 hooks: - id: clang-format types_or: [c++, c, cuda] @@ -79,4 +92,24 @@ repos: args: [--quiet] exclude: .cu -exclude: .svg + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.36.0 + hooks: + - id: check-metaschema + files: ^.+/schema/.*schema\.json$ + + - repo: local + hooks: + - id: prettier-svg + name: prettier svg + description: Apply Prettier with plugin-xml to svg. + entry: prettier --write --list-different --ignore-unknown --print-width 200 --xml-self-closing-space false --xml-whitespace-sensitivity ignore + language: node + files: .svg$ + additional_dependencies: [prettier@2.7.1, "@prettier/plugin-xml@2.2.0"] + + - repo: https://github.com/AleksaC/hadolint-py + rev: v2.14.0 + hooks: + - id: hadolint + exclude: .svg$ \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index a3c34d00..3f855740 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,6 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + *.param.yaml -*.rviz +*.rviz \ No newline at end of file diff --git a/.prettierrc.yaml b/.prettierrc.yaml index e29bf327..f26e895b 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + printWidth: 100 tabWidth: 2 overrides: @@ -17,4 +21,4 @@ overrides: options: printWidth: 200 xmlSelfClosingSpace: false - xmlWhitespaceSensitivity: ignore + xmlWhitespaceSensitivity: ignore \ No newline at end of file diff --git a/.yamllint.yaml b/.yamllint.yaml index 6228c70f..f635c55e 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -1,7 +1,10 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + extends: default ignore: | - .clang-tidy *.param.yaml rules: @@ -20,4 +23,4 @@ rules: check-keys: false # To allow 'on' of GitHub Actions quoted-strings: level: error - required: only-when-needed # To keep consistent style + required: only-when-needed # To keep consistent style \ No newline at end of file diff --git a/CPPLINT.cfg b/CPPLINT.cfg index ba6bdf08..928cdd9a 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -1,14 +1,20 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + # Modified from https://github.com/ament/ament_lint/blob/ebd524bb9973d5ec1dc48a670ce54f958a5a0243/ament_cpplint/ament_cpplint/main.py#L64-L120 set noparent linelength=100 includeorder=standardcfirst filter=-build/c++11 # we do allow C++11 +filter=-build/c++17 # we allow filter=-build/namespaces_literals # we allow using namespace for literals filter=-runtime/references # we consider passing non-const references to be ok filter=-whitespace/braces # we wrap open curly braces for namespaces, classes and functions filter=-whitespace/indent # we don't indent keywords like public, protected and private with one space +filter=-whitespace/newline # we allow the developer to decide about newline at the end of file (it's clashing with clang-format) filter=-whitespace/parens # we allow closing parenthesis to be on the next line filter=-whitespace/semicolon # we allow the developer to decide about whitespace after a semicolon filter=-build/header_guard # we automatically fix the names of header guards using pre-commit filter=-build/include_order # we use the custom include order -filter=-build/include_subdir # we allow the style of "foo.hpp" +filter=-build/include_subdir # we allow the style of "foo.hpp" \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 5214751c..4a2bdddb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + [flake8] # Modified from https://github.com/ament/ament_lint/blob/ebd524bb9973d5ec1dc48a670ce54f958a5a0243/ament_flake8/ament_flake8/configuration/ament_flake8.ini extend-ignore = B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202,CNL100,E203,E501,Q000 @@ -12,4 +16,4 @@ line_length=100 force_sort_within_sections=true force_single_line=true reverse_relative=true -known_third_party=launch +known_third_party=launch \ No newline at end of file From 172799374c5739b18ae4a90b9d121587e659858a Mon Sep 17 00:00:00 2001 From: Amadeusz Szymko Date: Tue, 13 Jan 2026 11:36:03 +0900 Subject: [PATCH 11/14] style: apply pre-commit Signed-off-by: Amadeusz Szymko --- .clang-format | 2 +- .github/dependabot.yaml | 2 +- .github/sync-files.yaml | 2 +- .../build-and-test-differential.yaml | 2 +- .github/workflows/build-and-test.yaml | 2 +- .../workflows/cancel-previous-workflows.yaml | 2 +- .github/workflows/check-build-depends.yaml | 2 +- .../clang-tidy-pr-comments-manually.yaml | 2 +- .github/workflows/clang-tidy-pr-comments.yaml | 2 +- .../workflows/spell-check-differential.yaml | 2 +- .github/workflows/sync-files.yaml | 2 +- .gitignore | 3 + .markdown-link-check.json | 2 +- .markdownlint.yaml | 2 +- .pre-commit-config-optional.yaml | 2 +- .pre-commit-config.yaml | 2 +- .prettierignore | 2 +- .prettierrc.yaml | 2 +- .yamllint.yaml | 2 +- CPPLINT.cfg | 2 +- .../src/ceres_camera_intrinsics_optimizer.cpp | 5 +- .../ceres_intrinsic_camera_calibrator_py.cpp | 5 +- .../mapping_based_calibrator.hpp | 2 +- .../src/camera_calibrator.cpp | 4 +- .../src/filters/best_frames_filter.cpp | 5 +- .../src/filters/dynamics_filter.cpp | 5 +- .../src/filters/lost_state_filter.cpp | 5 +- .../marker_radar_lidar_calibrator.hpp | 2 +- .../src/calibration_estimator.cpp | 25 +- .../tag_based_sfm_calibrator/package.xml | 1 + .../src/apriltag_detection.cpp | 5 +- .../src/ceres/calibration_problem.cpp | 5 +- .../src/apriltag_hypothesis.cpp | 24 +- .../src/lidartag_hypothesis.cpp | 30 +- docker/Dockerfile | 14 +- .../mapping_based_vis.svg | 406 +++++++++++++++- .../background_construction.svg | 357 +++++++++++++- .../foreground_extraction.svg | 438 +++++++++++++++++- .../marker_radar_lidar_vis.svg | 171 ++++++- .../tag_based_sfm_calibrator/bev_setup.svg | 372 ++++++++++++++- setup.cfg | 2 +- 41 files changed, 1865 insertions(+), 59 deletions(-) diff --git a/.clang-format b/.clang-format index bbf9715d..cd54eb45 100644 --- a/.clang-format +++ b/.clang-format @@ -48,4 +48,4 @@ IncludeCategories: # Local package headers - Regex: '".*"' Priority: 1 - CaseSensitive: true \ No newline at end of file + CaseSensitive: true diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 4b1533c1..8e2d7193 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -12,4 +12,4 @@ updates: open-pull-requests-limit: 1 labels: - tag:bot - - type:github-actions \ No newline at end of file + - type:github-actions diff --git a/.github/sync-files.yaml b/.github/sync-files.yaml index 92246ba6..bf1b6e7e 100644 --- a/.github/sync-files.yaml +++ b/.github/sync-files.yaml @@ -29,4 +29,4 @@ - source: CONTRIBUTING.md - source: CPPLINT.cfg - source: LICENSE - - source: setup.cfg \ No newline at end of file + - source: setup.cfg diff --git a/.github/workflows/build-and-test-differential.yaml b/.github/workflows/build-and-test-differential.yaml index 5fd6415f..9c2ac70e 100644 --- a/.github/workflows/build-and-test-differential.yaml +++ b/.github/workflows/build-and-test-differential.yaml @@ -87,4 +87,4 @@ jobs: flags: differential - name: Show disk space after the tasks - run: df -h \ No newline at end of file + run: df -h diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index d333f1ea..a6996cf2 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -75,4 +75,4 @@ jobs: flags: total - name: Show disk space after the tasks - run: df -h \ No newline at end of file + run: df -h diff --git a/.github/workflows/cancel-previous-workflows.yaml b/.github/workflows/cancel-previous-workflows.yaml index b7d02959..2037da36 100644 --- a/.github/workflows/cancel-previous-workflows.yaml +++ b/.github/workflows/cancel-previous-workflows.yaml @@ -17,4 +17,4 @@ jobs: uses: styfle/cancel-workflow-action@0.12.1 with: workflow_id: all - all_but_latest: true \ No newline at end of file + all_but_latest: true diff --git a/.github/workflows/check-build-depends.yaml b/.github/workflows/check-build-depends.yaml index 0563d9c3..3fcbd6d9 100644 --- a/.github/workflows/check-build-depends.yaml +++ b/.github/workflows/check-build-depends.yaml @@ -42,4 +42,4 @@ jobs: with: rosdistro: ${{ matrix.rosdistro }} target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - build-depends-repos: ${{ matrix.build-depends-repos }} \ No newline at end of file + build-depends-repos: ${{ matrix.build-depends-repos }} diff --git a/.github/workflows/clang-tidy-pr-comments-manually.yaml b/.github/workflows/clang-tidy-pr-comments-manually.yaml index 4d7a4070..e6e1afd8 100644 --- a/.github/workflows/clang-tidy-pr-comments-manually.yaml +++ b/.github/workflows/clang-tidy-pr-comments-manually.yaml @@ -68,4 +68,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} clang_tidy_fixes: fixes.yaml - pull_request_id: ${{ steps.set-variables.outputs.pr-id }} \ No newline at end of file + pull_request_id: ${{ steps.set-variables.outputs.pr-id }} diff --git a/.github/workflows/clang-tidy-pr-comments.yaml b/.github/workflows/clang-tidy-pr-comments.yaml index 7b4f6343..1d808b0b 100644 --- a/.github/workflows/clang-tidy-pr-comments.yaml +++ b/.github/workflows/clang-tidy-pr-comments.yaml @@ -68,4 +68,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} clang_tidy_fixes: fixes.yaml - pull_request_id: ${{ steps.set-variables.outputs.pr-id }} \ No newline at end of file + pull_request_id: ${{ steps.set-variables.outputs.pr-id }} diff --git a/.github/workflows/spell-check-differential.yaml b/.github/workflows/spell-check-differential.yaml index 4440f042..e3d2c708 100644 --- a/.github/workflows/spell-check-differential.yaml +++ b/.github/workflows/spell-check-differential.yaml @@ -24,4 +24,4 @@ jobs: cspell-json-url: https://raw.githubusercontent.com/autowarefoundation/autoware-spell-check-dict/main/.cspell.json dict-packages: | https://github.com/autowarefoundation/autoware-spell-check-dict - https://github.com/tier4/cspell-dicts \ No newline at end of file + https://github.com/tier4/cspell-dicts diff --git a/.github/workflows/sync-files.yaml b/.github/workflows/sync-files.yaml index 62555eff..a8a03539 100644 --- a/.github/workflows/sync-files.yaml +++ b/.github/workflows/sync-files.yaml @@ -31,4 +31,4 @@ jobs: pr-labels: | tag:bot tag:sync-files - auto-merge-method: squash \ No newline at end of file + auto-merge-method: squash diff --git a/.gitignore b/.gitignore index 65212347..5e3846f6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ log/ # Python *.pyc + +# pre-commit +node_modules/ diff --git a/.markdown-link-check.json b/.markdown-link-check.json index 92766c1d..c71a3e42 100644 --- a/.markdown-link-check.json +++ b/.markdown-link-check.json @@ -13,4 +13,4 @@ ], "retryOn429": true, "retryCount": 10 -} \ No newline at end of file +} diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 2e658608..3f0ffd4f 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -14,4 +14,4 @@ MD041: false MD045: false MD046: false MD049: false -MD059: false \ No newline at end of file +MD059: false diff --git a/.pre-commit-config-optional.yaml b/.pre-commit-config-optional.yaml index 38f0ece6..75e39d4e 100644 --- a/.pre-commit-config-optional.yaml +++ b/.pre-commit-config-optional.yaml @@ -13,4 +13,4 @@ repos: rev: v3.14.2 hooks: - id: markdown-link-check - args: [--quiet, --config=.markdown-link-check.json] \ No newline at end of file + args: [--quiet, --config=.markdown-link-check.json] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac8051c0..b8c7d8b3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -112,4 +112,4 @@ repos: rev: v2.14.0 hooks: - id: hadolint - exclude: .svg$ \ No newline at end of file + exclude: .svg$ diff --git a/.prettierignore b/.prettierignore index 3f855740..3e96aace 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,4 +3,4 @@ # To make changes, update the source repository and follow the guidelines in its README. *.param.yaml -*.rviz \ No newline at end of file +*.rviz diff --git a/.prettierrc.yaml b/.prettierrc.yaml index f26e895b..fe476936 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -21,4 +21,4 @@ overrides: options: printWidth: 200 xmlSelfClosingSpace: false - xmlWhitespaceSensitivity: ignore \ No newline at end of file + xmlWhitespaceSensitivity: ignore diff --git a/.yamllint.yaml b/.yamllint.yaml index f635c55e..e0be62db 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -23,4 +23,4 @@ rules: check-keys: false # To allow 'on' of GitHub Actions quoted-strings: level: error - required: only-when-needed # To keep consistent style \ No newline at end of file + required: only-when-needed # To keep consistent style diff --git a/CPPLINT.cfg b/CPPLINT.cfg index 928cdd9a..159042db 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -17,4 +17,4 @@ filter=-whitespace/parens # we allow closing parenthesis to be on the ne filter=-whitespace/semicolon # we allow the developer to decide about whitespace after a semicolon filter=-build/header_guard # we automatically fix the names of header guards using pre-commit filter=-build/include_order # we use the custom include order -filter=-build/include_subdir # we allow the style of "foo.hpp" \ No newline at end of file +filter=-build/include_subdir # we allow the style of "foo.hpp" diff --git a/calibrators/intrinsic_camera_calibrator/ceres_intrinsic_camera_calibrator/src/ceres_camera_intrinsics_optimizer.cpp b/calibrators/intrinsic_camera_calibrator/ceres_intrinsic_camera_calibrator/src/ceres_camera_intrinsics_optimizer.cpp index 6f17bd99..11de5b78 100644 --- a/calibrators/intrinsic_camera_calibrator/ceres_intrinsic_camera_calibrator/src/ceres_camera_intrinsics_optimizer.cpp +++ b/calibrators/intrinsic_camera_calibrator/ceres_intrinsic_camera_calibrator/src/ceres_camera_intrinsics_optimizer.cpp @@ -69,7 +69,10 @@ void CeresCameraIntrinsicsOptimizer::setSourceDimensions(int width, int height) height_ = height; } -void CeresCameraIntrinsicsOptimizer::setVerbose(bool verbose) { verbose_ = verbose; } +void CeresCameraIntrinsicsOptimizer::setVerbose(bool verbose) +{ + verbose_ = verbose; +} void CeresCameraIntrinsicsOptimizer::setData( const cv::Mat_ & camera_matrix, const cv::Mat_ & distortion_coeffs, diff --git a/calibrators/intrinsic_camera_calibrator/ceres_intrinsic_camera_calibrator/src/ceres_intrinsic_camera_calibrator_py.cpp b/calibrators/intrinsic_camera_calibrator/ceres_intrinsic_camera_calibrator/src/ceres_intrinsic_camera_calibrator_py.cpp index 7b15a953..60e12ba0 100644 --- a/calibrators/intrinsic_camera_calibrator/ceres_intrinsic_camera_calibrator/src/ceres_intrinsic_camera_calibrator_py.cpp +++ b/calibrators/intrinsic_camera_calibrator/ceres_intrinsic_camera_calibrator/src/ceres_intrinsic_camera_calibrator_py.cpp @@ -30,7 +30,10 @@ #define STRINGIFY(x) #x #define MACRO_STRINGIFY(x) STRINGIFY(x) -int add(int i, int j) { return i + j; } +int add(int i, int j) +{ + return i + j; +} std::tuple test(const Eigen::MatrixXd & matrix) { diff --git a/calibrators/mapping_based_calibrator/include/mapping_based_calibrator/mapping_based_calibrator.hpp b/calibrators/mapping_based_calibrator/include/mapping_based_calibrator/mapping_based_calibrator.hpp index c51ea5b4..d879d1f7 100644 --- a/calibrators/mapping_based_calibrator/include/mapping_based_calibrator/mapping_based_calibrator.hpp +++ b/calibrators/mapping_based_calibrator/include/mapping_based_calibrator/mapping_based_calibrator.hpp @@ -24,13 +24,13 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp b/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp index c10b0b86..f37d5eb4 100644 --- a/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp +++ b/calibrators/mapping_based_calibrator/src/camera_calibrator.cpp @@ -71,7 +71,9 @@ CameraCalibrator::CameraCalibrator( configureCalibrators(); } -void CameraCalibrator::configureCalibrators() {} +void CameraCalibrator::configureCalibrators() +{ +} std::tuple CameraCalibrator::calibrate() { diff --git a/calibrators/mapping_based_calibrator/src/filters/best_frames_filter.cpp b/calibrators/mapping_based_calibrator/src/filters/best_frames_filter.cpp index 5f40c6e0..e4048a45 100644 --- a/calibrators/mapping_based_calibrator/src/filters/best_frames_filter.cpp +++ b/calibrators/mapping_based_calibrator/src/filters/best_frames_filter.cpp @@ -21,7 +21,10 @@ #include #include -void BestFramesFilter::setName(const std::string & name) { name_ = name + " (BestFramesFilter)"; } +void BestFramesFilter::setName(const std::string & name) +{ + name_ = name + " (BestFramesFilter)"; +} std::vector BestFramesFilter::filter( const std::vector & input_calibration_frames, diff --git a/calibrators/mapping_based_calibrator/src/filters/dynamics_filter.cpp b/calibrators/mapping_based_calibrator/src/filters/dynamics_filter.cpp index 6c6f5615..c7e2cf13 100644 --- a/calibrators/mapping_based_calibrator/src/filters/dynamics_filter.cpp +++ b/calibrators/mapping_based_calibrator/src/filters/dynamics_filter.cpp @@ -18,7 +18,10 @@ #include #include -void DynamicsFilter::setName(const std::string & name) { name_ = name + " (DynamicsFilter)"; } +void DynamicsFilter::setName(const std::string & name) +{ + name_ = name + " (DynamicsFilter)"; +} std::vector DynamicsFilter::filter( const std::vector & calibration_frames, diff --git a/calibrators/mapping_based_calibrator/src/filters/lost_state_filter.cpp b/calibrators/mapping_based_calibrator/src/filters/lost_state_filter.cpp index 82a1ca0b..bd8582b3 100644 --- a/calibrators/mapping_based_calibrator/src/filters/lost_state_filter.cpp +++ b/calibrators/mapping_based_calibrator/src/filters/lost_state_filter.cpp @@ -19,7 +19,10 @@ #include #include -void LostStateFilter::setName(const std::string & name) { name_ = name + " (LostStateFilter)"; } +void LostStateFilter::setName(const std::string & name) +{ + name_ = name + " (LostStateFilter)"; +} std::vector LostStateFilter::filter( const std::vector & calibration_frames, MappingData::Ptr & data) diff --git a/calibrators/marker_radar_lidar_calibrator/include/marker_radar_lidar_calibrator/marker_radar_lidar_calibrator.hpp b/calibrators/marker_radar_lidar_calibrator/include/marker_radar_lidar_calibrator/marker_radar_lidar_calibrator.hpp index f2aa34b4..ecf44349 100644 --- a/calibrators/marker_radar_lidar_calibrator/include/marker_radar_lidar_calibrator/marker_radar_lidar_calibrator.hpp +++ b/calibrators/marker_radar_lidar_calibrator/include/marker_radar_lidar_calibrator/marker_radar_lidar_calibrator.hpp @@ -21,12 +21,12 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/calibrators/tag_based_pnp_calibrator/src/calibration_estimator.cpp b/calibrators/tag_based_pnp_calibrator/src/calibration_estimator.cpp index c340ea9e..23b43695 100644 --- a/calibrators/tag_based_pnp_calibrator/src/calibration_estimator.cpp +++ b/calibrators/tag_based_pnp_calibrator/src/calibration_estimator.cpp @@ -617,7 +617,10 @@ bool CalibrationEstimator::converged() const getCalibrationCoveragePercentage() >= convergence_min_area_percentage_; } -bool CalibrationEstimator::valid() const { return valid_; } +bool CalibrationEstimator::valid() const +{ + return valid_; +} std::vector> CalibrationEstimator::getActiveLidartagHypotheses() const @@ -696,14 +699,20 @@ void CalibrationEstimator::setCalibrationConvergenceCriteria( convergence_min_area_percentage_ = min_area_percentage; } -void CalibrationEstimator::setMinPnpPairs(int min_pairs) { min_pnp_pairs_ = min_pairs; } +void CalibrationEstimator::setMinPnpPairs(int min_pairs) +{ + min_pnp_pairs_ = min_pairs; +} void CalibrationEstimator::setMinConvergenceTime(double convergence_time) { min_convergence_time_ = convergence_time; } -void CalibrationEstimator::setMaxNoObservationTime(double time) { max_no_observation_time_ = time; } +void CalibrationEstimator::setMaxNoObservationTime(double time) +{ + max_no_observation_time_ = time; +} void CalibrationEstimator::setNewHypothesisDistance(double distance) { @@ -771,7 +780,10 @@ void CalibrationEstimator::setApriltagProcessNoise(double translation) apriltag_process_noise_translation_ = translation; } -double CalibrationEstimator::getNewHypothesisDistance() const { return new_hypothesis_distance_; } +double CalibrationEstimator::getNewHypothesisDistance() const +{ + return new_hypothesis_distance_; +} double CalibrationEstimator::getCalibrationCoveragePercentage() const { @@ -799,4 +811,7 @@ int CalibrationEstimator::getCurrentCalibrationPairsNumber() const return converged_lidartag_hypotheses_.size(); } -int CalibrationEstimator::getConvergencePairNumber() const { return convergence_min_pairs_; } +int CalibrationEstimator::getConvergencePairNumber() const +{ + return convergence_min_pairs_; +} diff --git a/calibrators/tag_based_sfm_calibrator/package.xml b/calibrators/tag_based_sfm_calibrator/package.xml index 7559f494..d51ec5cb 100644 --- a/calibrators/tag_based_sfm_calibrator/package.xml +++ b/calibrators/tag_based_sfm_calibrator/package.xml @@ -41,6 +41,7 @@ tier4_tag_utils visualization_msgs + lidartag rclpy diff --git a/calibrators/tag_based_sfm_calibrator/src/apriltag_detection.cpp b/calibrators/tag_based_sfm_calibrator/src/apriltag_detection.cpp index 1e93a74f..99d6eca6 100644 --- a/calibrators/tag_based_sfm_calibrator/src/apriltag_detection.cpp +++ b/calibrators/tag_based_sfm_calibrator/src/apriltag_detection.cpp @@ -81,7 +81,10 @@ void LidartagDetection::computeTemplateCorners(double new_size) {-hsize, hsize, 0.0}, {hsize, hsize, 0.0}, {hsize, -hsize, 0.0}, {-hsize, -hsize, 0.0}}; } -void LidartagDetection::computeTemplateCorners() { computeTemplateCorners(this->size); } +void LidartagDetection::computeTemplateCorners() +{ + computeTemplateCorners(this->size); +} void LidartagDetection::computeObjectCorners() { diff --git a/calibrators/tag_based_sfm_calibrator/src/ceres/calibration_problem.cpp b/calibrators/tag_based_sfm_calibrator/src/ceres/calibration_problem.cpp index 3c7f80ce..fefb76c9 100644 --- a/calibrators/tag_based_sfm_calibrator/src/ceres/calibration_problem.cpp +++ b/calibrators/tag_based_sfm_calibrator/src/ceres/calibration_problem.cpp @@ -134,7 +134,10 @@ void CalibrationProblem::setWheelTagUIDs(UID left_wheel_tag_uid, UID right_wheel right_wheel_tag_uid_ = right_wheel_tag_uid; } -void CalibrationProblem::setData(CalibrationData::Ptr & data) { data_ = data; } +void CalibrationProblem::setData(CalibrationData::Ptr & data) +{ + data_ = data; +} void CalibrationProblem::dataToPlaceholders() { diff --git a/common/tier4_tag_utils/src/apriltag_hypothesis.cpp b/common/tier4_tag_utils/src/apriltag_hypothesis.cpp index b1cb0360..74eefff3 100644 --- a/common/tier4_tag_utils/src/apriltag_hypothesis.cpp +++ b/common/tier4_tag_utils/src/apriltag_hypothesis.cpp @@ -27,7 +27,9 @@ ApriltagHypothesis::ApriltagHypothesis( { } -ApriltagHypothesis::~ApriltagHypothesis() {} +ApriltagHypothesis::~ApriltagHypothesis() +{ +} bool ApriltagHypothesis::update( const std::vector & corners, const rclcpp::Time & stamp) @@ -77,7 +79,10 @@ bool ApriltagHypothesis::update(const rclcpp::Time & stamp) return since_last_observation < max_no_observation_time_; } -int ApriltagHypothesis::getId() const { return id_; } +int ApriltagHypothesis::getId() const +{ + return id_; +} std::vector ApriltagHypothesis::getLatestPoints2d() const { @@ -154,7 +159,10 @@ std::vector ApriltagHypothesis::getPoints3d( return object_points; } -cv::Point3d ApriltagHypothesis::getCenter3d() const { return getCenter3d(getFilteredPoints3d()); } +cv::Point3d ApriltagHypothesis::getCenter3d() const +{ + return getCenter3d(getFilteredPoints3d()); +} cv::Point3d ApriltagHypothesis::getCenter3d(const std::vector & corners) const { @@ -214,7 +222,10 @@ void ApriltagHypothesis::setNewHypothesisThreshold(double max_translation) new_hypothesis_translation_ = max_translation; } -void ApriltagHypothesis::setMaxNoObservationTime(double time) { max_no_observation_time_ = time; } +void ApriltagHypothesis::setMaxNoObservationTime(double time) +{ + max_no_observation_time_ = time; +} void ApriltagHypothesis::setMeasurementNoise(double translation) { @@ -226,7 +237,10 @@ void ApriltagHypothesis::setProcessNoise(double translation) process_noise_translation_ = translation; } -void ApriltagHypothesis::setTagSize(double size) { tag_size_ = size; } +void ApriltagHypothesis::setTagSize(double size) +{ + tag_size_ = size; +} void ApriltagHypothesis::initKalman(const std::vector & corners) { diff --git a/common/tier4_tag_utils/src/lidartag_hypothesis.cpp b/common/tier4_tag_utils/src/lidartag_hypothesis.cpp index c288b3c5..77232e46 100644 --- a/common/tier4_tag_utils/src/lidartag_hypothesis.cpp +++ b/common/tier4_tag_utils/src/lidartag_hypothesis.cpp @@ -98,7 +98,10 @@ bool LidartagHypothesis::update(const rclcpp::Time & stamp) return since_last_observation < max_no_observation_time_; } -int LidartagHypothesis::getId() const { return id_; } +int LidartagHypothesis::getId() const +{ + return id_; +} std::vector LidartagHypothesis::getLatestPoints() { @@ -124,9 +127,15 @@ std::vector LidartagHypothesis::getLatestPoints() return corners; } -cv::Matx33d LidartagHypothesis::getLatestRotation() const { return latest_rotation_matrix_; } +cv::Matx33d LidartagHypothesis::getLatestRotation() const +{ + return latest_rotation_matrix_; +} -cv::Matx31d LidartagHypothesis::getLatestTranslation() const { return latest_translation_vector_; } +cv::Matx31d LidartagHypothesis::getLatestTranslation() const +{ + return latest_translation_vector_; +} std::vector LidartagHypothesis::getFilteredPoints() { @@ -152,7 +161,10 @@ std::vector LidartagHypothesis::getFilteredPoints() return corners; } -cv::Matx33d LidartagHypothesis::getFilteredRotation() const { return filtered_rotation_matrix_; } +cv::Matx33d LidartagHypothesis::getFilteredRotation() const +{ + return filtered_rotation_matrix_; +} cv::Matx31d LidartagHypothesis::getFilteredTranslation() const { @@ -184,7 +196,10 @@ double LidartagHypothesis::getRotCov() const return std::sqrt(max_rotation_cov); } -double LidartagHypothesis::getSpeed() const { return estimated_speed_; } +double LidartagHypothesis::getSpeed() const +{ + return estimated_speed_; +} bool LidartagHypothesis::converged() const { @@ -248,7 +263,10 @@ void LidartagHypothesis::setNewHypothesisThreshold(double max_translation, doubl new_hypothesis_rotation_ = max_rotation; } -void LidartagHypothesis::setMaxNoObservationTime(double time) { max_no_observation_time_ = time; } +void LidartagHypothesis::setMaxNoObservationTime(double time) +{ + max_no_observation_time_ = time; +} void LidartagHypothesis::setMeasurementNoise(double translation, double rotation) { diff --git a/docker/Dockerfile b/docker/Dockerfile index f2876fb9..4d3c8dad 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,25 +5,23 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] ENV PIP_BREAK_SYSTEM_PACKAGES=1 +# hadolint ignore=DL3008 RUN apt-get update && apt-get install --no-install-recommends -y \ python3-pip \ - wget + wget \ + && rm -rf /var/lib/apt/lists/* RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc WORKDIR /workspace -RUN mkdir -p /workspace/src - # TODO: restore upstream -RUN wget https://raw.githubusercontent.com/amadeuszsz/CalibrationTools/feat/jazzy-support/calibration_tools_standalone.repos --directory-prefix=/workspace +RUN mkdir -p /workspace/src && wget --progress=dot:giga https://raw.githubusercontent.com/amadeuszsz/CalibrationTools/feat/jazzy-support/calibration_tools_standalone.repos --directory-prefix=/workspace RUN vcs import src < calibration_tools_standalone.repos -RUN rosdep install -y --from-paths `colcon list --packages-up-to sensor_calibration_tools -p` --ignore-src - -RUN source /opt/ros/${ROS_DISTRO}/setup.bash && colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to sensor_calibration_tools +RUN rosdep install -y --from-paths "$(colcon list --packages-up-to sensor_calibration_tools -p)" --ignore-src -RUN rm -rf /var/lib/apt/lists/* +RUN source /opt/ros/"${ROS_DISTRO}"/setup.bash && colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to sensor_calibration_tools RUN echo "source /workspace/install/setup.bash" >> /etc/bash.bashrc diff --git a/docs/images/mapping_based_calibrator/mapping_based_vis.svg b/docs/images/mapping_based_calibrator/mapping_based_vis.svg index bc4df550..cb9e8a1e 100644 --- a/docs/images/mapping_based_calibrator/mapping_based_vis.svg +++ b/docs/images/mapping_based_calibrator/mapping_based_vis.svg @@ -1,4 +1,408 @@ -
static landmark/object
static landmark/object
static landmark/object
static landmark/object
Mapping lidar
Mapping lidar
Calibration lidar
Calibration lidar
Mapping lidar
Mapping lidar
Calibration lidar
Calibration lidar
\ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ static landmark/object +
+
+
+
+ static landmark/object +
+
+
+ + + + + + + +
+
+
+ static landmark/object +
+
+
+
+ static landmark/object +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ Mapping lidar +
+
+
+
+ Mapping lidar +
+
+
+ + + + + + + +
+
+
+ + Calibration l + + idar +
+
+
+
+ Calibration lidar +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ Mapping lidar +
+
+
+
+ Mapping lidar +
+
+
+ + + + + + + +
+
+
+ + Calibration l + + idar +
+
+
+
+ Calibration lidar +
+
+
+ + + + +
+
diff --git a/docs/images/marker_radar_lidar_calibrator/background_construction.svg b/docs/images/marker_radar_lidar_calibrator/background_construction.svg index 53431a22..6c2dde54 100644 --- a/docs/images/marker_radar_lidar_calibrator/background_construction.svg +++ b/docs/images/marker_radar_lidar_calibrator/background_construction.svg @@ -1,4 +1,359 @@ -
radar
lidar
Object's from radar
\ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
radar
+
+
+
+ +
+
+
+ + + + + + + +
+
+
lidar
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
Object's from radar
+
+
+
+ +
+
+
+
+
diff --git a/docs/images/marker_radar_lidar_calibrator/foreground_extraction.svg b/docs/images/marker_radar_lidar_calibrator/foreground_extraction.svg index c0e38115..23a364a1 100644 --- a/docs/images/marker_radar_lidar_calibrator/foreground_extraction.svg +++ b/docs/images/marker_radar_lidar_calibrator/foreground_extraction.svg @@ -1,4 +1,440 @@ -
radar
lidar
Bird's-eye-view of
radar reflector + tripod
Object's from radar
Human
\ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
radar
+
+
+
+ +
+
+
+ + + + + + + +
+
+
lidar
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ Bird's-eye-view of +
radar reflector + tripod
+
+
+
+
+ +
+
+
+ + + + + + + + + + +
+
+
Object's from radar
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+
Human
+
+
+
+ +
+
+
+
+
diff --git a/docs/images/marker_radar_lidar_calibrator/marker_radar_lidar_vis.svg b/docs/images/marker_radar_lidar_calibrator/marker_radar_lidar_vis.svg index 835192b7..31d6f879 100644 --- a/docs/images/marker_radar_lidar_calibrator/marker_radar_lidar_vis.svg +++ b/docs/images/marker_radar_lidar_calibrator/marker_radar_lidar_vis.svg @@ -1,4 +1,173 @@ -
radar
lidar
Bird's-eye-view of 
radar reflector + tripod
\ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + +
+
+
radar
+
+
+
+ +
+
+
+ + + + + + + +
+
+
lidar
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
+
+
+ Bird's-eye-view of +
radar reflector + tripod
+
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/docs/images/tag_based_sfm_calibrator/bev_setup.svg b/docs/images/tag_based_sfm_calibrator/bev_setup.svg index e39eea43..e7fbb35b 100644 --- a/docs/images/tag_based_sfm_calibrator/bev_setup.svg +++ b/docs/images/tag_based_sfm_calibrator/bev_setup.svg @@ -1 +1,371 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/setup.cfg b/setup.cfg index 4a2bdddb..4d7d5e5b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,4 +16,4 @@ line_length=100 force_sort_within_sections=true force_single_line=true reverse_relative=true -known_third_party=launch \ No newline at end of file +known_third_party=launch From 4b1262b235a7f26ac830c2f45254e515cda2dadb Mon Sep 17 00:00:00 2001 From: Amadeusz Szymko Date: Fri, 23 Jan 2026 14:53:49 +0900 Subject: [PATCH 12/14] fix(intrinsic_camera_calibrator): pop-up window with matplotlib Signed-off-by: Amadeusz Szymko --- .../intrinsic_camera_calibrator/camera_calibrator.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/calibrators/intrinsic_camera_calibrator/intrinsic_camera_calibrator/intrinsic_camera_calibrator/camera_calibrator.py b/calibrators/intrinsic_camera_calibrator/intrinsic_camera_calibrator/intrinsic_camera_calibrator/camera_calibrator.py index 88f11e9b..59501301 100644 --- a/calibrators/intrinsic_camera_calibrator/intrinsic_camera_calibrator/intrinsic_camera_calibrator/camera_calibrator.py +++ b/calibrators/intrinsic_camera_calibrator/intrinsic_camera_calibrator/intrinsic_camera_calibrator/camera_calibrator.py @@ -16,6 +16,7 @@ from collections import defaultdict import copy import logging +import multiprocessing from optparse import OptionParser import os import signal @@ -1354,6 +1355,10 @@ def on_parameter_changed(self): def main(args=None): + try: + multiprocessing.set_start_method('spawn', force=True) + except RuntimeError: + logging.warning("Cannot set multiprocessing start method to 'spawn'. Pop-up windows may not work properly.") set_logger_severity() parser = OptionParser() parser.add_option("-c", "--config-file", type="string", help="calibration file path") @@ -1384,7 +1389,7 @@ def main(args=None): sys.exit(app.exec_()) except (KeyboardInterrupt, SystemExit): logging.info("Received sigint. Quitting...") - rclpy.shutdown() + rclpy.try_shutdown() def sigint_handler(*args): From a12b9744cb2ed320427b13feaa1031d71fe111b5 Mon Sep 17 00:00:00 2001 From: Amadeusz Szymko Date: Fri, 23 Jan 2026 16:24:21 +0900 Subject: [PATCH 13/14] chore: restore upstream Signed-off-by: Amadeusz Szymko --- calibration_tools_autoware.repos | 4 ++-- calibration_tools_standalone.repos | 4 ++-- docker/Dockerfile | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/calibration_tools_autoware.repos b/calibration_tools_autoware.repos index 71cae23e..57926df3 100644 --- a/calibration_tools_autoware.repos +++ b/calibration_tools_autoware.repos @@ -1,8 +1,8 @@ repositories: autoware/calibration_tools: type: git - url: https://github.com/amadeuszsz/CalibrationTools.git # TODO: restore upstream - version: feat/jazzy-support # TODO: restore tier4/universe branch + url: https://github.com/tier4/CalibrationTools.git + version: tier4/universe vendor/lidartag: type: git url: https://github.com/tier4/LiDARTag.git diff --git a/calibration_tools_standalone.repos b/calibration_tools_standalone.repos index e74d6164..78a08083 100644 --- a/calibration_tools_standalone.repos +++ b/calibration_tools_standalone.repos @@ -1,8 +1,8 @@ repositories: calibration_tools: type: git - url: https://github.com/amadeuszsz/CalibrationTools.git # TODO: restore upstream - version: feat/jazzy-support # TODO: restore tier4/universe branch + url: https://github.com/tier4/CalibrationTools.git + version: tier4/universe autoware/autoware_cmake: type: git url: https://github.com/autowarefoundation/autoware_cmake.git diff --git a/docker/Dockerfile b/docker/Dockerfile index 4d3c8dad..a6789a65 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -15,8 +15,7 @@ RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc WORKDIR /workspace -# TODO: restore upstream -RUN mkdir -p /workspace/src && wget --progress=dot:giga https://raw.githubusercontent.com/amadeuszsz/CalibrationTools/feat/jazzy-support/calibration_tools_standalone.repos --directory-prefix=/workspace +RUN mkdir -p /workspace/src && wget --progress=dot:giga https://raw.githubusercontent.com/tier4/CalibrationTools/tier4/universe/calibration_tools_standalone.repos --directory-prefix=/workspace RUN vcs import src < calibration_tools_standalone.repos From d5d21839dc7a6b683b5b4d73eb2e7a81173138f8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 07:24:58 +0000 Subject: [PATCH 14/14] style(pre-commit): autofix --- .../intrinsic_camera_calibrator/camera_calibrator.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/calibrators/intrinsic_camera_calibrator/intrinsic_camera_calibrator/intrinsic_camera_calibrator/camera_calibrator.py b/calibrators/intrinsic_camera_calibrator/intrinsic_camera_calibrator/intrinsic_camera_calibrator/camera_calibrator.py index 59501301..b3b4f16b 100644 --- a/calibrators/intrinsic_camera_calibrator/intrinsic_camera_calibrator/intrinsic_camera_calibrator/camera_calibrator.py +++ b/calibrators/intrinsic_camera_calibrator/intrinsic_camera_calibrator/intrinsic_camera_calibrator/camera_calibrator.py @@ -1356,9 +1356,11 @@ def on_parameter_changed(self): def main(args=None): try: - multiprocessing.set_start_method('spawn', force=True) + multiprocessing.set_start_method("spawn", force=True) except RuntimeError: - logging.warning("Cannot set multiprocessing start method to 'spawn'. Pop-up windows may not work properly.") + logging.warning( + "Cannot set multiprocessing start method to 'spawn'. Pop-up windows may not work properly." + ) set_logger_severity() parser = OptionParser() parser.add_option("-c", "--config-file", type="string", help="calibration file path")