|
1 | 1 | # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES |
2 | | -# Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +# Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
3 | 3 | # |
4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | # you may not use this file except in compliance with the License. |
|
15 | 15 | # |
16 | 16 | # SPDX-License-Identifier: Apache-2.0 |
17 | 17 |
|
18 | | -cmake_minimum_required(VERSION 3.23.2) |
19 | | -project(isaac_ros_centerpose LANGUAGES PYTHON) |
| 18 | +cmake_minimum_required(VERSION 3.22.1) |
| 19 | +project(isaac_ros_centerpose LANGUAGES C CXX) |
20 | 20 |
|
21 | 21 | if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") |
22 | 22 | add_compile_options(-Wall -Wextra -Wpedantic) |
23 | 23 | endif() |
24 | 24 |
|
25 | | -find_package(ament_cmake REQUIRED) |
26 | 25 | find_package(ament_cmake_auto REQUIRED) |
27 | | -find_package(ament_cmake_python REQUIRED) |
28 | | -find_package(rclpy REQUIRED) |
29 | 26 | ament_auto_find_build_dependencies() |
30 | 27 |
|
31 | | -# Install Python modules |
32 | | -ament_python_install_package(${PROJECT_NAME}) |
| 28 | +# Decoder node |
| 29 | +ament_auto_add_library(centerpose_decoder_node SHARED src/centerpose_decoder_node.cpp) |
| 30 | +rclcpp_components_register_nodes(centerpose_decoder_node "nvidia::isaac_ros::centerpose::CenterPoseDecoderNode") |
| 31 | +set(node_plugins "${node_plugins}nvidia::isaac_ros::centerpose::CenterPoseDecoderNode;$<TARGET_FILE:centerpose_decoder_node>\n") |
33 | 32 |
|
34 | | -# Install Python executables |
35 | | -install(PROGRAMS |
36 | | - isaac_ros_centerpose/CenterPoseDecoder.py |
37 | | - isaac_ros_centerpose/CenterPoseDecoderUtils.py |
38 | | - DESTINATION lib/${PROJECT_NAME} |
39 | | -) |
| 33 | +# Visualizer node |
| 34 | +ament_auto_add_library(centerpose_visualizer_node SHARED src/centerpose_visualizer_node.cpp) |
| 35 | +rclcpp_components_register_nodes(centerpose_visualizer_node "nvidia::isaac_ros::centerpose::CenterPoseVisualizerNode") |
| 36 | +set(node_plugins "${node_plugins}nvidia::isaac_ros::centerpose::CenterPoseVisualizerNode;$<TARGET_FILE:centerpose_visualizer_node>\n") |
40 | 37 |
|
41 | | -ament_auto_package() |
| 38 | +### Install extensions built from source |
| 39 | + |
| 40 | +# CenterPose |
| 41 | +add_subdirectory(gxf/centerpose) |
| 42 | +install(TARGETS gxf_centerpose DESTINATION share/${PROJECT_NAME}/gxf/lib/centerpose) |
| 43 | + |
| 44 | +### End extensions |
| 45 | +if(BUILD_TESTING) |
| 46 | + find_package(ament_lint_auto REQUIRED) |
| 47 | + ament_lint_auto_find_test_dependencies() |
| 48 | + |
| 49 | + # The FindPythonInterp and FindPythonLibs modules are removed |
| 50 | + if(POLICY CMP0148) |
| 51 | + cmake_policy(SET CMP0148 OLD) |
| 52 | + endif() |
| 53 | + |
| 54 | + find_package(launch_testing_ament_cmake REQUIRED) |
| 55 | + add_launch_test(test/test_centerpose_pol.py TIMEOUT "600") |
| 56 | + add_launch_test(test/test_centerpose_pol_triton.py TIMEOUT "600") |
| 57 | +endif() |
| 58 | + |
| 59 | +ament_auto_package(INSTALL_TO_SHARE config launch) |
0 commit comments