diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9646e6f50..f80501d65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,30 +13,27 @@ jobs: steps: - name: Set up ROS ecosystem uses: ros-tooling/setup-ros@v0.7 + - name: Check out repository uses: actions/checkout@v3 + - name: Configure git to trust repository run: git config --global --add safe.directory /__w/bitbots_meta/bitbots_meta - - name: Pull our software - run: make pull-init HTTPS=true - - name: Install proprietary basler drivers - run: make basler ARGS="-ci" - - name: Install packages via rosdep - run: | - rosdep update - sudo apt install -y libunwind-dev - # Small hack to make rosdep install all dependencies at once - # See https://github.com/ros-infrastructure/rosdep/issues/671 - bash -c "sudo apt install -y $(rosdep check --from-paths . --ignore-src --rosdistro iron | sed -n 's/^apt\s\+//p' | tr '\n' ' ')" + + - name: Pull source code for libraries and install dependencies + run: make install HTTPS=true ARGS="-ci" + - name: Set up colcon workspace run: | mkdir -p /colcon_ws/src ln -s $(realpath .) /colcon_ws/src/bitbots_meta + - name: Build packages run: | . /opt/ros/iron/setup.sh colcon build --symlink-install working-directory: /colcon_ws + - name: Test packages run: | # Source workspace diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1ca4bb20f..b6d200d59 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,25 +1,30 @@ repos: -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.6 - hooks: - - id: ruff - args: - - "--fix" - - "--exit-non-zero-on-fix" -- repo: https://github.com/psf/black - rev: 23.10.0 # keep this version for Ubuntu support - hooks: - - id: black -- repo: https://github.com/pocc/pre-commit-hooks - rev: v1.3.5 - hooks: - - id: clang-format - args: - - "-i" - - id: cppcheck - args: - - "--suppress=missingInclude" - - "--suppress=unmatchedSuppression" - - "--suppress=unusedFunction" - - "--suppress=unusedStructMember" - - "--suppress=useStlAlgorithm" + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.6 + hooks: + - id: ruff + args: + - "--fix" + - "--exit-non-zero-on-fix" + - repo: https://github.com/psf/black + rev: 23.10.0 # keep this version for Ubuntu support + hooks: + - id: black + - repo: https://github.com/pocc/pre-commit-hooks + rev: v1.3.5 + hooks: + - id: clang-format + args: + - "-i" + - id: cppcheck + args: + - "--suppress=missingInclude" + - "--suppress=unmatchedSuppression" + - "--suppress=unusedFunction" + - "--suppress=unusedStructMember" + - "--suppress=useStlAlgorithm" + - repo: https://github.com/cheshirekow/cmake-format-precommit + rev: v0.6.10 + hooks: + - id: cmake-format + - id: cmake-lint diff --git a/Makefile b/Makefile index 46ae20974..49d20f397 100644 --- a/Makefile +++ b/Makefile @@ -72,9 +72,7 @@ endif rosdep: # Update rosdep and install dependencies from meta directory rosdep update - # Small hack to make rosdep install all dependencies at once - # See https://github.com/ros-infrastructure/rosdep/issues/671 - bash -c "sudo apt install -y $(rosdep check --from-paths . --ignore-src --rosdistro iron | sed -n 's/^apt\s\+//p' | tr '\n' ' ')" + rosdep install --from-paths . --ignore-src --rosdistro iron -y status: # Show status of all repositories diff --git a/bitbots_behavior/bitbots_blackboard/CMakeLists.txt b/bitbots_behavior/bitbots_blackboard/CMakeLists.txt index c302e64f7..be7e5dad5 100644 --- a/bitbots_behavior/bitbots_blackboard/CMakeLists.txt +++ b/bitbots_behavior/bitbots_blackboard/CMakeLists.txt @@ -18,28 +18,47 @@ find_package(std_srvs REQUIRED) find_package(geometry_msgs REQUIRED) find_package(bitbots_docs REQUIRED) -set(INCLUDE_DIRS ${bio_ik_msgs_INCLUDE_DIRS} ${ament_cmake_INCLUDE_DIRS} - ${sensor_msgs_INCLUDE_DIRS} - ${rclpy_INCLUDE_DIRS} ${tf2_INCLUDE_DIRS} ${bitbots_msgs_INCLUDE_DIRS} - ${std_msgs_INCLUDE_DIRS} ${tf2_geometry_msgs_INCLUDE_DIRS} - ${std_srvs_INCLUDE_DIRS} ${geometry_msgs_INCLUDE_DIRS} - ${bitbots_docs_INCLUDE_DIRS}) +set(INCLUDE_DIRS + ${bio_ik_msgs_INCLUDE_DIRS} + ${ament_cmake_INCLUDE_DIRS} + ${sensor_msgs_INCLUDE_DIRS} + ${rclpy_INCLUDE_DIRS} + ${tf2_INCLUDE_DIRS} + ${bitbots_msgs_INCLUDE_DIRS} + ${std_msgs_INCLUDE_DIRS} + ${tf2_geometry_msgs_INCLUDE_DIRS} + ${std_srvs_INCLUDE_DIRS} + ${geometry_msgs_INCLUDE_DIRS} + ${bitbots_docs_INCLUDE_DIRS}) include_directories(${INCLUDE_DIRS}) -set(LIBRARY_DIRS ${bio_ik_msgs_LIBRARY_DIRS} ${ament_cmake_LIBRARY_DIRS} - ${sensor_msgs_LIBRARY_DIRS} - ${rclpy_LIBRARY_DIRS} ${tf2_LIBRARY_DIRS} ${bitbots_msgs_LIBRARY_DIRS} - ${std_msgs_LIBRARY_DIRS} ${tf2_geometry_msgs_LIBRARY_DIRS} - ${std_srvs_LIBRARY_DIRS} ${geometry_msgs_LIBRARY_DIRS} - ${bitbots_docs_LIBRARY_DIRS}) +set(LIBRARY_DIRS + ${bio_ik_msgs_LIBRARY_DIRS} + ${ament_cmake_LIBRARY_DIRS} + ${sensor_msgs_LIBRARY_DIRS} + ${rclpy_LIBRARY_DIRS} + ${tf2_LIBRARY_DIRS} + ${bitbots_msgs_LIBRARY_DIRS} + ${std_msgs_LIBRARY_DIRS} + ${tf2_geometry_msgs_LIBRARY_DIRS} + ${std_srvs_LIBRARY_DIRS} + ${geometry_msgs_LIBRARY_DIRS} + ${bitbots_docs_LIBRARY_DIRS}) link_directories(${LIBRARY_DIRS}) -set(LIBS ${bio_ik_msgs_LIBRARIES} ${ament_cmake_LIBRARIES} - ${sensor_msgs_LIBRARIES} ${rclpy_LIBRARIES} - ${tf2_LIBRARIES} ${bitbots_msgs_LIBRARIES} ${std_msgs_LIBRARIES} - ${tf2_geometry_msgs_LIBRARIES} ${std_srvs_LIBRARIES} ${geometry_msgs_LIBRARIES} - ${bitbots_docs_LIBRARIES}) +set(LIBS + ${bio_ik_msgs_LIBRARIES} + ${ament_cmake_LIBRARIES} + ${sensor_msgs_LIBRARIES} + ${rclpy_LIBRARIES} + ${tf2_LIBRARIES} + ${bitbots_msgs_LIBRARIES} + ${std_msgs_LIBRARIES} + ${tf2_geometry_msgs_LIBRARIES} + ${std_srvs_LIBRARIES} + ${geometry_msgs_LIBRARIES} + ${bitbots_docs_LIBRARIES}) include(${CMAKE_BINARY_DIR}/../bitbots_docs/enable_bitbots_docs.cmake) enable_bitbots_docs() diff --git a/bitbots_lowlevel/bitbots_buttons/CMakeLists.txt b/bitbots_lowlevel/bitbots_buttons/CMakeLists.txt index 2cc9bd8e0..6cd593859 100644 --- a/bitbots_lowlevel/bitbots_buttons/CMakeLists.txt +++ b/bitbots_lowlevel/bitbots_buttons/CMakeLists.txt @@ -17,22 +17,21 @@ find_package(std_srvs REQUIRED) find_package(test_msgs REQUIRED) add_executable(button_node src/button_node.cpp) -ament_target_dependencies(button_node - ament_cmake - backward_ros - bitbots_msgs - bitbots_localization - rclcpp - std_msgs - std_srvs - test_msgs) - -#enable_bitbots_docs() - - -install(TARGETS button_node - DESTINATION lib/${PROJECT_NAME}) -install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) +ament_target_dependencies( + button_node + ament_cmake + backward_ros + bitbots_msgs + bitbots_localization + rclcpp + std_msgs + std_srvs + test_msgs) + +# enable_bitbots_docs() + +install(TARGETS button_node DESTINATION lib/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) ament_export_dependencies(std_msgs) diff --git a/bitbots_lowlevel/bitbots_ros_control/CMakeLists.txt b/bitbots_lowlevel/bitbots_ros_control/CMakeLists.txt index e68a02983..b8c4f68b0 100644 --- a/bitbots_lowlevel/bitbots_ros_control/CMakeLists.txt +++ b/bitbots_lowlevel/bitbots_ros_control/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.5) project(bitbots_ros_control) # Add support for C++17 -if (NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 17) -endif () +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) +endif() find_package(ament_cmake REQUIRED) find_package(backward_ros REQUIRED) @@ -26,72 +26,72 @@ find_package(tf2_ros REQUIRED) find_package(transmission_interface REQUIRED) find_package(yaml-cpp REQUIRED) - set(INCLUDE_DIRS include) include_directories(${INCLUDE_DIRS}) set(CMAKE_CXX_STANDARD 17) add_compile_options(-Wall -Werror -Wno-unused -pedantic -Wextra) - set(SOURCES - src/bitfoot_hardware_interface.cpp - src/button_hardware_interface.cpp - src/core_hardware_interface.cpp - src/dynamixel_servo_hardware_interface.cpp - src/imu_hardware_interface.cpp - src/leds_hardware_interface.cpp - src/node.cpp - src/servo_bus_interface.cpp - src/utils.cpp - src/wolfgang_hardware_interface.cpp - include/bitbots_ros_control/hardware_interface.hpp) + src/bitfoot_hardware_interface.cpp + src/button_hardware_interface.cpp + src/core_hardware_interface.cpp + src/dynamixel_servo_hardware_interface.cpp + src/imu_hardware_interface.cpp + src/leds_hardware_interface.cpp + src/node.cpp + src/servo_bus_interface.cpp + src/utils.cpp + src/wolfgang_hardware_interface.cpp + include/bitbots_ros_control/hardware_interface.hpp) enable_bitbots_docs() add_executable(ros_control ${SOURCES}) -ament_target_dependencies(ros_control - ament_cmake - backward_ros - bitbots_buttons - bitbots_docs - bitbots_msgs - controller_interface - controller_manager - diagnostic_msgs - dynamixel_workbench_toolbox - hardware_interface - pluginlib - rclcpp - realtime_tools - rosidl_typesupport_cpp - std_msgs - std_srvs - tf2_ros - transmission_interface - yaml-cpp) +ament_target_dependencies( + ros_control + ament_cmake + backward_ros + bitbots_buttons + bitbots_docs + bitbots_msgs + controller_interface + controller_manager + diagnostic_msgs + dynamixel_workbench_toolbox + hardware_interface + pluginlib + rclcpp + realtime_tools + rosidl_typesupport_cpp + std_msgs + std_srvs + tf2_ros + transmission_interface + yaml-cpp) add_executable(pressure_converter src/pressure_converter.cpp) -ament_target_dependencies(pressure_converter - ament_cmake - backward_ros - bitbots_buttons - bitbots_docs - bitbots_msgs - controller_interface - controller_manager - diagnostic_msgs - dynamixel_workbench_toolbox - hardware_interface - pluginlib - rclcpp - realtime_tools - rosidl_typesupport_cpp - std_msgs - std_srvs - tf2_ros - transmission_interface - yaml-cpp) +ament_target_dependencies( + pressure_converter + ament_cmake + backward_ros + bitbots_buttons + bitbots_docs + bitbots_msgs + controller_interface + controller_manager + diagnostic_msgs + dynamixel_workbench_toolbox + hardware_interface + pluginlib + rclcpp + realtime_tools + rosidl_typesupport_cpp + std_msgs + std_srvs + tf2_ros + transmission_interface + yaml-cpp) target_link_libraries(pressure_converter yaml-cpp) ament_export_dependencies(ament_cmake) @@ -108,14 +108,11 @@ ament_export_dependencies(std_msgs) ament_export_dependencies(tf2_ros) ament_export_dependencies(transmission_interface) -install(TARGETS ros_control - DESTINATION lib/${PROJECT_NAME}) -install(TARGETS pressure_converter +install(TARGETS ros_control DESTINATION lib/${PROJECT_NAME}) +install(TARGETS pressure_converter DESTINATION lib/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY scripts/ USE_SOURCE_PERMISSIONS DESTINATION lib/${PROJECT_NAME}) -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY scripts/ USE_SOURCE_PERMISSIONS DESTINATION lib/${PROJECT_NAME}) ament_package() diff --git a/bitbots_misc/bitbots_basler_camera/CMakeLists.txt b/bitbots_misc/bitbots_basler_camera/CMakeLists.txt index 2bc61a56c..e94d25096 100644 --- a/bitbots_misc/bitbots_basler_camera/CMakeLists.txt +++ b/bitbots_misc/bitbots_basler_camera/CMakeLists.txt @@ -6,10 +6,8 @@ find_package(ament_cmake REQUIRED) enable_bitbots_docs() -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) ament_package() diff --git a/bitbots_misc/bitbots_bringup/CMakeLists.txt b/bitbots_misc/bitbots_bringup/CMakeLists.txt index 975e8867f..5d88b4365 100644 --- a/bitbots_misc/bitbots_bringup/CMakeLists.txt +++ b/bitbots_misc/bitbots_bringup/CMakeLists.txt @@ -7,7 +7,6 @@ find_package(ament_cmake_python REQUIRED) enable_bitbots_docs() -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) ament_package() diff --git a/bitbots_misc/bitbots_ceiling_cam/CMakeLists.txt b/bitbots_misc/bitbots_ceiling_cam/CMakeLists.txt index c034862ff..9034971c2 100644 --- a/bitbots_misc/bitbots_ceiling_cam/CMakeLists.txt +++ b/bitbots_misc/bitbots_ceiling_cam/CMakeLists.txt @@ -6,10 +6,8 @@ find_package(ament_cmake REQUIRED) enable_bitbots_docs() -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) ament_package() diff --git a/bitbots_misc/bitbots_docs/CMakeLists.txt b/bitbots_misc/bitbots_docs/CMakeLists.txt index 529bdf8db..aa6cc8b8e 100644 --- a/bitbots_misc/bitbots_docs/CMakeLists.txt +++ b/bitbots_misc/bitbots_docs/CMakeLists.txt @@ -3,14 +3,15 @@ project(bitbots_docs) find_package(ament_cmake REQUIRED) -# the good way would be to install the files there instead of copying them -# but then, we can't build the documentation in this package +# the good way would be to install the files there instead of copying them but +# then, we can't build the documentation in this package file(COPY files DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}) -# we cannot use the compiled catkin package of bitbots_docs since that would require this package to depend on itself. -# therefore we need to compile the sub cmake file ourselves and include it manualy +# we cannot use the compiled catkin package of bitbots_docs since that would +# require this package to depend on itself. therefore we need to compile the sub +# cmake file ourselves and include it manualy configure_file(cmake/enable_bitbots_docs.cmake.in - ${CMAKE_BINARY_DIR}/enable_bitbots_docs.cmake @ONLY) + ${CMAKE_BINARY_DIR}/enable_bitbots_docs.cmake @ONLY) include(${CMAKE_BINARY_DIR}/enable_bitbots_docs.cmake) enable_bitbots_docs() diff --git a/bitbots_misc/bitbots_extrinsic_calibration/CMakeLists.txt b/bitbots_misc/bitbots_extrinsic_calibration/CMakeLists.txt index 6692a77e0..1dfc02d76 100644 --- a/bitbots_misc/bitbots_extrinsic_calibration/CMakeLists.txt +++ b/bitbots_misc/bitbots_extrinsic_calibration/CMakeLists.txt @@ -23,7 +23,8 @@ add_compile_options(-Wall -Werror -Wno-unused) add_executable(extrinsic_calibration src/extrinsic_calibration.cpp) -ament_target_dependencies(extrinsic_calibration +ament_target_dependencies( + extrinsic_calibration ament_cmake bitbots_docs rclcpp @@ -31,18 +32,14 @@ ament_target_dependencies(extrinsic_calibration tf2 tf2_geometry_msgs tf2_ros - rot_conv -) + rot_conv) enable_bitbots_docs() -install(TARGETS extrinsic_calibration - DESTINATION lib/${PROJECT_NAME}) +install(TARGETS extrinsic_calibration DESTINATION lib/${PROJECT_NAME}) -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) ament_package() diff --git a/bitbots_misc/bitbots_ipm/CMakeLists.txt b/bitbots_misc/bitbots_ipm/CMakeLists.txt index add2a6795..14b3edc6a 100644 --- a/bitbots_misc/bitbots_ipm/CMakeLists.txt +++ b/bitbots_misc/bitbots_ipm/CMakeLists.txt @@ -3,10 +3,8 @@ project(bitbots_ipm) find_package(ament_cmake REQUIRED) -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) ament_package() diff --git a/bitbots_misc/bitbots_robot_description/CMakeLists.txt b/bitbots_misc/bitbots_robot_description/CMakeLists.txt index c192f1a35..060c6f2ff 100644 --- a/bitbots_misc/bitbots_robot_description/CMakeLists.txt +++ b/bitbots_misc/bitbots_robot_description/CMakeLists.txt @@ -4,7 +4,6 @@ project(bitbots_robot_description) find_package(bitbots_docs REQUIRED) find_package(ament_cmake REQUIRED) - set(INCLUDE_DIRS include) include_directories(${INCLUDE_DIRS}) @@ -13,7 +12,6 @@ add_compile_options(-Wall -Werror -Wno-unused -pedantic -Wextra) enable_bitbots_docs() -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) ament_package() diff --git a/bitbots_misc/bitbots_tf_listener/CMakeLists.txt b/bitbots_misc/bitbots_tf_listener/CMakeLists.txt index 37ed33aad..b4bd97909 100644 --- a/bitbots_misc/bitbots_tf_listener/CMakeLists.txt +++ b/bitbots_misc/bitbots_tf_listener/CMakeLists.txt @@ -20,27 +20,16 @@ find_package(rcl REQUIRED) add_compile_options(-Wall -Wno-unused) -pybind11_add_module(cpp_wrapper SHARED - src/bitbots_tf_listener.cpp -) +pybind11_add_module(cpp_wrapper SHARED src/bitbots_tf_listener.cpp) -ament_target_dependencies(cpp_wrapper PUBLIC - rclcpp - rcl - tf2 - tf2_ros -) +ament_target_dependencies(cpp_wrapper PUBLIC rclcpp rcl tf2 tf2_ros) -target_link_libraries(cpp_wrapper PRIVATE - pybind11::module -) +target_link_libraries(cpp_wrapper PRIVATE pybind11::module) ament_python_install_package(${PROJECT_NAME}) ament_get_python_install_dir(PYTHON_INSTALL_DIR) -install(TARGETS cpp_wrapper - DESTINATION "${PYTHON_INSTALL_DIR}/${PROJECT_NAME}" -) +install(TARGETS cpp_wrapper DESTINATION "${PYTHON_INSTALL_DIR}/${PROJECT_NAME}") ament_package() diff --git a/bitbots_misc/bitbots_utils/CMakeLists.txt b/bitbots_misc/bitbots_utils/CMakeLists.txt index 0e65f4c31..f5a22aaf1 100644 --- a/bitbots_misc/bitbots_utils/CMakeLists.txt +++ b/bitbots_misc/bitbots_utils/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.5) project(bitbots_utils) # Add support for C++17 -if (NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 17) -endif () +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) +endif() find_package(bitbots_docs REQUIRED) find_package(ament_cmake REQUIRED) @@ -26,11 +26,9 @@ add_compile_options(-Wall -Werror -Wno-unused -pedantic -Wextra) add_library(${PROJECT_NAME} src/utils.cpp) # Add dependencies to cpp library -ament_target_dependencies(${PROJECT_NAME} - rclcpp - tf2_ros) +ament_target_dependencies(${PROJECT_NAME} rclcpp tf2_ros) -ament_export_dependencies(rclcpp) +ament_export_dependencies(rclcpp) ament_export_include_directories(${INCLUDE_DIRS}) ament_export_libraries(${PROJECT_NAME}) @@ -40,35 +38,26 @@ ament_python_install_package(${PROJECT_NAME}) # CPP Script install add_executable(tf_delay_plot scripts/tf_delay_plot.cpp) -ament_target_dependencies(tf_delay_plot - ament_cmake - rclcpp - tf2_msgs - std_msgs) +ament_target_dependencies(tf_delay_plot ament_cmake rclcpp tf2_msgs std_msgs) -install(TARGETS tf_delay_plot - DESTINATION lib/${PROJECT_NAME}) +install(TARGETS tf_delay_plot DESTINATION lib/${PROJECT_NAME}) - - # Copy config and launch files -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) + +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY scripts/ USE_SOURCE_PERMISSIONS + DESTINATION lib/${PROJECT_NAME}) -install(DIRECTORY scripts/ - USE_SOURCE_PERMISSIONS - DESTINATION lib/${PROJECT_NAME}) +# Install library +install(DIRECTORY include/ DESTINATION include) -# Install library -install(DIRECTORY include/ - DESTINATION include) +install( + TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME} + LIBRARY DESTINATION lib + INCLUDES + DESTINATION include) -install(TARGETS ${PROJECT_NAME} - EXPORT ${PROJECT_NAME} - LIBRARY DESTINATION lib - INCLUDES DESTINATION include) - ament_package() diff --git a/bitbots_motion/bitbots_dynamic_kick/CMakeLists.txt b/bitbots_motion/bitbots_dynamic_kick/CMakeLists.txt index 405825b00..fb4787aed 100644 --- a/bitbots_motion/bitbots_dynamic_kick/CMakeLists.txt +++ b/bitbots_motion/bitbots_dynamic_kick/CMakeLists.txt @@ -2,11 +2,10 @@ cmake_minimum_required(VERSION 3.5) project(bitbots_dynamic_kick) # Add support for C++17 -if (NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 17) -endif () +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) +endif() -#find_package(bitbots_test REQUIRED) find_package(ament_cmake REQUIRED) find_package(bitbots_docs REQUIRED) find_package(biped_interfaces REQUIRED) @@ -30,90 +29,62 @@ find_package(backward_ros REQUIRED) find_package(PythonLibs COMPONENTS Interpreter Development) -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/KickDebug.msg" - DEPENDENCIES - std_msgs - geometry_msgs - Python3) +rosidl_generate_interfaces(${PROJECT_NAME} "msg/KickDebug.msg" DEPENDENCIES + std_msgs geometry_msgs Python3) set(INCLUDE_DIRS include ${PYTHON_INCLUDE_DIRS}) include_directories(${INCLUDE_DIRS}) add_compile_options(-Wall -Werror -Wno-unused) -set(SOURCES - src/kick_node.cpp - src/kick_engine.cpp - src/stabilizer.cpp - src/visualizer.cpp - src/kick_ik.cpp) +set(SOURCES src/kick_node.cpp src/kick_engine.cpp src/stabilizer.cpp + src/visualizer.cpp src/kick_ik.cpp) add_executable(KickNode ${SOURCES}) -ament_target_dependencies(KickNode - ament_cmake - biped_interfaces - bitbots_msgs - bitbots_splines - control_msgs - control_toolbox - geometry_msgs - moveit_ros_planning_interface - rclcpp - rot_conv - sensor_msgs - std_msgs - tf2 - tf2_eigen - tf2_geometry_msgs - tf2_ros - Eigen3) - -rosidl_get_typesupport_target(cpp_typesupport_target - ${PROJECT_NAME} "rosidl_typesupport_cpp") +ament_target_dependencies( + KickNode + ament_cmake + biped_interfaces + bitbots_msgs + bitbots_splines + control_msgs + control_toolbox + geometry_msgs + moveit_ros_planning_interface + rclcpp + rot_conv + sensor_msgs + std_msgs + tf2 + tf2_eigen + tf2_geometry_msgs + tf2_ros + Eigen3) + +rosidl_get_typesupport_target(cpp_typesupport_target ${PROJECT_NAME} + "rosidl_typesupport_cpp") target_link_libraries(KickNode "${cpp_typesupport_target}") - # create the kick python wrapper -#pybind11_add_module(py_dynamic_kick SHARED -# src/walk_pywrapper.cpp ${SOURCES}) -#ament_target_dependencies(py_dynamic_kick PUBLIC -# ament_cmake -# biped_interfaces -# bitbots_msgs -# bitbots_splines -# control_msgs -# control_toolbox -# geometry_msgs -# moveit_ros_planning_interface -# rclcpp -# ros2_python_extension -# rot_conv -# sensor_msgs -# std_msgs -# tf2 -# tf2_eigen -# tf2_geometry_msgs -# tf2_ros) -#target_link_libraries(py_dynamic_kick PRIVATE "${cpp_typesupport_target}") - -#ament_python_install_package(bitbots_dynamic_kick_py) - -#install(TARGETS py_dynamic_kick -# DESTINATION "${PYTHON_INSTALL_DIR}/bitbots_quintic_walk_py" -# ) - - - -#if (BUILD_TESTING) -# enable_bitbots_tests() -#endif () +# pybind11_add_module(py_dynamic_kick SHARED src/walk_pywrapper.cpp ${SOURCES}) +# ament_target_dependencies(py_dynamic_kick PUBLIC ament_cmake biped_interfaces +# bitbots_msgs bitbots_splines control_msgs control_toolbox geometry_msgs +# moveit_ros_planning_interface rclcpp ros2_python_extension rot_conv +# sensor_msgs std_msgs tf2 tf2_eigen tf2_geometry_msgs tf2_ros) +# target_link_libraries(py_dynamic_kick PRIVATE "${cpp_typesupport_target}") + +# ament_python_install_package(bitbots_dynamic_kick_py) + +# install(TARGETS py_dynamic_kick DESTINATION +# "${PYTHON_INSTALL_DIR}/bitbots_quintic_walk_py" ) + enable_bitbots_docs() -install(DIRECTORY scripts USE_SOURCE_PERMISSIONS DESTINATION lib/${PROJECT_NAME}) +install(DIRECTORY scripts USE_SOURCE_PERMISSIONS + DESTINATION lib/${PROJECT_NAME}) install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) install(TARGETS KickNode DESTINATION lib/${PROJECT_NAME}) diff --git a/bitbots_motion/bitbots_dynup/CMakeLists.txt b/bitbots_motion/bitbots_dynup/CMakeLists.txt index 244bcdfef..ddaab538c 100644 --- a/bitbots_motion/bitbots_dynup/CMakeLists.txt +++ b/bitbots_motion/bitbots_dynup/CMakeLists.txt @@ -2,14 +2,13 @@ cmake_minimum_required(VERSION 3.5) project(bitbots_dynup) # Add support for C++17 -if (NOT CMAKE_CXX_STANDARD) +if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) -endif () +endif() set(PYBIND11_PYTHON_VERSION 3) set(PYBIND11_FINDPYTHON ON) -#find_package(bitbots_test REQUIRED) find_package(ament_cmake REQUIRED) find_package(bitbots_msgs REQUIRED) find_package(bitbots_splines REQUIRED) @@ -33,98 +32,83 @@ find_package(ros2_python_extension REQUIRED) find_package(pybind11 REQUIRED) find_package(Python3 REQUIRED COMPONENTS Interpreter Development) -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/DynupEngineDebug.msg" - "msg/DynupPoses.msg" - DEPENDENCIES - std_msgs - geometry_msgs) +rosidl_generate_interfaces( + ${PROJECT_NAME} "msg/DynupEngineDebug.msg" "msg/DynupPoses.msg" DEPENDENCIES + std_msgs geometry_msgs) include_directories(include ${PYTHON_INCLUDE_DIRS}) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) add_compile_options(-Wall -Werror -Wno-unused -fPIC) -set(SOURCES src/dynup_engine.cpp - src/dynup_ik.cpp - src/dynup_node.cpp - src/dynup_pywrapper.cpp - src/dynup_stabilizer.cpp - src/visualizer.cpp) - +set(SOURCES src/dynup_engine.cpp src/dynup_ik.cpp src/dynup_node.cpp + src/dynup_pywrapper.cpp src/dynup_stabilizer.cpp src/visualizer.cpp) add_executable(DynupNode ${SOURCES}) -ament_target_dependencies(DynupNode - ament_cmake - bitbots_msgs - bitbots_splines - control_msgs - control_toolbox - geometry_msgs - moveit_ros_planning_interface - rclcpp - ros2_python_extension - rot_conv - sensor_msgs - std_msgs - tf2 - tf2_eigen - tf2_geometry_msgs - tf2_ros - Eigen3) - -rosidl_get_typesupport_target(cpp_typesupport_target - ${PROJECT_NAME} "rosidl_typesupport_cpp") +ament_target_dependencies( + DynupNode + ament_cmake + bitbots_msgs + bitbots_splines + control_msgs + control_toolbox + geometry_msgs + moveit_ros_planning_interface + rclcpp + ros2_python_extension + rot_conv + sensor_msgs + std_msgs + tf2 + tf2_eigen + tf2_geometry_msgs + tf2_ros + Eigen3) + +rosidl_get_typesupport_target(cpp_typesupport_target ${PROJECT_NAME} + "rosidl_typesupport_cpp") target_link_libraries(DynupNode "${cpp_typesupport_target}") - # create the lib -pybind11_add_module(libpy_dynup SHARED - src/dynup_pywrapper.cpp ${SOURCES}) -ament_target_dependencies(libpy_dynup PUBLIC - ament_cmake - bitbots_msgs - bitbots_splines - control_msgs - control_toolbox - geometry_msgs - moveit_ros_planning_interface - rclcpp - ros2_python_extension - rot_conv - sensor_msgs - std_msgs - tf2 - tf2_eigen - tf2_geometry_msgs - tf2_ros) +pybind11_add_module(libpy_dynup SHARED src/dynup_pywrapper.cpp ${SOURCES}) +ament_target_dependencies( + libpy_dynup + PUBLIC + ament_cmake + bitbots_msgs + bitbots_splines + control_msgs + control_toolbox + geometry_msgs + moveit_ros_planning_interface + rclcpp + ros2_python_extension + rot_conv + sensor_msgs + std_msgs + tf2 + tf2_eigen + tf2_geometry_msgs + tf2_ros) target_link_libraries(libpy_dynup PRIVATE "${cpp_typesupport_target}") ament_python_install_package(bitbots_dynup_py) install(TARGETS libpy_dynup - DESTINATION "${PYTHON_INSTALL_DIR}/bitbots_dynup_py" - ) - -#if(BUILD_TESTING) -# enable_bitbots_tests() -#endif() + DESTINATION "${PYTHON_INSTALL_DIR}/bitbots_dynup_py") enable_bitbots_docs() -install(TARGETS DynupNode - DESTINATION lib/${PROJECT_NAME}) - -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(TARGETS DynupNode DESTINATION lib/${PROJECT_NAME}) -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY scripts USE_SOURCE_PERMISSIONS DESTINATION lib/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY scripts USE_SOURCE_PERMISSIONS + DESTINATION lib/${PROJECT_NAME}) ament_package() diff --git a/bitbots_motion/bitbots_hcm/CMakeLists.txt b/bitbots_motion/bitbots_hcm/CMakeLists.txt index 0bb80a6ea..f9c7dc8a1 100644 --- a/bitbots_motion/bitbots_hcm/CMakeLists.txt +++ b/bitbots_motion/bitbots_hcm/CMakeLists.txt @@ -27,45 +27,52 @@ set(SOURCES src/hcm.cpp) add_executable(HCM ${SOURCES}) -ament_target_dependencies(HCM - ament_cmake - backward_ros - bitbots_msgs - builtin_interfaces - geometry_msgs - rclcpp - ros2_python_extension - sensor_msgs - std_msgs) +ament_target_dependencies( + HCM + ament_cmake + backward_ros + bitbots_msgs + builtin_interfaces + geometry_msgs + rclcpp + ros2_python_extension + sensor_msgs + std_msgs) target_link_libraries(HCM ${PYTHON_LIBRARIES}) enable_bitbots_docs() -install(TARGETS HCM - DESTINATION lib/${PROJECT_NAME}) +install(TARGETS HCM DESTINATION lib/${PROJECT_NAME}) -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY scripts/ USE_SOURCE_PERMISSIONS DESTINATION lib/${PROJECT_NAME}) +install(DIRECTORY scripts/ USE_SOURCE_PERMISSIONS + DESTINATION lib/${PROJECT_NAME}) -install(DIRECTORY bitbots_hcm/hcm_dsd/actions DESTINATION share/${PROJECT_NAME}/hcm_dsd FILES_MATCHING PATTERN "*.py") +install( + DIRECTORY bitbots_hcm/hcm_dsd/actions + DESTINATION share/${PROJECT_NAME}/hcm_dsd + FILES_MATCHING + PATTERN "*.py") -install(DIRECTORY bitbots_hcm/hcm_dsd/decisions DESTINATION share/${PROJECT_NAME}/hcm_dsd FILES_MATCHING PATTERN "*.py") +install( + DIRECTORY bitbots_hcm/hcm_dsd/decisions + DESTINATION share/${PROJECT_NAME}/hcm_dsd + FILES_MATCHING + PATTERN "*.py") -install(FILES bitbots_hcm/hcm_dsd/hcm.dsd DESTINATION share/${PROJECT_NAME}/hcm_dsd) +install(FILES bitbots_hcm/hcm_dsd/hcm.dsd + DESTINATION share/${PROJECT_NAME}/hcm_dsd) if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(hcm_py_test test/pytest - PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}" - APPEND_ENV PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR} - ) + ament_add_pytest_test( + hcm_py_test test/pytest PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}" APPEND_ENV + PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}) endif() ament_python_install_package(${PROJECT_NAME}) diff --git a/bitbots_motion/bitbots_head_mover/CMakeLists.txt b/bitbots_motion/bitbots_head_mover/CMakeLists.txt index 909e0c8ef..3fa26761b 100644 --- a/bitbots_motion/bitbots_head_mover/CMakeLists.txt +++ b/bitbots_motion/bitbots_head_mover/CMakeLists.txt @@ -25,19 +25,14 @@ find_package(tf2_ros REQUIRED) set(CMAKE_BUILD_TYPE Debug) -# uncomment the following section in order to fill in -# further dependencies manually. -# find_package( REQUIRED) +# uncomment the following section in order to fill in further dependencies +# manually. find_package( REQUIRED) generate_parameter_library( head_parameters # cmake target name for the parameter library config/head_config.yml) add_executable(move_head src/move_head.cpp) -target_link_libraries(move_head - rclcpp::rclcpp - head_parameters -) - +target_link_libraries(move_head rclcpp::rclcpp head_parameters) ament_target_dependencies( move_head @@ -57,14 +52,10 @@ ament_target_dependencies( tf2_kdl tf2_ros) -install(TARGETS - move_head - DESTINATION lib/${PROJECT_NAME}) +install(TARGETS move_head DESTINATION lib/${PROJECT_NAME}) -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) ament_package() diff --git a/bitbots_motion/bitbots_moveit_bindings/CMakeLists.txt b/bitbots_motion/bitbots_moveit_bindings/CMakeLists.txt index 576c25606..08708a75c 100644 --- a/bitbots_motion/bitbots_moveit_bindings/CMakeLists.txt +++ b/bitbots_motion/bitbots_moveit_bindings/CMakeLists.txt @@ -30,10 +30,11 @@ add_compile_options(-Wall -Wno-unused) enable_bitbots_docs() pybind11_add_module(libbitbots_moveit_bindings SHARED - src/bitbots_moveit_bindings.cpp -) + src/bitbots_moveit_bindings.cpp) -ament_target_dependencies(libbitbots_moveit_bindings PUBLIC +ament_target_dependencies( + libbitbots_moveit_bindings + PUBLIC backward_ros bio_ik bio_ik_msgs @@ -45,13 +46,11 @@ ament_target_dependencies(libbitbots_moveit_bindings PUBLIC ros2_python_extension tf2 tf2_ros - tf2_kdl -) + tf2_kdl) ament_python_install_package(${PROJECT_NAME}) install(TARGETS libbitbots_moveit_bindings - DESTINATION "${PYTHON_INSTALL_DIR}/${PROJECT_NAME}" -) + DESTINATION "${PYTHON_INSTALL_DIR}/${PROJECT_NAME}") ament_package() diff --git a/bitbots_motion/bitbots_odometry/CMakeLists.txt b/bitbots_motion/bitbots_odometry/CMakeLists.txt index 52e3a64f6..9ff8c552c 100644 --- a/bitbots_motion/bitbots_odometry/CMakeLists.txt +++ b/bitbots_motion/bitbots_odometry/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.5) project(bitbots_odometry) # Add support for C++17 -if (NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 17) -endif () +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) +endif() find_package(ament_cmake REQUIRED) find_package(biped_interfaces REQUIRED) @@ -23,10 +23,8 @@ find_package(tf2_eigen REQUIRED) find_package(tf2_geometry_msgs REQUIRED) find_package(tf2_ros REQUIRED) -generate_parameter_library( - odometry_parameters - config/odometry_config_template.yaml -) +generate_parameter_library(odometry_parameters + config/odometry_config_template.yaml) include_directories(include) @@ -35,13 +33,9 @@ add_compile_options(-Wall -Werror -Wno-unused) add_executable(odometry_fuser src/odometry_fuser.cpp) add_executable(motion_odometry src/motion_odometry.cpp) -target_link_libraries( - motion_odometry - rclcpp::rclcpp - odometry_parameters -) +target_link_libraries(motion_odometry rclcpp::rclcpp odometry_parameters) -## Specify libraries to link a library or executable target against +# Specify libraries to link a library or executable target against ament_target_dependencies( motion_odometry ament_cmake @@ -58,8 +52,7 @@ ament_target_dependencies( tf2 tf2_eigen tf2_geometry_msgs - tf2_ros -) + tf2_ros) ament_target_dependencies( odometry_fuser @@ -77,21 +70,16 @@ ament_target_dependencies( tf2 tf2_eigen tf2_geometry_msgs - tf2_ros -) + tf2_ros) enable_bitbots_docs() -install(TARGETS motion_odometry - DESTINATION lib/${PROJECT_NAME}) +install(TARGETS motion_odometry DESTINATION lib/${PROJECT_NAME}) -install(TARGETS odometry_fuser - DESTINATION lib/${PROJECT_NAME}) +install(TARGETS odometry_fuser DESTINATION lib/${PROJECT_NAME}) -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) ament_package() diff --git a/bitbots_motion/bitbots_quintic_walk/CMakeLists.txt b/bitbots_motion/bitbots_quintic_walk/CMakeLists.txt index fb0e87230..f27d8403f 100644 --- a/bitbots_motion/bitbots_quintic_walk/CMakeLists.txt +++ b/bitbots_motion/bitbots_quintic_walk/CMakeLists.txt @@ -2,13 +2,12 @@ cmake_minimum_required(VERSION 3.5) project(bitbots_quintic_walk) # Add support for C++17 -if (NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 17) -endif () +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) +endif() set(PYBIND11_PYTHON_VERSION 3) set(PYBIND11_FINDPYTHON ON) -#find_package(bitbots_test REQUIRED) find_package(ament_cmake REQUIRED) find_package(backward_ros REQUIRED) find_package(biped_interfaces REQUIRED) @@ -30,107 +29,96 @@ find_package(tf2_eigen REQUIRED) find_package(tf2_geometry_msgs REQUIRED) find_package(tf2_ros REQUIRED) - find_package(ros2_python_extension REQUIRED) find_package(pybind11 REQUIRED) find_package(Python3 REQUIRED COMPONENTS Interpreter Development) -generate_parameter_library( - bitbots_quintic_walk_parameters - src/parameters.yaml -) +generate_parameter_library(bitbots_quintic_walk_parameters src/parameters.yaml) -rosidl_generate_interfaces(${PROJECT_NAME} - "msg/WalkDebug.msg" - "msg/WalkEngineDebug.msg" - DEPENDENCIES - std_msgs - geometry_msgs - Python3) +rosidl_generate_interfaces( + ${PROJECT_NAME} + "msg/WalkDebug.msg" + "msg/WalkEngineDebug.msg" + DEPENDENCIES + std_msgs + geometry_msgs + Python3) include_directories(include ${PYTHON_INCLUDE_DIRS}) add_compile_options(-Wall -Werror -Wno-unused) -set(SOURCES src/walk_visualizer.cpp - src/walk_engine.cpp - src/walk_stabilizer.cpp - src/walk_ik.cpp - src/walk_node.cpp) +set(SOURCES src/walk_visualizer.cpp src/walk_engine.cpp src/walk_stabilizer.cpp + src/walk_ik.cpp src/walk_node.cpp) add_executable(WalkNode ${SOURCES}) -ament_target_dependencies(WalkNode - ament_cmake - backward_ros - biped_interfaces - bitbots_msgs - bitbots_splines - control_msgs - control_toolbox - geometry_msgs - moveit_ros_planning_interface - nav_msgs - rclcpp - rot_conv - sensor_msgs - std_msgs - tf2 - tf2_eigen - tf2_geometry_msgs - tf2_ros) - -rosidl_get_typesupport_target(cpp_typesupport_target - ${PROJECT_NAME} "rosidl_typesupport_cpp") - -target_link_libraries(WalkNode "${cpp_typesupport_target}" bitbots_quintic_walk_parameters) - +ament_target_dependencies( + WalkNode + ament_cmake + backward_ros + biped_interfaces + bitbots_msgs + bitbots_splines + control_msgs + control_toolbox + geometry_msgs + moveit_ros_planning_interface + nav_msgs + rclcpp + rot_conv + sensor_msgs + std_msgs + tf2 + tf2_eigen + tf2_geometry_msgs + tf2_ros) + +rosidl_get_typesupport_target(cpp_typesupport_target ${PROJECT_NAME} + "rosidl_typesupport_cpp") + +target_link_libraries(WalkNode "${cpp_typesupport_target}" + bitbots_quintic_walk_parameters) # create the lib -pybind11_add_module(libpy_quintic_walk SHARED - src/walk_pywrapper.cpp ${SOURCES}) -ament_target_dependencies(libpy_quintic_walk PUBLIC - ament_cmake - biped_interfaces - bitbots_msgs - bitbots_splines - control_msgs - control_toolbox - geometry_msgs - moveit_ros_planning_interface - nav_msgs - rclcpp - ros2_python_extension - rot_conv - sensor_msgs - std_msgs - tf2 - tf2_eigen - tf2_geometry_msgs - tf2_ros) - -target_link_libraries(libpy_quintic_walk PRIVATE "${cpp_typesupport_target}" bitbots_quintic_walk_parameters) +pybind11_add_module(libpy_quintic_walk SHARED src/walk_pywrapper.cpp ${SOURCES}) +ament_target_dependencies( + libpy_quintic_walk + PUBLIC + ament_cmake + biped_interfaces + bitbots_msgs + bitbots_splines + control_msgs + control_toolbox + geometry_msgs + moveit_ros_planning_interface + nav_msgs + rclcpp + ros2_python_extension + rot_conv + sensor_msgs + std_msgs + tf2 + tf2_eigen + tf2_geometry_msgs + tf2_ros) + +target_link_libraries( + libpy_quintic_walk PRIVATE "${cpp_typesupport_target}" + bitbots_quintic_walk_parameters) ament_python_install_package(bitbots_quintic_walk_py) install(TARGETS libpy_quintic_walk - DESTINATION "${PYTHON_INSTALL_DIR}/bitbots_quintic_walk_py" - ) - -#if(BUILD_TESTING) -# enable_bitbots_tests() -#endif() + DESTINATION "${PYTHON_INSTALL_DIR}/bitbots_quintic_walk_py") enable_bitbots_docs() -install(TARGETS WalkNode - DESTINATION lib/${PROJECT_NAME}) - -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(TARGETS WalkNode DESTINATION lib/${PROJECT_NAME}) -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) ament_package() diff --git a/bitbots_motion/bitbots_quintic_walk/cmake/FindEigen.cmake b/bitbots_motion/bitbots_quintic_walk/cmake/FindEigen.cmake index 4d34848d6..185230a92 100644 --- a/bitbots_motion/bitbots_quintic_walk/cmake/FindEigen.cmake +++ b/bitbots_motion/bitbots_quintic_walk/cmake/FindEigen.cmake @@ -1,10 +1,9 @@ -find_path(Eigen_INCLUDE_DIR Eigen/Core - PATHS /usr/include/eigen3 /usr/local/include/eigen3) +find_path(Eigen_INCLUDE_DIR Eigen/Core PATHS /usr/include/eigen3 + /usr/local/include/eigen3) -set(Eigen_INCLUDE_DIRS ${Eigen_INCLUDE_DIR} ${Eigen_INCLUDE_DIR}/Eigen) +set(EIGEN_INCLUDE_DIRS ${Eigen_INCLUDE_DIR} ${Eigen_INCLUDE_DIR}/Eigen) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Eigen DEFAULT_MSG Eigen_INCLUDE_DIR) mark_as_advanced(Eigen_INCLUDE_DIR) - diff --git a/bitbots_motion/bitbots_rl_motion/CMakeLists.txt b/bitbots_motion/bitbots_rl_motion/CMakeLists.txt index 1d3e4cd50..78ed31086 100644 --- a/bitbots_motion/bitbots_rl_motion/CMakeLists.txt +++ b/bitbots_motion/bitbots_rl_motion/CMakeLists.txt @@ -12,16 +12,16 @@ find_package(ament_cmake REQUIRED) find_package(bitbots_docs REQUIRED) set(INCLUDE_DIRS ${rclpy_INCLUDE_DIRS} ${std_msgs_INCLUDE_DIRS} - ${ament_cmake_INCLUDE_DIRS} ${bitbots_docs_INCLUDE_DIRS}) + ${ament_cmake_INCLUDE_DIRS} ${bitbots_docs_INCLUDE_DIRS}) include_directories(${INCLUDE_DIRS}) set(LIBRARY_DIRS ${rclpy_LIBRARY_DIRS} ${std_msgs_LIBRARY_DIRS} - ${ament_cmake_LIBRARY_DIRS} ${bitbots_docs_LIBRARY_DIRS}) + ${ament_cmake_LIBRARY_DIRS} ${bitbots_docs_LIBRARY_DIRS}) link_directories(${LIBRARY_DIRS}) set(LIBS ${rclpy_LIBRARIES} ${std_msgs_LIBRARIES} ${ament_cmake_LIBRARIES} - ${bitbots_docs_LIBRARIES}) + ${bitbots_docs_LIBRARIES}) include(${CMAKE_BINARY_DIR}/../bitbots_docs/enable_bitbots_docs.cmake) enable_bitbots_docs() @@ -32,13 +32,10 @@ ament_export_dependencies(ament_cmake) ament_export_dependencies(bitbots_docs) ament_export_include_directories(${INCLUDE_DIRS}) -install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) install(DIRECTORY rl_walk_models DESTINATION share/${PROJECT_NAME}) - -install(PROGRAMS - scripts/rl_walk.py - DESTINATION lib/${PROJECT_NAME} ) +install(PROGRAMS scripts/rl_walk.py DESTINATION lib/${PROJECT_NAME}) ament_package() diff --git a/bitbots_motion/bitbots_splines/CMakeLists.txt b/bitbots_motion/bitbots_splines/CMakeLists.txt index ff628d591..dc1b991d5 100644 --- a/bitbots_motion/bitbots_splines/CMakeLists.txt +++ b/bitbots_motion/bitbots_splines/CMakeLists.txt @@ -24,38 +24,39 @@ add_compile_options(-Wall -Werror -Wno-unused) enable_bitbots_docs() -set(SOURCES src/Spline/polynom.cpp - src/Spline/smooth_spline.cpp - src/Spline/spline.cpp - src/Spline/pose_spline.cpp - src/Spline/position_spline.cpp - src/Utils/newton_binomial.cpp - src/Utils/combination.cpp) +set(SOURCES + src/Spline/polynom.cpp + src/Spline/smooth_spline.cpp + src/Spline/spline.cpp + src/Spline/pose_spline.cpp + src/Spline/position_spline.cpp + src/Utils/newton_binomial.cpp + src/Utils/combination.cpp) add_library(${PROJECT_NAME} SHARED ${SOURCES}) -ament_target_dependencies(${PROJECT_NAME} - ament_cmake - bitbots_docs - rclcpp - std_msgs - geometry_msgs - tf2_geometry_msgs - moveit_core - moveit_ros_planning - Eigen3 - PkgConfig -) +ament_target_dependencies( + ${PROJECT_NAME} + ament_cmake + bitbots_docs + rclcpp + std_msgs + geometry_msgs + tf2_geometry_msgs + moveit_core + moveit_ros_planning + Eigen3 + PkgConfig) ament_python_install_package(bitbots_splines) +install(DIRECTORY include/ DESTINATION include) -install(DIRECTORY include/ - DESTINATION include) - -install(TARGETS ${PROJECT_NAME} +install( + TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME} LIBRARY DESTINATION lib - INCLUDES DESTINATION include) + INCLUDES + DESTINATION include) ament_export_dependencies(ament_cmake) ament_export_dependencies(bitbots_docs) diff --git a/bitbots_msgs/CMakeLists.txt b/bitbots_msgs/CMakeLists.txt index 8d7879ead..11a237f8c 100644 --- a/bitbots_msgs/CMakeLists.txt +++ b/bitbots_msgs/CMakeLists.txt @@ -15,7 +15,8 @@ if(BUILD_TESTING) ament_lint_auto_find_test_dependencies() endif() -rosidl_generate_interfaces(${PROJECT_NAME} +rosidl_generate_interfaces( + ${PROJECT_NAME} "action/Dynup.action" "action/Kick.action" "action/LookAt.action" @@ -54,8 +55,7 @@ rosidl_generate_interfaces(${PROJECT_NAME} geometry_msgs sensor_msgs std_msgs - trajectory_msgs -) + trajectory_msgs) include(${CMAKE_BINARY_DIR}/../bitbots_docs/enable_bitbots_docs.cmake) enable_bitbots_docs() diff --git a/bitbots_navigation/bitbots_localization/CMakeLists.txt b/bitbots_navigation/bitbots_localization/CMakeLists.txt index 1e558a0a8..b52304e69 100644 --- a/bitbots_navigation/bitbots_localization/CMakeLists.txt +++ b/bitbots_navigation/bitbots_localization/CMakeLists.txt @@ -29,8 +29,7 @@ generate_parameter_library( src/parameters.yml) rosidl_generate_interfaces(${PROJECT_NAME} "srv/ResetFilter.srv" - "srv/SetPaused.srv" - DEPENDENCIES builtin_interfaces) + "srv/SetPaused.srv" DEPENDENCIES builtin_interfaces) include_directories(${INCLUDE_DIRS}) @@ -38,48 +37,53 @@ link_directories(${LIBRARY_DIRS}) set(LIBS ${ament_cmake_LIBRARIES}) -## Compile as C++17 +# Compile as C++17 add_compile_options(-Wall -Werror -Wno-unused) -## Find catkin macros and libraries -## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) -## is used, also find other catkin packages +# Find catkin macros and libraries if COMPONENTS list like find_package(catkin +# REQUIRED COMPONENTS xyz) is used, also find other catkin packages find_package(Eigen3 REQUIRED) find_package(OpenCV) -## Generate services in the 'srv' folder +# Generate services in the 'srv' folder -## Generate added messages and services with any dependencies listed here +# Generate added messages and services with any dependencies listed here include(${CMAKE_BINARY_DIR}/../bitbots_docs/enable_bitbots_docs.cmake) enable_bitbots_docs() -########### -## Build ## -########### +# ############################################################################## +# Build ## +# ############################################################################## -## Specify additional locations of header files -## Your package locations should be listed before other locations +# Specify additional locations of header files Your package locations should be +# listed before other locations include_directories(include) -## Declare a C++ library -set(SOURCES src/localization.cpp src/map.cpp src/MotionModel.cpp - src/ObservationModel.cpp src/RobotState.cpp src/StateDistribution.cpp - src/tools.cpp) - -## Add cmake target dependencies of the library -## as an example, code may need to be generated before libraries -## either from message generation or dynamic reconfigure#include "ObservationModel.h" - -## Declare a C++ executable -## With catkin_make all packages are built within a single CMake context -## The recommended prefix ensures that target names across packages don't collide +# Declare a C++ library +set(SOURCES + src/localization.cpp + src/map.cpp + src/MotionModel.cpp + src/ObservationModel.cpp + src/RobotState.cpp + src/StateDistribution.cpp + src/tools.cpp) + +# Add cmake target dependencies of the library as an example, code may need to +# be generated before libraries either from message generation or dynamic +# reconfigure#include "ObservationModel.h" + +# Declare a C++ executable With catkin_make all packages are built within a +# single CMake context The recommended prefix ensures that target names across +# packages don't collide add_executable(localization ${SOURCES}) -ament_target_dependencies(localization +ament_target_dependencies( + localization ament_cmake rclcpp Boost @@ -95,14 +99,14 @@ ament_target_dependencies(localization tf2_ros visualization_msgs) -rosidl_get_typesupport_target(cpp_typesupport_target - ${PROJECT_NAME} "rosidl_typesupport_cpp") +rosidl_get_typesupport_target(cpp_typesupport_target ${PROJECT_NAME} + "rosidl_typesupport_cpp") -target_link_libraries(localization "${cpp_typesupport_target}" localization_parameters) +target_link_libraries(localization "${cpp_typesupport_target}" + localization_parameters) -install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) install(TARGETS localization DESTINATION lib/${PROJECT_NAME}) - ament_package() diff --git a/bitbots_wolfgang/wolfgang_animations/CMakeLists.txt b/bitbots_wolfgang/wolfgang_animations/CMakeLists.txt index 9b5ef0ee4..309f55468 100644 --- a/bitbots_wolfgang/wolfgang_animations/CMakeLists.txt +++ b/bitbots_wolfgang/wolfgang_animations/CMakeLists.txt @@ -23,6 +23,6 @@ enable_bitbots_docs() ament_export_dependencies(ament_cmake) ament_export_include_directories(${INCLUDE_DIRS}) -install(DIRECTORY animations DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY animations DESTINATION share/${PROJECT_NAME}) ament_package() diff --git a/bitbots_wolfgang/wolfgang_description/CMakeLists.txt b/bitbots_wolfgang/wolfgang_description/CMakeLists.txt index 2512124d3..7cfdeef37 100644 --- a/bitbots_wolfgang/wolfgang_description/CMakeLists.txt +++ b/bitbots_wolfgang/wolfgang_description/CMakeLists.txt @@ -14,20 +14,35 @@ find_package(ament_cmake REQUIRED) find_package(tf2 REQUIRED) find_package(rclcpp REQUIRED) -set(INCLUDE_DIRS ${bitbots_docs_INCLUDE_DIRS} ${urdf_INCLUDE_DIRS} - ${xacro_INCLUDE_DIRS} ${sensor_msgs_INCLUDE_DIRS} ${ament_cmake_INCLUDE_DIRS} - ${tf2_INCLUDE_DIRS} ${rclcpp_INCLUDE_DIRS}) +set(INCLUDE_DIRS + ${bitbots_docs_INCLUDE_DIRS} + ${urdf_INCLUDE_DIRS} + ${xacro_INCLUDE_DIRS} + ${sensor_msgs_INCLUDE_DIRS} + ${ament_cmake_INCLUDE_DIRS} + ${tf2_INCLUDE_DIRS} + ${rclcpp_INCLUDE_DIRS}) include_directories(${INCLUDE_DIRS}) -set(LIBRARY_DIRS ${bitbots_docs_LIBRARY_DIRS} ${urdf_LIBRARY_DIRS} - ${xacro_LIBRARY_DIRS} ${sensor_msgs_LIBRARY_DIRS} ${ament_cmake_LIBRARY_DIRS} - ${tf2_LIBRARY_DIRS} ${rclcpp_LIBRARY_DIRS}) +set(LIBRARY_DIRS + ${bitbots_docs_LIBRARY_DIRS} + ${urdf_LIBRARY_DIRS} + ${xacro_LIBRARY_DIRS} + ${sensor_msgs_LIBRARY_DIRS} + ${ament_cmake_LIBRARY_DIRS} + ${tf2_LIBRARY_DIRS} + ${rclcpp_LIBRARY_DIRS}) link_directories(${LIBRARY_DIRS}) -set(LIBS ${bitbots_docs_LIBRARIES} ${urdf_LIBRARIES} ${xacro_LIBRARIES} - ${sensor_msgs_LIBRARIES} ${ament_cmake_LIBRARIES} ${tf2_LIBRARIES} - ${rclcpp_LIBRARIES}) +set(LIBS + ${bitbots_docs_LIBRARIES} + ${urdf_LIBRARIES} + ${xacro_LIBRARIES} + ${sensor_msgs_LIBRARIES} + ${ament_cmake_LIBRARIES} + ${tf2_LIBRARIES} + ${rclcpp_LIBRARIES}) include(${CMAKE_BINARY_DIR}/../bitbots_docs/enable_bitbots_docs.cmake) enable_bitbots_docs() @@ -41,12 +56,8 @@ ament_export_dependencies(tf2) ament_export_dependencies(rclcpp) ament_export_include_directories(${INCLUDE_DIRS}) -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY urdf - DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) - +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY urdf DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) ament_package() diff --git a/bitbots_wolfgang/wolfgang_moveit_config/CMakeLists.txt b/bitbots_wolfgang/wolfgang_moveit_config/CMakeLists.txt index 02bc97c7a..6c20803ab 100644 --- a/bitbots_wolfgang/wolfgang_moveit_config/CMakeLists.txt +++ b/bitbots_wolfgang/wolfgang_moveit_config/CMakeLists.txt @@ -22,7 +22,6 @@ install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) ament_export_dependencies(ament_cmake) ament_export_include_directories(${INCLUDE_DIRS}) -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) ament_package() diff --git a/bitbots_wolfgang/wolfgang_pybullet_sim/CMakeLists.txt b/bitbots_wolfgang/wolfgang_pybullet_sim/CMakeLists.txt index 1bd705eea..0ab119830 100644 --- a/bitbots_wolfgang/wolfgang_pybullet_sim/CMakeLists.txt +++ b/bitbots_wolfgang/wolfgang_pybullet_sim/CMakeLists.txt @@ -16,22 +16,41 @@ find_package(bitbots_docs REQUIRED) find_package(std_msgs REQUIRED) find_package(ament_cmake REQUIRED) -set(INCLUDE_DIRS ${nav_msgs_INCLUDE_DIRS} ${rclpy_INCLUDE_DIRS} - ${sensor_msgs_INCLUDE_DIRS} ${urdf_INCLUDE_DIRS} ${bitbots_msgs_INCLUDE_DIRS} - ${rosgraph_msgs_INCLUDE_DIRS} ${bitbots_docs_INCLUDE_DIRS} - ${std_msgs_INCLUDE_DIRS} ${ament_cmake_INCLUDE_DIRS}) +set(INCLUDE_DIRS + ${nav_msgs_INCLUDE_DIRS} + ${rclpy_INCLUDE_DIRS} + ${sensor_msgs_INCLUDE_DIRS} + ${urdf_INCLUDE_DIRS} + ${bitbots_msgs_INCLUDE_DIRS} + ${rosgraph_msgs_INCLUDE_DIRS} + ${bitbots_docs_INCLUDE_DIRS} + ${std_msgs_INCLUDE_DIRS} + ${ament_cmake_INCLUDE_DIRS}) include_directories(${INCLUDE_DIRS}) -set(LIBRARY_DIRS ${nav_msgs_LIBRARY_DIRS} ${rclpy_LIBRARY_DIRS} - ${sensor_msgs_LIBRARY_DIRS} ${urdf_LIBRARY_DIRS} ${bitbots_msgs_LIBRARY_DIRS} - ${rosgraph_msgs_LIBRARY_DIRS} ${bitbots_docs_LIBRARY_DIRS} - ${std_msgs_LIBRARY_DIRS} ${ament_cmake_LIBRARY_DIRS}) +set(LIBRARY_DIRS + ${nav_msgs_LIBRARY_DIRS} + ${rclpy_LIBRARY_DIRS} + ${sensor_msgs_LIBRARY_DIRS} + ${urdf_LIBRARY_DIRS} + ${bitbots_msgs_LIBRARY_DIRS} + ${rosgraph_msgs_LIBRARY_DIRS} + ${bitbots_docs_LIBRARY_DIRS} + ${std_msgs_LIBRARY_DIRS} + ${ament_cmake_LIBRARY_DIRS}) link_directories(${LIBRARY_DIRS}) -set(LIBS ${nav_msgs_LIBRARIES} ${rclpy_LIBRARIES} ${sensor_msgs_LIBRARIES} - ${urdf_LIBRARIES} ${bitbots_msgs_LIBRARIES} ${rosgraph_msgs_LIBRARIES} - ${bitbots_docs_LIBRARIES} ${std_msgs_LIBRARIES} ${ament_cmake_LIBRARIES}) +set(LIBS + ${nav_msgs_LIBRARIES} + ${rclpy_LIBRARIES} + ${sensor_msgs_LIBRARIES} + ${urdf_LIBRARIES} + ${bitbots_msgs_LIBRARIES} + ${rosgraph_msgs_LIBRARIES} + ${bitbots_docs_LIBRARIES} + ${std_msgs_LIBRARIES} + ${ament_cmake_LIBRARIES}) include(${CMAKE_BINARY_DIR}/../bitbots_docs/enable_bitbots_docs.cmake) enable_bitbots_docs() @@ -47,17 +66,13 @@ ament_export_dependencies(std_msgs) ament_export_dependencies(ament_cmake) ament_export_include_directories(${INCLUDE_DIRS}) -install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) install(DIRECTORY models DESTINATION share/${PROJECT_NAME}) ament_python_install_package(${PROJECT_NAME}) - -install(PROGRAMS - scripts/simulation_headless.py - scripts/simulation_with_gui.py - DESTINATION lib/${PROJECT_NAME} ) - +install(PROGRAMS scripts/simulation_headless.py scripts/simulation_with_gui.py + DESTINATION lib/${PROJECT_NAME}) ament_package() diff --git a/bitbots_wolfgang/wolfgang_webots_sim/CMakeLists.txt b/bitbots_wolfgang/wolfgang_webots_sim/CMakeLists.txt index 5c1576750..e93ad4a15 100644 --- a/bitbots_wolfgang/wolfgang_webots_sim/CMakeLists.txt +++ b/bitbots_wolfgang/wolfgang_webots_sim/CMakeLists.txt @@ -17,23 +17,44 @@ find_package(rclpy REQUIRED) find_package(sensor_msgs REQUIRED) find_package(gazebo_msgs REQUIRED) -set(INCLUDE_DIRS ${bitbots_msgs_INCLUDE_DIRS} ${rosgraph_msgs_INCLUDE_DIRS} - ${std_msgs_INCLUDE_DIRS} ${ament_cmake_INCLUDE_DIRS} - ${bitbots_docs_INCLUDE_DIRS} ${urdf_INCLUDE_DIRS} ${nav_msgs_INCLUDE_DIRS} - ${rclpy_INCLUDE_DIRS} ${sensor_msgs_INCLUDE_DIRS} ${gazebo_msgs_INCLUDE_DIRS}) +set(INCLUDE_DIRS + ${bitbots_msgs_INCLUDE_DIRS} + ${rosgraph_msgs_INCLUDE_DIRS} + ${std_msgs_INCLUDE_DIRS} + ${ament_cmake_INCLUDE_DIRS} + ${bitbots_docs_INCLUDE_DIRS} + ${urdf_INCLUDE_DIRS} + ${nav_msgs_INCLUDE_DIRS} + ${rclpy_INCLUDE_DIRS} + ${sensor_msgs_INCLUDE_DIRS} + ${gazebo_msgs_INCLUDE_DIRS}) include_directories(${INCLUDE_DIRS}) -set(LIBRARY_DIRS ${bitbots_msgs_LIBRARY_DIRS} ${rosgraph_msgs_LIBRARY_DIRS} - ${std_msgs_LIBRARY_DIRS} ${ament_cmake_LIBRARY_DIRS} - ${bitbots_docs_LIBRARY_DIRS} ${urdf_LIBRARY_DIRS} ${nav_msgs_LIBRARY_DIRS} - ${rclpy_LIBRARY_DIRS} ${sensor_msgs_LIBRARY_DIRS} ${gazebo_msgs_LIBRARY_DIRS}) +set(LIBRARY_DIRS + ${bitbots_msgs_LIBRARY_DIRS} + ${rosgraph_msgs_LIBRARY_DIRS} + ${std_msgs_LIBRARY_DIRS} + ${ament_cmake_LIBRARY_DIRS} + ${bitbots_docs_LIBRARY_DIRS} + ${urdf_LIBRARY_DIRS} + ${nav_msgs_LIBRARY_DIRS} + ${rclpy_LIBRARY_DIRS} + ${sensor_msgs_LIBRARY_DIRS} + ${gazebo_msgs_LIBRARY_DIRS}) link_directories(${LIBRARY_DIRS}) -set(LIBS ${bitbots_msgs_LIBRARIES} ${rosgraph_msgs_LIBRARIES} - ${std_msgs_LIBRARIES} ${ament_cmake_LIBRARIES} ${bitbots_docs_LIBRARIES} - ${urdf_LIBRARIES} ${nav_msgs_LIBRARIES} ${rclpy_LIBRARIES} - ${sensor_msgs_LIBRARIES} ${gazebo_msgs_LIBRARIES}) +set(LIBS + ${bitbots_msgs_LIBRARIES} + ${rosgraph_msgs_LIBRARIES} + ${std_msgs_LIBRARIES} + ${ament_cmake_LIBRARIES} + ${bitbots_docs_LIBRARIES} + ${urdf_LIBRARIES} + ${nav_msgs_LIBRARIES} + ${rclpy_LIBRARIES} + ${sensor_msgs_LIBRARIES} + ${gazebo_msgs_LIBRARIES}) include(${CMAKE_BINARY_DIR}/../bitbots_docs/enable_bitbots_docs.cmake) enable_bitbots_docs() @@ -50,18 +71,15 @@ ament_export_dependencies(sensor_msgs) ament_export_dependencies(gazebo_msgs) ament_export_include_directories(${INCLUDE_DIRS}) -install(DIRECTORY protos DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY worlds DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY protos DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY worlds DESTINATION share/${PROJECT_NAME}) install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) -install(PROGRAMS - scripts/fix_urdf_for_webots.py - scripts/imu_lut_gen.py - scripts/localization_faker.py - scripts/start_simulator.py - scripts/start_single.py - scripts/start_webots_ros_supervisor.py - DESTINATION lib/${PROJECT_NAME} ) +install( + PROGRAMS scripts/fix_urdf_for_webots.py scripts/imu_lut_gen.py + scripts/localization_faker.py scripts/start_simulator.py + scripts/start_single.py scripts/start_webots_ros_supervisor.py + DESTINATION lib/${PROJECT_NAME}) ament_python_install_package(${PROJECT_NAME}) diff --git a/humanoid_league_misc/humanoid_league_team_communication/CMakeLists.txt b/humanoid_league_misc/humanoid_league_team_communication/CMakeLists.txt index 704538717..d4b7de9e7 100644 --- a/humanoid_league_misc/humanoid_league_team_communication/CMakeLists.txt +++ b/humanoid_league_misc/humanoid_league_team_communication/CMakeLists.txt @@ -15,41 +15,49 @@ find_package(bitbots_docs REQUIRED) find_package(Protobuf REQUIRED) -protobuf_generate_python(PROTO_PY +protobuf_generate_python( + PROTO_PY humanoid_league_team_communication/RobocupProtocol/robocup_extension.proto) -add_custom_target(humanoid_league_team_communication ALL DEPENDS ${PROTO_PY}) -add_custom_command(TARGET humanoid_league_team_communication + +add_custom_target( + humanoid_league_team_communication ALL + DEPENDS ${PROTO_PY} + COMMENT "Generating protobuf") +add_custom_command( + TARGET humanoid_league_team_communication POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_PY} - ${CMAKE_SOURCE_DIR}/humanoid_league_team_communication) + ${CMAKE_SOURCE_DIR}/humanoid_league_team_communication + COMMENT "Copying protobuf to source dir") enable_bitbots_docs() ament_python_install_package(${PROJECT_NAME}) -install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY config - DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) install(DIRECTORY scripts/ USE_SOURCE_PERMISSIONS - DESTINATION lib/${PROJECT_NAME}) + DESTINATION lib/${PROJECT_NAME}) if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) # Find all python test files - file(GLOB_RECURSE _pytest_tests test/**/test_*.py) + file(GLOB_RECURSE pytest_tests_ test/**/test_*.py) # Add each test file to the ament test targets - foreach(_test_path ${_pytest_tests}) - get_filename_component(_test_name ${_test_path} NAME_WE) - ament_add_pytest_test(${_test_name} ${_test_path} - APPEND_ENV AMENT_PREFIX_INDEX=${ament_index_build_path} + foreach(test_path_ ${pytest_tests_}) + get_filename_component(test_name_ ${test_path_} NAME_WE) + ament_add_pytest_test( + ${test_name_} + ${test_path_} + APPEND_ENV + AMENT_PREFIX_INDEX=${ament_index_build_path} PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR} - TIMEOUT 60 - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" - ) + TIMEOUT + 60 + WORKING_DIRECTORY + "${CMAKE_SOURCE_DIR}") endforeach() endif() - ament_package()