Isaac ROS NITROS Bridge#
Overview#
The Isaac ROS NITROS Bridge provides NITROS-enabled performance enhancements for Isaac ROS packages by enabling efficient data transfer and conversion between different ROS message types.
Isaac ROS provides accelerated computing ROS packages for robotics development in ROS 2 with NITROS; this is enabled with the addition of type adaptation (REP-2007) and type negotiation (REP-2009) in ROS 2 Humble.
Isaac ROS NITROS Bridge improves performance by moving data from CPU to GPU to avoid CPU memory copies. This significantly improves performance across processes and enables the data in GPU memory to be used in place by accelerated computing.
The NITROS Bridge enables efficient data transfer and conversion between different ROS message types, moving data to GPU accelerated memory to avoid CPU memory copies. The NITROS converter adapts data in GPU memory for use with accelerated computing.
This principle can be applied to ROS 2, for example between different ROS 2 distributions to take advantage of Isaac ROS capabilities from applications developed in different versions without requiring full migration.
By avoiding unnecessary CPU memory copies, the Isaac ROS NITROS bridge improves accelerated computing performance and reduces end-to-end latency across different ROS message types.
Performance#
Isaac ROS NITROS Bridge provides efficient data transfer for NITROS-enabled packages, significantly improving performance compared to standard ROS message passing. See Isaac ROS Benchmark scripts for NITROS bridge performance measurement.
Packages#
Quickstart#
Set Up Development Environment#
Set up your development environment by following the instructions in getting started.
Download Quickstart Assets#
Download quickstart data from NGC:
Make sure required libraries are installed.
sudo apt-get install -y curl jq tar
Then, run these commands to download the asset from NGC:
NGC_ORG="nvidia" NGC_TEAM="isaac" PACKAGE_NAME="isaac_ros_nitros_bridge_ros2" NGC_RESOURCE="isaac_ros_nitros_bridge_ros2_assets" NGC_FILENAME="quickstart.tar.gz" MAJOR_VERSION=4 MINOR_VERSION=0 VERSION_REQ_URL="https://catalog.ngc.nvidia.com/api/resources/versions?orgName=$NGC_ORG&teamName=$NGC_TEAM&name=$NGC_RESOURCE&isPublic=true&pageNumber=0&pageSize=100&sortOrder=CREATED_DATE_DESC" AVAILABLE_VERSIONS=$(curl -s \ -H "Accept: application/json" "$VERSION_REQ_URL") LATEST_VERSION_ID=$(echo $AVAILABLE_VERSIONS | jq -r " .recipeVersions[] | .versionId as \$v | \$v | select(test(\"^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$\")) | split(\".\") | {major: .[0]|tonumber, minor: .[1]|tonumber, patch: .[2]|tonumber} | select(.major == $MAJOR_VERSION and .minor <= $MINOR_VERSION) | \$v " | sort -V | tail -n 1 ) if [ -z "$LATEST_VERSION_ID" ]; then echo "No corresponding version found for Isaac ROS $MAJOR_VERSION.$MINOR_VERSION" echo "Found versions:" echo $AVAILABLE_VERSIONS | jq -r '.recipeVersions[].versionId' else mkdir -p ${ISAAC_ROS_WS}/isaac_ros_assets && \ FILE_REQ_URL="https://api.ngc.nvidia.com/v2/resources/$NGC_ORG/$NGC_TEAM/$NGC_RESOURCE/\ versions/$LATEST_VERSION_ID/files/$NGC_FILENAME" && \ curl -LO --request GET "${FILE_REQ_URL}" && \ tar -xf ${NGC_FILENAME} -C ${ISAAC_ROS_WS}/isaac_ros_assets && \ rm ${NGC_FILENAME} fi
Build isaac_ros_nitros_bridge_ros2#
Set the
ptrace_scopefor NITROS Bridge:echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
Activate the Isaac ROS environment:
isaac-ros activateInstall the prebuilt Debian package:
sudo apt-get update
sudo apt-get install -y ros-jazzy-isaac-ros-nitros-bridge-ros2
Install Git LFS:
sudo apt-get install -y git-lfs && git lfs install
Clone this repository under
${ISAAC_ROS_WS}/src:cd ${ISAAC_ROS_WS}/src && \ git clone -b release-4.0 https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_nitros.git isaac_ros_nitros
Activate the Isaac ROS environment:
isaac-ros activateUse
rosdepto install the package’s dependencies:sudo apt-get update
rosdep update && rosdep install --from-paths ${ISAAC_ROS_WS}/src/isaac_ros_nitros/isaac_ros_nitros_bridge/isaac_ros_nitros_bridge_ros2 --ignore-src -y
Build the package from source:
cd ${ISAAC_ROS_WS}/ && \ colcon build --symlink-install --packages-up-to isaac_ros_nitros_bridge_ros2 --base-paths ${ISAAC_ROS_WS}/src/isaac_ros_nitros/isaac_ros_nitros_bridge/isaac_ros_nitros_bridge_ros2
Source the ROS workspace:
Note
Make sure to repeat this step in every terminal created inside the Isaac ROS environment.
Because this package was built from source, the enclosing workspace must be sourced for ROS to be able to find the package’s contents.
source install/setup.bash
Run Launch File#
Run the following launch files to spin up a demo of this package:
cd /workspaces/isaac_ros-dev && \ source install/setup.bash && \ ros2 launch isaac_ros_nitros_bridge_ros2 isaac_ros_nitros_bridge_quickstart.launch.py rosbag_path:=${ISAAC_ROS_WS}/isaac_ros_assets/isaac_ros_nitros_bridge_ros2/quickstart.bag
Open a second terminal and activate the Isaac ROS environment:
isaac-ros activateVisualize the output topic
/r2b/ros2_output_imagein RViz:cd /workspaces/isaac_ros-dev/ && \ source install/setup.bash && \ rviz2
Try Another Example#
For an example to run Isaac Sim with NITROS Bridge, see here.
Troubleshooting#
Isaac ROS NITROS Bridge ROS 2 Build Issues#
Symptoms#
You may encounter build issues when building ROS 2 packages.
Solution#
You must source setup.bash from the ROS 2 installation before building:
source /opt/ros/jazzy/setup.bash
Updates#
Date |
Changes |
|---|---|
2024-09-26 |
Update for Isaac ROS 3.1 |
2024-05-30 |
Update to be compatible with JetPack 6.0 |
2023-10-18 |
Initial release |