-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from NVIDIA-ISAAC-ROS/release-3.0
Isaac ROS 3.0.0
- Loading branch information
Showing
81 changed files
with
7,391 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
isaac_ros_gxf_extensions/gxf_isaac_ros_segment_anything/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES | ||
# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
cmake_minimum_required(VERSION 3.22.1) | ||
project(gxf_isaac_ros_segment_anything LANGUAGES C CXX) | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-fPIC -w) | ||
endif() | ||
|
||
# Dependencies | ||
find_package(ament_cmake_auto REQUIRED) | ||
ament_auto_find_build_dependencies() | ||
find_package(CUDAToolkit) | ||
find_package(yaml-cpp) | ||
find_package(isaac_ros_nitros_detection2_d_array_type REQUIRED) | ||
enable_language(CUDA) | ||
# Create extension | ||
ament_auto_add_library(${PROJECT_NAME} SHARED | ||
gxf/segment_anything/segment_anything_ext.cpp | ||
gxf/segment_anything/segment_anything_postprocessor.cpp | ||
gxf/segment_anything/segment_anything_postprocessor.hpp | ||
gxf/segment_anything/segment_anything_postprocessor.cu.cpp | ||
gxf/segment_anything/segment_anything_postprocessor.cu.hpp | ||
gxf/segment_anything/segment_anything_prompt_processor.cpp | ||
gxf/segment_anything/segment_anything_prompt_processor.hpp | ||
gxf/segment_anything/segment_anything_msg_compositor.cpp | ||
gxf/segment_anything/segment_anything_msg_compositor.hpp | ||
) | ||
|
||
# Mark as CUDA files with non-standard extensions | ||
set_source_files_properties( | ||
gxf/segment_anything/segment_anything_postprocessor.cu.cpp | ||
gxf/segment_anything/segment_anything_postprocessor.cu.hpp | ||
PROPERTIES LANGUAGE CUDA | ||
) | ||
target_link_libraries(${PROJECT_NAME} | ||
CUDA::cudart | ||
yaml-cpp | ||
) | ||
target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/gxf" | ||
${isaac_ros_nitros_detection2_d_array_type_INCLUDE_DIRS}) | ||
|
||
set_target_properties(${PROJECT_NAME} PROPERTIES | ||
BUILD_WITH_INSTALL_RPATH TRUE | ||
BUILD_RPATH_USE_ORIGIN TRUE | ||
INSTALL_RPATH_USE_LINK_PATH TRUE | ||
) | ||
|
||
# Install the binary file | ||
install(TARGETS ${PROJECT_NAME} DESTINATION share/${PROJECT_NAME}/gxf/lib) | ||
|
||
ament_auto_package(INSTALL_TO_SHARE) |
41 changes: 41 additions & 0 deletions
41
...f_extensions/gxf_isaac_ros_segment_anything/gxf/segment_anything/segment_anything_ext.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES | ||
// Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
#include "segment_anything_postprocessor.hpp" | ||
#include "segment_anything_prompt_processor.hpp" | ||
#include "segment_anything_msg_compositor.hpp" | ||
#include "gxf/std/extension_factory_helper.hpp" | ||
|
||
GXF_EXT_FACTORY_BEGIN() | ||
GXF_EXT_FACTORY_SET_INFO(0xa3ed574714ef4f11, 0xc127090d5b35a477, | ||
"SegmentAnythingExtension", | ||
"Isaac ROS Segmentation PostProcessor Extension", "NVIDIA", "0.0.1", | ||
"LICENSE"); | ||
|
||
GXF_EXT_FACTORY_ADD(0xe9681b9e1b864123, 0x8fc86530f45f9ab2, | ||
nvidia::isaac_ros::SegmentAnythingPostprocessor, nvidia::gxf::Codelet, | ||
"Generates a raw segmentation mask from a tensor"); | ||
GXF_EXT_FACTORY_ADD(0xe8211b9e1b864ab1, 0x2de86530f45f9cd3, | ||
nvidia::isaac_ros::SegmentAnythingPromptProcessor, nvidia::gxf::Codelet, | ||
"Transforms the input bboxes/points to SAM format."); | ||
GXF_EXT_FACTORY_ADD(0xe12acb9e1b8642ba, 0x34c86170f32f9abc, | ||
nvidia::isaac_ros::SegmentAnythingMsgCompositor, nvidia::gxf::Codelet, | ||
"Composes a single msg with all the received tensors."); | ||
GXF_EXT_FACTORY_ADD_0( | ||
0xa321601525594206, 0xbc12d9f22a134452, | ||
std::vector<nvidia::isaac_ros::Detection2D>, | ||
"Array of decoded 2D object detections in an image"); | ||
GXF_EXT_FACTORY_END() |
Oops, something went wrong.