cmake_minimum_required(VERSION 3.8) project(ros_midterm) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) endif() # find dependencies find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(std_msgs REQUIRED) find_package(sensor_msgs REQUIRED) find_package(geometry_msgs REQUIRED) # Added for cmd_pub add_executable(imu_sub src/imu_sub.cpp) ament_target_dependencies(imu_sub rclcpp std_msgs sensor_msgs) add_executable(cmd_pub src/cmd_pub.cpp) # Add your new node ament_target_dependencies(cmd_pub rclcpp geometry_msgs) target_include_directories(imu_sub PUBLIC $ $) target_compile_features(imu_sub PUBLIC c_std_99 cxx_std_17) target_include_directories(cmd_pub PUBLIC $ $) target_compile_features(cmd_pub PUBLIC c_std_99 cxx_std_17) install(TARGETS imu_sub cmd_pub # Install both executables DESTINATION lib/${PROJECT_NAME}) if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) set(ament_cmake_copyright_FOUND TRUE) set(ament_cmake_cpplint_FOUND TRUE) ament_lint_auto_find_test_dependencies() endif() ament_package()