isaac_ros_benchmark#
Source code available on GitHub.
Quickstart#
Follow the steps below to run a sample benchmark for measuring
performance of an Isaac ROS AprilTag node with ros2_benchmark. This
process can also be used to benchmark the other Isaac ROS nodes, and the
ros2_benchmark framework more generally supports benchmarking
arbitrary graphs of ROS 2 nodes.
Set Up Development Environment#
Set up your development environment by following the instructions in getting started.
(Optional) Install dependencies for any sensors you want to use by following the sensor-specific guides.
Note
We strongly recommend installing all sensor dependencies before starting any quickstarts. Some sensor dependencies require restarting the development environment during installation, which will interrupt the quickstart process.
Datasets#
Most benchmarks for Isaac ROS nodes use the standard r2b Dataset as input data.
Download the datasets by following the instructions here
or fetch just the rosbag used in this Quickstart with the following command.
mkdir -p ${ISAAC_ROS_WS}/src/ros2_benchmark/assets/datasets/r2b_dataset/r2b_storage && \
cd ${ISAAC_ROS_WS}/src/ros2_benchmark/assets/datasets/r2b_dataset/r2b_storage && \
wget 'https://api.ngc.nvidia.com/v2/resources/nvidia/isaac/r2bdataset2023/versions/2/files/r2b_storage/metadata.yaml' && \
wget 'https://api.ngc.nvidia.com/v2/resources/nvidia/isaac/r2bdataset2023/versions/2/files/r2b_storage/r2b_storage_0.db3'
Build isaac_ros_benchmark#
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-apriltag-benchmark
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_benchmark.git isaac_ros_benchmark
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_benchmark/benchmarks/isaac_ros_apriltag_benchmark --ignore-src -y
Build the package from source:
cd ${ISAAC_ROS_WS}/ && \ colcon build --symlink-install --packages-up-to isaac_ros_apriltag_benchmark --base-paths ${ISAAC_ROS_WS}/src/isaac_ros_benchmark/benchmarks/isaac_ros_apriltag_benchmark
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#
Continuing inside the Isaac ROS environment, run the following launch file to start benchmarking Isaac ROS AprilTag:
launch_test $(ros2 pkg prefix isaac_ros_apriltag_benchmark)/share/isaac_ros_apriltag_benchmark/scripts/isaac_ros_apriltag_node.py
Once the benchmark is finished, the final performance measurements are displayed in the terminal.
Additionally, the final results and benchmark metadata (e.g., system information, benchmark configurations) are also exported as a JSON file whose path is printed in the terminal when the benchmark ends.
Troubleshooting#
For solutions to problems with Isaac ROS, please check here.