Skip to content

Commit 83ef5a7

Browse files
Merge pull request #10 from NVIDIA-ISAAC-ROS/release-3.2
Isaac ROS 3.2
2 parents 61027e2 + 555c9d1 commit 83ef5a7

File tree

8 files changed

+50
-48
lines changed

8 files changed

+50
-48
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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/> | 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/> |
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 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/> | [2120 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.7 ms @ 30Hz<br/><br/> | [2490 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 @ 30Hz<br/><br/> | [1560 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 @ 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.52 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/> | [36.5 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-agx_orin.json)<br/><br/><br/>84 ms @ 30Hz<br/><br/> | [27.8 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-orin_nx.json)<br/><br/><br/>100 ms @ 30Hz<br/><br/> | [22.0 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-orin_nano.json)<br/><br/><br/>98 ms @ 30Hz<br/><br/> | [100 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_bi3d_fs_graph-x86-4090.json)<br/><br/><br/>22 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 2024-09-26: Update for ZED compatibility
68+
Update 2024-12-10: Update to be compatible with JetPack 6.1

gxf_isaac_occupancy_grid_projector/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,10 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
6262
# Install the binary file
6363
install(TARGETS ${PROJECT_NAME} DESTINATION share/${PROJECT_NAME}/gxf/lib)
6464

65+
66+
# Embed versioning information into installed files
67+
ament_index_get_resource(ISAAC_ROS_COMMON_CMAKE_PATH isaac_ros_common_cmake_path isaac_ros_common)
68+
include("${ISAAC_ROS_COMMON_CMAKE_PATH}/isaac_ros_common-version-info.cmake")
69+
generate_version_info(${PROJECT_NAME})
70+
6571
ament_auto_package(INSTALL_TO_SHARE)

gxf_isaac_occupancy_grid_projector/gxf/occupancy_grid_projector.cpp

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,23 @@
1414
// limitations under the License.
1515
//
1616
// SPDX-License-Identifier: Apache-2.0
17-
#include "occupancy_grid_projector.hpp"
17+
18+
#include <string>
19+
#include <utility>
1820

1921
#include "occupancy_grid_projector.cu.hpp"
22+
#include "occupancy_grid_projector.hpp"
2023

21-
#include "gxf/multimedia/video.hpp"
2224
#include "gxf/core/parameter_parser_std.hpp"
25+
#include "gxf/multimedia/video.hpp"
2326
#include "gxf/std/tensor.hpp"
2427
#include "gxf/std/timestamp.hpp"
2528

26-
namespace nvidia
27-
{
28-
namespace isaac_ros
29-
{
30-
namespace freespace_segmentation
31-
{
29+
namespace nvidia {
30+
namespace isaac_ros {
31+
namespace freespace_segmentation {
3232

33-
gxf_result_t OccupancyGridProjector::registerInterface(gxf::Registrar * registrar)
34-
{
33+
gxf_result_t OccupancyGridProjector::registerInterface(gxf::Registrar * registrar) {
3534
gxf::Expected<void> result;
3635

3736
result &= registrar->parameter(
@@ -68,8 +67,7 @@ gxf_result_t OccupancyGridProjector::registerInterface(gxf::Registrar * registra
6867
return gxf::ToResultCode(result);
6968
}
7069

71-
gxf_result_t OccupancyGridProjector::start()
72-
{
70+
gxf_result_t OccupancyGridProjector::start() {
7371
// Extract 3D transform from camera frame to ground frame from parameter
7472
auto projection = projection_transform_param_.get();
7573
if (projection.size() != 7) {
@@ -87,8 +85,7 @@ gxf_result_t OccupancyGridProjector::start()
8785
}
8886
if (cudaMemcpy(
8987
translation_device_, translation.data(),
90-
sizeof(float) * translation.size(), cudaMemcpyHostToDevice) != cudaSuccess)
91-
{
88+
sizeof(float) * translation.size(), cudaMemcpyHostToDevice) != cudaSuccess) {
9289
GXF_LOG_ERROR("Failed to copy translation to device");
9390
return GXF_FAILURE;
9491
}
@@ -108,8 +105,7 @@ gxf_result_t OccupancyGridProjector::start()
108105
}
109106
if (cudaMemcpy(
110107
rotation_matrix_device_, rotation_matrix.data(),
111-
sizeof(float) * rotation_matrix.size(), cudaMemcpyHostToDevice) != cudaSuccess)
112-
{
108+
sizeof(float) * rotation_matrix.size(), cudaMemcpyHostToDevice) != cudaSuccess) {
113109
GXF_LOG_ERROR("Failed to copy rotation matrix to device");
114110
return GXF_FAILURE;
115111
}
@@ -131,8 +127,7 @@ gxf_result_t OccupancyGridProjector::start()
131127
return GXF_SUCCESS;
132128
}
133129

134-
gxf_result_t OccupancyGridProjector::stop() noexcept
135-
{
130+
gxf_result_t OccupancyGridProjector::stop() noexcept {
136131
if (cudaFree(rotation_matrix_device_) != cudaSuccess) {
137132
GXF_LOG_ERROR("Failed to free rotation matrix");
138133
return GXF_FAILURE;
@@ -145,8 +140,7 @@ gxf_result_t OccupancyGridProjector::stop() noexcept
145140
return GXF_SUCCESS;
146141
}
147142

148-
gxf_result_t OccupancyGridProjector::tick()
149-
{
143+
gxf_result_t OccupancyGridProjector::tick() {
150144
// Retrieve segmentation mask from Bi3D postprocessor
151145
const auto maybe_mask_message = mask_receiver_->receive();
152146
if (!maybe_mask_message) {
@@ -217,8 +211,7 @@ gxf_result_t OccupancyGridProjector::tick()
217211

218212
if (cudaMemcpy(
219213
origin->pointer(), origin_pose.data(), sizeof(double) * origin_pose.size(),
220-
cudaMemcpyHostToDevice) != cudaSuccess)
221-
{
214+
cudaMemcpyHostToDevice) != cudaSuccess) {
222215
GXF_LOG_ERROR("Failed to copy origin to device");
223216
return GXF_FAILURE;
224217
}
@@ -244,7 +237,7 @@ gxf_result_t OccupancyGridProjector::tick()
244237

245238
// Process segmentation map
246239
process_segmentation_mask(
247-
(float *) segmentation_mask->pointer(), occupancy_grid->data<int8_t>().value(),
240+
reinterpret_cast<float *>(segmentation_mask->pointer()), occupancy_grid->data<int8_t>().value(),
248241
segmentation_mask->video_frame_info().height,
249242
segmentation_mask->video_frame_info().width,
250243
grid_height_, grid_width_, grid_resolution_, f_x_, f_y_, rotation_matrix_device_,

gxf_isaac_occupancy_grid_projector/gxf/occupancy_grid_projector.hpp

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,31 @@
1717
#ifndef NVIDIA_ISAAC_ROS_GXF_EXTENSIONS_OCCUPANCY_GRID_PROJECTOR_HPP_
1818
#define NVIDIA_ISAAC_ROS_GXF_EXTENSIONS_OCCUPANCY_GRID_PROJECTOR_HPP_
1919

20-
#include <string>
21-
2220
#include <Eigen/Dense>
2321

22+
#include <string>
23+
#include <vector>
24+
25+
#include "gxf/core/parameter_parser_std.hpp"
2426
#include "gxf/std/codelet.hpp"
2527
#include "gxf/std/memory_buffer.hpp"
26-
#include "gxf/core/parameter_parser_std.hpp"
2728
#include "gxf/std/receiver.hpp"
2829
#include "gxf/std/transmitter.hpp"
2930

3031
#include "occupancy_grid_projector.cu.hpp"
3132

32-
namespace nvidia
33-
{
34-
namespace isaac_ros
35-
{
36-
namespace freespace_segmentation
37-
{
33+
namespace nvidia {
34+
namespace isaac_ros {
35+
namespace freespace_segmentation {
3836

39-
class OccupancyGridProjector : public gxf::Codelet
40-
{
41-
public:
37+
class OccupancyGridProjector : public gxf::Codelet {
38+
public:
4239
gxf_result_t registerInterface(gxf::Registrar * registrar) override;
4340
gxf_result_t start() override;
4441
gxf_result_t tick() override;
4542
gxf_result_t stop() noexcept override;
4643

47-
private:
44+
private:
4845
gxf::Parameter<gxf::Handle<gxf::Receiver>> mask_receiver_;
4946
gxf::Parameter<gxf::Handle<gxf::Transmitter>> output_transmitter_;
5047
gxf::Parameter<gxf::Handle<gxf::Allocator>> allocator_;

gxf_isaac_occupancy_grid_projector/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SPDX-License-Identifier: Apache-2.0
2121
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
2222
<package format="3">
2323
<name>gxf_isaac_occupancy_grid_projector</name>
24-
<version>3.1.0</version>
24+
<version>3.2.0</version>
2525
<description>Isaac ROS Occupancy Grid Projector Extension.</description>
2626

2727
<maintainer email="[email protected]">Isaac ROS Maintainers</maintainer>

isaac_ros_bi3d_freespace/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,10 @@ if(BUILD_TESTING)
5656
add_launch_test(test/isaac_ros_freespace_segmentation_pol.py TIMEOUT "1000")
5757
endif()
5858

59+
60+
# Embed versioning information into installed files
61+
ament_index_get_resource(ISAAC_ROS_COMMON_CMAKE_PATH isaac_ros_common_cmake_path isaac_ros_common)
62+
include("${ISAAC_ROS_COMMON_CMAKE_PATH}/isaac_ros_common-version-info.cmake")
63+
generate_version_info(${PROJECT_NAME})
64+
5965
ament_auto_package(INSTALL_TO_SHARE config launch)

isaac_ros_bi3d_freespace/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SPDX-License-Identifier: Apache-2.0
2121
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
2222
<package format="3">
2323
<name>isaac_ros_bi3d_freespace</name>
24-
<version>3.1.0</version>
24+
<version>3.2.0</version>
2525
<description>Freespace segmentation using the Bi3D inference network for ROS</description>
2626

2727
<maintainer email="[email protected]">Isaac ROS Maintainers</maintainer>

isaac_ros_bi3d_freespace/test/freespace_segmentation_node_test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@
2222
// Objective: to cover code lines where exceptions are thrown
2323
// Approach: send Invalid Arguments for node parameters to trigger the exception
2424

25+
2526
TEST(freespace_segmentation_node_test, test_invalid_focal_length)
2627
{
2728
rclcpp::init(0, nullptr);
2829
rclcpp::NodeOptions options;
29-
options.arguments(
30-
{
31-
"--ros-args",
32-
"-p", "f_x_:= 0",
33-
});
30+
options.append_parameter_override("f_x", 0.0);
3431
EXPECT_THROW(
3532
{
3633
try {
@@ -39,6 +36,9 @@ TEST(freespace_segmentation_node_test, test_invalid_focal_length)
3936
} catch (const std::invalid_argument & e) {
4037
EXPECT_THAT(e.what(), testing::HasSubstr("Invalid focal length"));
4138
throw;
39+
} catch (const rclcpp::exceptions::InvalidParameterValueException & e) {
40+
EXPECT_THAT(e.what(), testing::HasSubstr("No parameter value set"));
41+
throw;
4242
}
4343
}, std::invalid_argument);
4444
rclcpp::shutdown();

0 commit comments

Comments
 (0)