isaac_ros_tensor_rt
Source code on GitHub.
Quickstart
Note
This quickstart demonstrates setting up isaac_ros_tensor_rt
. It is often used with
an encoder and decoder node to perform pre-processing and post-processing respectively
to form an application.
To use the packages in useful contexts, please refer here.
Set Up Development Environment
Set up your development environment by following the instructions in getting started.
Clone
isaac_ros_common
under${ISAAC_ROS_WS}/src
.cd ${ISAAC_ROS_WS}/src && \ git clone -b release-3.1 https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common.git isaac_ros_common
(Optional) Install dependencies for any sensors you want to use by following the sensor-specific guides.
Warning
We strongly recommend installing all sensor dependencies before starting any quickstarts. Some sensor dependencies require restarting the Isaac ROS Dev container during installation, which will interrupt the quickstart process.
Build isaac_ros_tensor_rt
Launch the Docker container using the
run_dev.sh
script:cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \ ./scripts/run_dev.sh
Install the prebuilt Debian package:
sudo apt-get install -y ros-humble-isaac-ros-tensor-rt
Clone this repository under
${ISAAC_ROS_WS}/src
:cd ${ISAAC_ROS_WS}/src && \ git clone -b release-3.1 https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_dnn_inference.git isaac_ros_dnn_inference
Launch the Docker container using the
run_dev.sh
script:cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \ ./scripts/run_dev.sh
Use
rosdep
to install the package’s dependencies:rosdep install --from-paths ${ISAAC_ROS_WS}/src/isaac_ros_dnn_inference/isaac_ros_tensor_rt --ignore-src -y
Build the package from source:
cd ${ISAAC_ROS_WS}/ && \ colcon build --symlink-install --packages-up-to isaac_ros_tensor_rt
Source the ROS workspace:
Note
Make sure to repeat this step in every terminal created inside the Docker container.
Since 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
Troubleshooting
Isaac ROS Troubleshooting
For solutions to problems with Isaac ROS, please check here.
Deep Learning Troubleshooting
For solutions to problems with using DNN models, please check here.
API
Usage
This package contains a launch file that solely launches isaac_ros_tensor_rt
.
Warning
For your specific application, these launch files may need to be modified. Please consult the available components to see the configurable parameters.
Additionally, for most applications, an encoder node for pre-processing your data source and decoder for post-processing the inference output is required.
Launch File |
Components Used |
---|---|
|
TensorRTNode
ROS Parameters
ROS Parameter |
Type |
Default |
Description |
---|---|---|---|
|
|
|
The absolute path to your model file in the local file system (the model file must be |
|
|
|
The absolute path to either where you want your TensorRT engine plan to be generated (from your model file) or where your pre-generated engine plan file is located E.g. |
|
|
|
If set to true, the node will always try to generate a TensorRT engine plan from your model file and needs to be set to false to use the pre-generated TensorRT engine plan |
|
|
|
A list of tensor names to be bound to specified input bindings names. Bindings occur in sequential order, so the first name here will be mapped to the first name in input_binding_names |
|
|
|
A list of input tensor binding names specified by model E.g. |
|
|
|
A list of input tensor NITROS formats. This should be given in sequential order E.g. |
|
|
|
A list of tensor names to be bound to specified output binding names |
|
|
|
A list of tensor names to be bound to specified output binding names E.g. |
|
|
|
A list of input tensor NITROS formats. This should be given in sequential order E.g. |
|
|
|
If set to true, the node will enable verbose logging to console from the internal TensorRT execution |
|
|
|
The size of the working space in bytes |
|
|
|
The maximum possible batch size in case the first dimension is dynamic and used as the batch size |
|
|
|
The DLA Core to use. Fallback to GPU is always enabled. The default setting is GPU only |
|
|
|
Enables building a TensorRT engine plan file which uses FP16 precision for inference. If this setting is false, the plan file will use FP32 precision |
|
|
|
Ignores dimensions of 1 for the input-tensor dimension check |
|
|
|
The number of pre-allocated memory output blocks, should not be less than |
ROS Topics Subscribed
ROS Topic |
Type |
Description |
---|---|---|
|
The input tensor stream |
ROS Topics Published
ROS Topic |
Type |
Description |
---|---|---|
|
The tensor list of output tensors from the model inference |