Skip to content

Commit b847491

Browse files
Isaac ROS 3.0.0
1 parent d7548c9 commit b847491

22 files changed

+398
-212
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Isaac ROS Freespace Segmentation
22

3-
Hardware-accelerated, deep-learned freespace segmentation
3+
NVIDIA-accelerated, deep-learned freespace segmentation
44

55
<div align="center"><a class="reference internal image-reference" href="https://media.githubusercontent.com/media/NVIDIA-ISAAC-ROS/.github/main/resources/isaac_ros_docs/repositories_and_packages/isaac_ros_freespace_segmentation/isaac_ros_bi3d_real_opt.gif/"><img alt="Isaac ROS Freespace Segmentation Sample Output" src="https://media.githubusercontent.com/media/NVIDIA-ISAAC-ROS/.github/main/resources/isaac_ros_docs/repositories_and_packages/isaac_ros_freespace_segmentation/isaac_ros_bi3d_real_opt.gif/" width="500px"/></a></div>
66

@@ -43,10 +43,10 @@ This package is powered by [NVIDIA Isaac Transport for ROS (NITROS)](https://dev
4343

4444
## Performance
4545

46-
| Sample Graph<br/><br/> | Input Size<br/><br/> | AGX Orin<br/><br/> | Orin NX<br/><br/> | Orin Nano 8GB<br/><br/> | x86_64 w/ RTX 4060 Ti<br/><br/> |
47-
|----------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
48-
| [Freespace Segmentation Node](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/scripts/isaac_ros_bi3d_fs_node.py)<br/><br/><br/><br/> | 576p<br/><br/><br/><br/> | [1760 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_node-agx_orin.json)<br/><br/><br/>1.2 ms<br/><br/> | [1410 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_node-orin_nx.json)<br/><br/><br/>1.6 ms<br/><br/> | [1060 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_node-orin_nano.json)<br/><br/><br/>2.3 ms<br/><br/> | [3500 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_node-nuc_4060ti.json)<br/><br/><br/>0.32 ms<br/><br/> |
49-
| [Freespace Segmentation Graph](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/scripts/isaac_ros_bi3d_fs_graph.py)<br/><br/><br/><br/> | 576p<br/><br/><br/><br/> | [45.9 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-agx_orin.json)<br/><br/><br/>41 ms<br/><br/> | [27.6 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-orin_nx.json)<br/><br/><br/>95 ms<br/><br/> | [21.3 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-orin_nano.json)<br/><br/><br/>110 ms<br/><br/> | [91.0 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-nuc_4060ti.json)<br/><br/><br/>30 ms<br/><br/> |
46+
| Sample Graph<br/><br/> | Input Size<br/><br/> | AGX Orin<br/><br/> | Orin NX<br/><br/> | Orin Nano 8GB<br/><br/> | x86_64 w/ RTX 4060 Ti<br/><br/> | x86_64 w/ RTX 4090<br/><br/> |
47+
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
48+
| [Freespace Segmentation Node](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/benchmarks/isaac_ros_bi3d_freespace_benchmark/scripts/isaac_ros_bi3d_fs_node.py)<br/><br/><br/><br/> | 576p<br/><br/><br/><br/> | [2190 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_node-agx_orin.json)<br/><br/><br/>1.4 ms @ 30Hz<br/><br/> | [1850 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_node-orin_nx.json)<br/><br/><br/>1.8 ms @ 30Hz<br/><br/> | [1220 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_node-orin_nano.json)<br/><br/><br/>2.6 ms @ 30Hz<br/><br/> | [3500 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_node-nuc_4060ti.json)<br/><br/><br/>0.50 ms @ 30Hz<br/><br/> | [3500 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_node-x86_4090.json)<br/><br/><br/>0.48 ms @ 30Hz<br/><br/> |
49+
| [Freespace Segmentation Graph](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/benchmarks/isaac_ros_bi3d_freespace_benchmark/scripts/isaac_ros_bi3d_fs_graph.py)<br/><br/><br/><br/> | 576p<br/><br/><br/><br/> | [42.1 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-agx_orin.json)<br/><br/><br/>77 ms @ 30Hz<br/><br/> | [27.4 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-orin_nx.json)<br/><br/><br/>99 ms @ 30Hz<br/><br/> | [21.4 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-orin_nano.json)<br/><br/><br/>100 ms @ 30Hz<br/><br/> | [88.6 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-nuc_4060ti.json)<br/><br/><br/>32 ms @ 30Hz<br/><br/> | [105 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-x86_4090.json)<br/><br/><br/>38 ms @ 30Hz<br/><br/> |
5050

5151
---
5252

@@ -65,4 +65,4 @@ Please visit the [Isaac ROS Documentation](https://nvidia-isaac-ros.github.io/re
6565

6666
## Latest
6767

68-
Update 2023-10-18: Updated for Isaac ROS 2.0.0.
68+
Update 2024-05-30: Update to be compatible with JetPack 6.0
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2+
# Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# SPDX-License-Identifier: Apache-2.0
17+
18+
cmake_minimum_required(VERSION 3.22.1)
19+
project(gxf_isaac_occupancy_grid_projector LANGUAGES C CXX CUDA)
20+
21+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
22+
add_compile_options(-fPIC -w)
23+
endif()
24+
25+
find_package(ament_cmake_auto REQUIRED)
26+
ament_auto_find_build_dependencies()
27+
28+
# Dependencies
29+
find_package(CUDAToolkit REQUIRED)
30+
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
31+
find_package(yaml-cpp)
32+
33+
# Occupancy Grid Projector extension
34+
ament_auto_add_library(${PROJECT_NAME} SHARED
35+
gxf/occupancy_grid_projector_ext.cpp
36+
gxf/occupancy_grid_projector.cpp
37+
gxf/occupancy_grid_projector.cu.cpp
38+
gxf/occupancy_grid_projector.cu.hpp
39+
gxf/occupancy_grid_projector.hpp
40+
)
41+
# Mark as CUDA files with non-standard extensions
42+
set_source_files_properties(
43+
gxf/occupancy_grid_projector.cu.cpp
44+
gxf/occupancy_grid_projector.cu.hpp
45+
PROPERTIES LANGUAGE CUDA
46+
)
47+
48+
target_link_libraries(${PROJECT_NAME}
49+
CUDA::cudart
50+
Eigen3::Eigen
51+
yaml-cpp
52+
)
53+
54+
target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/gxf")
55+
56+
set_target_properties(${PROJECT_NAME} PROPERTIES
57+
BUILD_WITH_INSTALL_RPATH TRUE
58+
BUILD_RPATH_USE_ORIGIN TRUE
59+
INSTALL_RPATH_USE_LINK_PATH TRUE
60+
)
61+
62+
# Install the binary file
63+
install(TARGETS ${PROJECT_NAME} DESTINATION share/${PROJECT_NAME}/gxf/lib)
64+
65+
ament_auto_package(INSTALL_TO_SHARE)

isaac_ros_bi3d_freespace/gxf/bi3d_freespace/occupancy_grid_projector.cpp renamed to gxf_isaac_occupancy_grid_projector/gxf/occupancy_grid_projector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2-
// Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
// Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
1919
#include "occupancy_grid_projector.cu.hpp"
2020

2121
#include "gxf/multimedia/video.hpp"
22-
#include "gxf/std/parameter_parser_std.hpp"
22+
#include "gxf/core/parameter_parser_std.hpp"
2323
#include "gxf/std/tensor.hpp"
2424
#include "gxf/std/timestamp.hpp"
2525

isaac_ros_bi3d_freespace/gxf/bi3d_freespace/occupancy_grid_projector.cu.cpp renamed to gxf_isaac_occupancy_grid_projector/gxf/occupancy_grid_projector.cu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2-
// Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
// Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.

isaac_ros_bi3d_freespace/gxf/bi3d_freespace/occupancy_grid_projector.cu.hpp renamed to gxf_isaac_occupancy_grid_projector/gxf/occupancy_grid_projector.cu.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2-
// Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
// Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.

isaac_ros_bi3d_freespace/gxf/bi3d_freespace/occupancy_grid_projector.hpp renamed to gxf_isaac_occupancy_grid_projector/gxf/occupancy_grid_projector.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2-
// Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
// Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
2323

2424
#include "gxf/std/codelet.hpp"
2525
#include "gxf/std/memory_buffer.hpp"
26-
#include "gxf/std/parameter_parser_std.hpp"
26+
#include "gxf/core/parameter_parser_std.hpp"
2727
#include "gxf/std/receiver.hpp"
2828
#include "gxf/std/transmitter.hpp"
2929

isaac_ros_bi3d_freespace/gxf/bi3d_freespace/occupancy_grid_projector_ext.cpp renamed to gxf_isaac_occupancy_grid_projector/gxf/occupancy_grid_projector_ext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2-
// Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
// Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0"?>
2+
3+
<!--
4+
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
18+
SPDX-License-Identifier: Apache-2.0
19+
-->
20+
21+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
22+
<package format="3">
23+
<name>gxf_isaac_occupancy_grid_projector</name>
24+
<version>3.0.0</version>
25+
<description>Isaac ROS Occupancy Grid Projector Extension.</description>
26+
27+
<maintainer email="[email protected]">Isaac ROS Maintainers</maintainer>
28+
<license>Apache-2.0</license>
29+
<url type="website">https://developer.nvidia.com/isaac-ros-gems/</url>
30+
<author>CY Chen</author>
31+
32+
<buildtool_depend>ament_cmake_auto</buildtool_depend>
33+
34+
<depend>isaac_ros_common</depend>
35+
<depend>isaac_ros_gxf</depend>
36+
37+
<test_depend>ament_lint_auto</test_depend>
38+
<test_depend>ament_lint_common</test_depend>
39+
40+
<export>
41+
<build_type>ament_cmake</build_type>
42+
</export>
43+
</package>

isaac_ros_bi3d_freespace/CMakeLists.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2-
# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -29,19 +29,23 @@ ament_auto_find_build_dependencies()
2929
ament_auto_add_library(freespace_segmentation_node SHARED src/freespace_segmentation_node.cpp)
3030
rclcpp_components_register_nodes(freespace_segmentation_node "nvidia::isaac_ros::bi3d_freespace::FreespaceSegmentationNode")
3131
set(node_plugins "${node_plugins}nvidia::isaac_ros::bi3d_freespace::FreespaceSegmentationNode;$<TARGET_FILE:freespace_segmentation_node>\n")
32-
33-
### Install extensions built from source
34-
35-
# Bi3D Freespace
36-
add_subdirectory(gxf/bi3d_freespace)
37-
install(TARGETS gxf_occupancy_grid_projector DESTINATION share/${PROJECT_NAME}/gxf/lib/bi3d_freespace)
38-
39-
### End extensions
32+
set_target_properties(freespace_segmentation_node PROPERTIES
33+
BUILD_WITH_INSTALL_RPATH TRUE
34+
BUILD_RPATH_USE_ORIGIN TRUE
35+
INSTALL_RPATH_USE_LINK_PATH TRUE
36+
)
4037

4138
if(BUILD_TESTING)
4239
find_package(ament_lint_auto REQUIRED)
4340
ament_lint_auto_find_test_dependencies()
4441

42+
# Gtest for freespace segmentation node
43+
ament_add_gtest(freespace_segmentation_node_test test/freespace_segmentation_node_test.cpp)
44+
target_link_libraries(freespace_segmentation_node_test freespace_segmentation_node)
45+
target_include_directories(freespace_segmentation_node_test PUBLIC include/isaac_ros_bi3d_freespace/)
46+
target_include_directories(freespace_segmentation_node_test PUBLIC /usr/src/googletest/googlemock/include/)
47+
ament_target_dependencies(freespace_segmentation_node_test rclcpp)
48+
ament_target_dependencies(freespace_segmentation_node_test isaac_ros_nitros)
4549

4650
# The FindPythonInterp and FindPythonLibs modules are removed
4751
if(POLICY CMP0148)

isaac_ros_bi3d_freespace/config/freespace_segmentation_node.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ components:
2222
type: nvidia::gxf::DoubleBufferReceiver
2323
parameters:
2424
capacity: 12
25-
policy: 0
2625
- name: occupancy_grid_out
2726
type: nvidia::gxf::DoubleBufferTransmitter
2827
parameters:
2928
capacity: 12
30-
policy: 0
3129
- name: allocator
3230
type: nvidia::gxf::UnboundedAllocator
3331
- name: occupancy_grid_projector
@@ -56,7 +54,6 @@ components:
5654
type: nvidia::gxf::DoubleBufferReceiver
5755
parameters:
5856
capacity: 1
59-
policy: 0
6057
- type: nvidia::gxf::MessageAvailableSchedulingTerm
6158
parameters:
6259
receiver: signal
@@ -76,11 +73,11 @@ components:
7673
components:
7774
- name: clock
7875
type: nvidia::gxf::RealtimeClock
79-
- type: nvidia::gxf::GreedyScheduler
76+
- type: nvidia::gxf::EventBasedScheduler
8077
parameters:
8178
clock: clock
8279
stop_on_deadlock: false
83-
check_recession_period_us: 100
80+
worker_thread_number: 2
8481
- type: nvidia::gxf::JobStatistics
8582
parameters:
8683
clock: clock

0 commit comments

Comments
 (0)