From d7e2f9e409103e6e3d0a6102432143cfa510996e Mon Sep 17 00:00:00 2001 From: Ryohei Sasaki Date: Thu, 26 Mar 2026 16:18:18 +0900 Subject: [PATCH 1/2] fix: improve jazzy build compatibility --- eagleye_core/coordinate/CMakeLists.txt | 15 ++++--- eagleye_core/coordinate/package.xml | 1 + eagleye_core/navigation/CMakeLists.txt | 3 +- eagleye_rt/CMakeLists.txt | 54 ++++++++++++++++++++++++ eagleye_rt/package.xml | 1 + eagleye_rt/src/tf_converted_imu.cpp | 40 +++++++++--------- eagleye_util/geo_pose_fusion/package.xml | 1 + 7 files changed, 87 insertions(+), 28 deletions(-) diff --git a/eagleye_core/coordinate/CMakeLists.txt b/eagleye_core/coordinate/CMakeLists.txt index 1efe0df3..27726135 100755 --- a/eagleye_core/coordinate/CMakeLists.txt +++ b/eagleye_core/coordinate/CMakeLists.txt @@ -15,17 +15,17 @@ ament_auto_find_build_dependencies() find_package(PkgConfig) find_package(geodesy) + +# GeographicLib find_path(GeographicLib_INCLUDE_DIR GeographicLib/Config.h PATH_SUFFIXES GeographicLib ) -set(GeographicLib_LIBRARIES - NAMES Geographic -) +find_library(GeographicLib_LIBRARIES NAMES Geographic GeographicLib) include_directories( include ${PROJECT_SOURCE_DIR}/include - ${GeographicLib_INCLUDE_DIRS} + ${GeographicLib_INCLUDE_DIR} ) link_directories( /usr/local/lib @@ -47,11 +47,11 @@ ament_auto_add_library(eagleye_coordinate SHARED include/eagleye_coordinate/eagleye_coordinate.hpp ) -ament_export_include_directories(include) +ament_export_include_directories(include ${GeographicLib_INCLUDE_DIR}) ament_target_dependencies(eagleye_coordinate) target_link_libraries(eagleye_coordinate - Geographic + ${GeographicLib_LIBRARIES} ) install( @@ -62,6 +62,7 @@ install( target_include_directories(eagleye_coordinate PUBLIC + ${GeographicLib_INCLUDE_DIR} $ $ ) @@ -86,4 +87,4 @@ if(BUILD_TESTING) ament_lint_auto_find_test_dependencies() endif() -ament_auto_package() \ No newline at end of file +ament_auto_package() diff --git a/eagleye_core/coordinate/package.xml b/eagleye_core/coordinate/package.xml index fe132011..3b3b69e5 100644 --- a/eagleye_core/coordinate/package.xml +++ b/eagleye_core/coordinate/package.xml @@ -13,6 +13,7 @@ geodesy rclcpp geodesy + ament_index_cpp eigen geographic_info geographic_msgs diff --git a/eagleye_core/navigation/CMakeLists.txt b/eagleye_core/navigation/CMakeLists.txt index fa609835..0d94dd01 100755 --- a/eagleye_core/navigation/CMakeLists.txt +++ b/eagleye_core/navigation/CMakeLists.txt @@ -23,6 +23,7 @@ endif() find_package(ament_cmake_auto REQUIRED) find_package(eagleye_coordinate REQUIRED) find_package(PkgConfig REQUIRED) +find_package(yaml-cpp REQUIRED) ament_auto_find_build_dependencies() @@ -51,7 +52,7 @@ ament_auto_add_library(eagleye_navigation SHARED include/eagleye_navigation/eagleye_navigation.hpp ) -ament_auto_find_build_dependencies() +target_link_libraries(eagleye_navigation yaml-cpp) install(TARGETS eagleye_navigation INCLUDES DESTINATION include diff --git a/eagleye_rt/CMakeLists.txt b/eagleye_rt/CMakeLists.txt index c4664583..0a46bb09 100644 --- a/eagleye_rt/CMakeLists.txt +++ b/eagleye_rt/CMakeLists.txt @@ -41,14 +41,23 @@ ament_auto_add_executable(distance ament_auto_add_executable(heading_interpolate src/heading_interpolate_node.cpp ) +target_link_libraries(heading_interpolate + yaml-cpp +) ament_auto_add_executable(heading src/heading_node.cpp ) +target_link_libraries(heading + yaml-cpp +) ament_auto_add_executable(height src/height_node.cpp ) +target_link_libraries(height + yaml-cpp +) ament_auto_add_executable(monitor src/monitor_node.cpp @@ -57,62 +66,107 @@ ament_auto_add_executable(monitor ament_auto_add_executable(position_interpolate src/position_interpolate_node.cpp ) +target_link_libraries(position_interpolate + yaml-cpp +) ament_auto_add_executable(position src/position_node.cpp ) +target_link_libraries(position + yaml-cpp +) ament_auto_add_executable(slip_angle src/slip_angle_node.cpp ) +target_link_libraries(slip_angle + yaml-cpp +) ament_auto_add_executable(slip_coefficient src/slip_coefficient_node.cpp ) +target_link_libraries(slip_coefficient + yaml-cpp +) ament_auto_add_executable(enable_additional_rolling src/enable_additional_rolling_node.cpp ) +target_link_libraries(enable_additional_rolling + yaml-cpp +) ament_auto_add_executable(rolling src/rolling_node.cpp ) +target_link_libraries(rolling + yaml-cpp +) ament_auto_add_executable(smoothing src/smoothing_node.cpp ) +target_link_libraries(smoothing + yaml-cpp +) ament_auto_add_executable(trajectory src/trajectory_node.cpp ) +target_link_libraries(trajectory + yaml-cpp +) ament_auto_add_executable(velocity_scale_factor src/velocity_scale_factor_node.cpp ) +target_link_libraries(velocity_scale_factor + yaml-cpp +) ament_auto_add_executable(yaw_rate_offset src/yaw_rate_offset_node.cpp ) +target_link_libraries(yaw_rate_offset + yaml-cpp +) ament_auto_add_executable(yaw_rate_offset_stop src/yaw_rate_offset_stop_node.cpp ) +target_link_libraries(yaw_rate_offset_stop + yaml-cpp +) ament_auto_add_executable(angular_velocity_offset_stop src/angular_velocity_offset_stop_node.cpp ) +target_link_libraries(angular_velocity_offset_stop + yaml-cpp +) ament_auto_add_executable(rtk_dead_reckoning src/rtk_dead_reckoning_node.cpp ) +target_link_libraries(rtk_dead_reckoning + yaml-cpp +) ament_auto_add_executable(rtk_heading src/rtk_heading_node.cpp ) +target_link_libraries(rtk_heading + yaml-cpp +) ament_auto_add_executable(velocity_estimator src/velocity_estimator_node.cpp ) +target_link_libraries(velocity_estimator + yaml-cpp +) install(TARGETS tf_converted_imu diff --git a/eagleye_rt/package.xml b/eagleye_rt/package.xml index 1214acc5..abf93975 100644 --- a/eagleye_rt/package.xml +++ b/eagleye_rt/package.xml @@ -23,6 +23,7 @@ eagleye_msgs eagleye_coordinate eagleye_navigation + eagleye_tf diagnostic_updater tf2 tf2_ros diff --git a/eagleye_rt/src/tf_converted_imu.cpp b/eagleye_rt/src/tf_converted_imu.cpp index bd742040..43dd4f86 100644 --- a/eagleye_rt/src/tf_converted_imu.cpp +++ b/eagleye_rt/src/tf_converted_imu.cpp @@ -41,11 +41,11 @@ #else #include #endif -#include +#include #include -#include +#include -class TFConvertedIMU: public rclcpp::Node +class TFConvertedIMU : public rclcpp::Node { public: TFConvertedIMU(); @@ -65,14 +65,13 @@ class TFConvertedIMU: public rclcpp::Node std::string tf_base_link_frame_; void imu_callback(const sensor_msgs::msg::Imu::ConstSharedPtr msg); - }; TFConvertedIMU::TFConvertedIMU() : Node("eagleye_tf_converted_imu"), - clock_(RCL_ROS_TIME), - tfbuffer_(std::make_shared(clock_)), - tflistener_(tfbuffer_), - logger_(get_logger()) + clock_(RCL_ROS_TIME), + tfbuffer_(std::make_shared(clock_)), + tflistener_(tfbuffer_), + logger_(get_logger()) { std::string subscribe_imu_topic_name = "/imu/data_raw"; std::string publish_imu_topic_name = "imu/data_tf_converted"; @@ -85,27 +84,28 @@ TFConvertedIMU::TFConvertedIMU() : Node("eagleye_tf_converted_imu"), get_parameter("publish_imu_topic", publish_imu_topic_name); get_parameter("tf_gnss_frame.parent", tf_base_link_frame_); - std::cout<< "subscribe_imu_topic_name: " << subscribe_imu_topic_name << std::endl; - std::cout<< "publish_imu_topic_name: " << publish_imu_topic_name << std::endl; - std::cout<< "tf_base_link_frame: " << tf_base_link_frame_ << std::endl; + std::cout << "subscribe_imu_topic_name: " << subscribe_imu_topic_name << std::endl; + std::cout << "publish_imu_topic_name: " << publish_imu_topic_name << std::endl; + std::cout << "tf_base_link_frame: " << tf_base_link_frame_ << std::endl; - sub_ = create_subscription(subscribe_imu_topic_name, rclcpp::QoS(10), std::bind(&TFConvertedIMU::imu_callback, this, std::placeholders::_1)); + sub_ = create_subscription(subscribe_imu_topic_name, rclcpp::QoS(10), std::bind(&TFConvertedIMU::imu_callback, this, std::placeholders::_1)); pub_ = create_publisher("imu/data_tf_converted", rclcpp::QoS(10)); }; -TFConvertedIMU::~TFConvertedIMU(){}; +TFConvertedIMU::~TFConvertedIMU() {}; void TFConvertedIMU::imu_callback(const sensor_msgs::msg::Imu::ConstSharedPtr msg) { imu_ = *msg; tf_converted_imu_.header = imu_.header; - try { + try + { const geometry_msgs::msg::TransformStamped transform = tfbuffer_.lookupTransform( - tf_base_link_frame_, msg->header.frame_id, tf2::TimePointZero); + tf_base_link_frame_, msg->header.frame_id, tf2::TimePointZero); geometry_msgs::msg::Vector3Stamped angular_velocity, linear_acceleration, transformed_angular_velocity, transformed_linear_acceleration; - geometry_msgs::msg::Quaternion transformed_quaternion; + geometry_msgs::msg::Quaternion transformed_quaternion; angular_velocity.header = imu_.header; angular_velocity.vector = imu_.angular_velocity; @@ -126,8 +126,8 @@ void TFConvertedIMU::imu_callback(const sensor_msgs::msg::Imu::ConstSharedPtr ms tf_converted_imu_.linear_acceleration = transformed_linear_acceleration.vector; tf_converted_imu_.orientation = transformed_quaternion; - } - catch (tf2::TransformException& ex) + } + catch (tf2::TransformException &ex) { std::cout << "Failed to lookup transform" << std::endl; RCLCPP_WARN(rclcpp::get_logger("tf_converted_imu"), "Failed to lookup transform."); @@ -136,11 +136,11 @@ void TFConvertedIMU::imu_callback(const sensor_msgs::msg::Imu::ConstSharedPtr ms pub_->publish(tf_converted_imu_); }; -int main(int argc, char** argv) +int main(int argc, char **argv) { rclcpp::init(argc, argv); rclcpp::spin(std::make_shared()); return 0; -} \ No newline at end of file +} diff --git a/eagleye_util/geo_pose_fusion/package.xml b/eagleye_util/geo_pose_fusion/package.xml index 66c0170b..90f4aff6 100644 --- a/eagleye_util/geo_pose_fusion/package.xml +++ b/eagleye_util/geo_pose_fusion/package.xml @@ -23,6 +23,7 @@ ament_lint_auto ament_lint_common + ament_index_cpp tf2_geometry_msgs From fd01d91df6ae45b92f8c4dd37e73f2056dfab0d0 Mon Sep 17 00:00:00 2001 From: Ryohei Sasaki Date: Thu, 26 Mar 2026 18:22:48 +0900 Subject: [PATCH 2/2] ci: add jazzy build job --- .github/workflows/build.yml | 63 +++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11f9770c..e3460933 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: rosdep update run: | apt-get update @@ -41,4 +41,63 @@ jobs: cd ~/eagleye/ source /opt/ros/humble/setup.bash rosdep install --from-paths src --ignore-src -r -y - colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --catkin-skip-building-tests \ No newline at end of file + colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --catkin-skip-building-tests + + jazzy_build: + runs-on: ubuntu-24.04 + + container: ros:jazzy + services: + ros: + image: ros + + defaults: + run: + shell: bash + + steps: + - name: checkout + uses: actions/checkout@v4 + - name: rosdep update + run: | + apt-get update + rosdep update + - name: Create Workspace + run: | + mkdir -p ~/eagleye/src/ + cp -r "$(pwd)" ~/eagleye/src/ + - name: Clone rtklib_msgs + run: | + cd ~/eagleye/src/ + git clone https://github.com/MapIV/rtklib_ros_bridge.git -b ros2-v0.1.0 + - name: Clone llh_converter + run: | + cd ~/eagleye/src/ + git clone https://github.com/MapIV/llh_converter.git -b ros2 + - name: Patch llh_converter for Jazzy CI + run: | + python3 - <<'PY' + from pathlib import Path + + path = Path.home() / "eagleye/src/llh_converter/CMakeLists.txt" + text = path.read_text() + text = text.replace("${GeographicLib_INCLUDE_DIRS}", "${GeographicLib_INCLUDE_DIR}") + text = text.replace( + " PUBLIC\n $", + " PUBLIC\n ${GeographicLib_INCLUDE_DIR}\n $", + ) + text = text.replace( + "ament_export_include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)", + "ament_export_include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${GeographicLib_INCLUDE_DIR})", + ) + path.write_text(text) + PY + - name: Install GeographicLib + run: | + apt-get install -y libgeographiclib-dev geographiclib-tools geographiclib-doc + - name: Build + run: | + cd ~/eagleye/ + source /opt/ros/jazzy/setup.bash + rosdep install --from-paths src --ignore-src -r -y + colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --catkin-skip-building-tests