No version for distro humble showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_tensorrt_common package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-26
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

tensorrt utility wrapper

Maintainers

  • Dan Umeda
  • Manato Hirabayashi
  • Amadeusz Szymko
  • Kenzo Lobos-Tsunekawa
  • Masato Saeki
  • Yi-Hsiang Fang
  • Max Schmeller

Authors

  • Taichi Higashide
  • Daisuke Nishimatsu

autoware_tensorrt_common

This package provides a high-level API to work with TensorRT. This library simplifies the process of loading, building, and executing TensorRT inference engines using ONNX models. It also includes utilities for profiling and managing TensorRT execution contexts, making it easier to integrate TensorRT-based packages in Autoware.

Usage

Here is an example usage of the library. For the full API documentation, please refer to the doxygen documentation (see header file).

#include <autoware/tensorrt_common/tensorrt_common.hpp>

#include <memory>
#include <utility>
#include <vector>

using autoware::tensorrt_common::TrtCommon;
using autoware::tensorrt_common::TrtCommonConfig;
using autoware::tensorrt_common::TensorInfo;
using autoware::tensorrt_common::NetworkIO;
using autoware::tensorrt_common::ProfileDims;

std::unique_ptr<TrtCommon> trt_common_;

Create a tensorrt common instance and setup engine

  • With minimal configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx"));
trt_common_->setup();

  • With full configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx", "fp16", "/path/to/engine/model.engine", (1ULL << 30U), -1, false));

std::vector<NetworkIO> network_io{
  NetworkIO("sample_input", {3, {-1, 64, 512}}), NetworkIO("sample_output", {1, {50}})};
std::vector<ProfileDims> profile_dims{
  ProfileDims("sample_input", {3, {1, 64, 512}}, {3, {3, 64, 512}}, {3, {9, 64, 512}})};

auto network_io_ptr = std::make_unique<std::vector<NetworkIO>>(network_io);
auto profile_dims_ptr = std::make_unique<std::vector<ProfileDims>>(profile_dims);

trt_common_->setup(std::move(profile_dims_ptr), std::move(network_io_ptr));

By defining network IO names and dimensions, an extra shapes validation will be performed after building / loading engine. This is useful to ensure the model is compatible with current code for preprocessing as it might consists of operations dependent on tensor shapes.

Profile dimension is used to specify the min, opt, and max dimensions for dynamic shapes.

Network IO or / and profile dimensions can be omitted if not needed.

Setting input and output tensors

bool success = true;
success &= trt_common_->setTensor("sample_input", sample_input_d_.get(), nvinfer1::Dims{3, {var_size, 64, 512}});
success &= trt_common_->setTensor("sample_output", sample_output_d_.get());
return success;

Execute inference

auto success = trt_common_->enqueueV3(stream_);
return success;

CHANGELOG

Changelog for package autoware_tensorrt_common

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(autoware_tensorrt_common): let a caller offer IO the model may omit (#13347)

    * feat(autoware_tensorrt_common): let a caller offer IO the model may omit A caller declares the IO its node can serve, and setup() compares that list against the model. An architecture variant that gates blocks off declares less than the full contract, and the ONNX exporter drops inputs the traced graph never consumes, so such a model arrives narrower than the offered list and validateNetworkIO rejects it on the count. Every node facing that has to enumerate the model itself and pre-filter its own lists before calling setup(). NetworkIO and ProfileDims entries can now be marked optional, and setup() drops the optional ones the model does not declare before profiling or comparing them. An all-required list behaves exactly as it does today. Reconciliation then requires the offer and the model to account for each other in both directions, refusing a mismatch before an engine is built: Model does not declare the required IO tensor(s): [...] Model declares IO tensor(s) that were not offered: [...] The second direction takes over from validateNetworkIO's cardinality check for caller error. That check compares counts rather than sets, so one tensor the model declares and one surplus offered entry cancelled out and setup() could succeed leaving a tensor unbound; and because it runs after the engine is loaded, a mismatch discarded a good cached engine and burned a full rebuild before failing. The count check stays, now guarding only against the engine's IO set diverging from the parsed network's, which reconciliation runs too early to see. On success setup() says which of the two happened, once: Model declares all 27 offered IO tensors Model declares 20 of 27 offered IO tensors; skipping the optional tensors it does not declare: [serialized_code, ...] so a narrower model is visible at load instead of being inferred from a shape error later. Name resolution for index-addressed entries moves ahead of the profile loop and now covers NetworkIO too, since the name is what the comparison and the log report; an index that cannot be named is an error rather than a crash assigning nullptr to std::string. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * test(autoware_tensorrt_common): cover IO reconciliation against a dummy network Adds the package's first unit tests. A 256-byte ONNX fixture declares three dynamically shaped inputs feeding one output, which is enough to exercise every branch of the offered-IO reconciliation: an artifact declaring everything, an optional tensor the artifact omits (dropped, and both by-name setters no-op for it while a never-offered name still fails), the same when only the profile list offers it, a required tensor the artifact omits (refused before an engine is built, asserted by the absent engine file), the same via the profile list alone, an out-of-range tensor index, a caller offering fewer tensors than the model declares, equal counts covering different sets, and an offer of nothing but optional tensors the artifact omits. The last two would pass a size comparison alone. The tensor-metadata cases need no device and always run. The rest build an engine, so they use autoware_cuda_utils' SKIP_TEST_IF_CUDA_UNAVAILABLE() to skip where there is no GPU, as the CUDA CI job has none. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • feat(autoware_tensorrt_common): add getIOTensorNames (#13346) Callers that need to know what a model declares had to enumerate getNbIOTensors/getIOTensorName themselves, or ask getTensorIOMode one name at a time. The latter is a trap: TensorRT logs an error for every name the engine does not have, so probing a contract against a narrower model fills the log with errors that report nothing wrong. getIOTensorNames enumerates once and returns the set, and its documentation says why it is the right way to ask. Like the accessors it wraps, it reads the parsed network before setup() and the engine afterwards. Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • fix(autoware_tensorrt_common): stop warning on the documented network fallback (#13288) getIOTensorName, getNbIOTensors and getTensorShape(index) fall back to the parsed network when the engine is not built yet. That is the documented contract - the header already says "with fallback from TensorRT network" - and it is how a caller inspects the IO a model declares before setup() builds or loads the engine. Logging kWARNING on every such call turns intended use into noise: enumerating a 27-input encoder emits 27 warnings before the engine exists, which buries the warnings that matter. The log is dropped; a missing network stays an error. The three fallbacks are also flattened to early returns - network missing is an error, an engine short-circuits, otherwise read the network - instead of nesting the network path inside [if (!engine_)]{.title-ref}. network_ is created by initialize() from the constructor and never reset, so testing it first is safe. Every member that reads only state established by the constructor now says so: "Valid immediately after construction. Valid to call before [setup()]{.title-ref}." Co-authored-by: Claude Opus 5 (1M context)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_tensorrt_common at Robotics Stack Exchange

No version for distro jazzy showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_tensorrt_common package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-26
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

tensorrt utility wrapper

Maintainers

  • Dan Umeda
  • Manato Hirabayashi
  • Amadeusz Szymko
  • Kenzo Lobos-Tsunekawa
  • Masato Saeki
  • Yi-Hsiang Fang
  • Max Schmeller

Authors

  • Taichi Higashide
  • Daisuke Nishimatsu

autoware_tensorrt_common

This package provides a high-level API to work with TensorRT. This library simplifies the process of loading, building, and executing TensorRT inference engines using ONNX models. It also includes utilities for profiling and managing TensorRT execution contexts, making it easier to integrate TensorRT-based packages in Autoware.

Usage

Here is an example usage of the library. For the full API documentation, please refer to the doxygen documentation (see header file).

#include <autoware/tensorrt_common/tensorrt_common.hpp>

#include <memory>
#include <utility>
#include <vector>

using autoware::tensorrt_common::TrtCommon;
using autoware::tensorrt_common::TrtCommonConfig;
using autoware::tensorrt_common::TensorInfo;
using autoware::tensorrt_common::NetworkIO;
using autoware::tensorrt_common::ProfileDims;

std::unique_ptr<TrtCommon> trt_common_;

Create a tensorrt common instance and setup engine

  • With minimal configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx"));
trt_common_->setup();

  • With full configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx", "fp16", "/path/to/engine/model.engine", (1ULL << 30U), -1, false));

std::vector<NetworkIO> network_io{
  NetworkIO("sample_input", {3, {-1, 64, 512}}), NetworkIO("sample_output", {1, {50}})};
std::vector<ProfileDims> profile_dims{
  ProfileDims("sample_input", {3, {1, 64, 512}}, {3, {3, 64, 512}}, {3, {9, 64, 512}})};

auto network_io_ptr = std::make_unique<std::vector<NetworkIO>>(network_io);
auto profile_dims_ptr = std::make_unique<std::vector<ProfileDims>>(profile_dims);

trt_common_->setup(std::move(profile_dims_ptr), std::move(network_io_ptr));

By defining network IO names and dimensions, an extra shapes validation will be performed after building / loading engine. This is useful to ensure the model is compatible with current code for preprocessing as it might consists of operations dependent on tensor shapes.

Profile dimension is used to specify the min, opt, and max dimensions for dynamic shapes.

Network IO or / and profile dimensions can be omitted if not needed.

Setting input and output tensors

bool success = true;
success &= trt_common_->setTensor("sample_input", sample_input_d_.get(), nvinfer1::Dims{3, {var_size, 64, 512}});
success &= trt_common_->setTensor("sample_output", sample_output_d_.get());
return success;

Execute inference

auto success = trt_common_->enqueueV3(stream_);
return success;

CHANGELOG

Changelog for package autoware_tensorrt_common

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(autoware_tensorrt_common): let a caller offer IO the model may omit (#13347)

    * feat(autoware_tensorrt_common): let a caller offer IO the model may omit A caller declares the IO its node can serve, and setup() compares that list against the model. An architecture variant that gates blocks off declares less than the full contract, and the ONNX exporter drops inputs the traced graph never consumes, so such a model arrives narrower than the offered list and validateNetworkIO rejects it on the count. Every node facing that has to enumerate the model itself and pre-filter its own lists before calling setup(). NetworkIO and ProfileDims entries can now be marked optional, and setup() drops the optional ones the model does not declare before profiling or comparing them. An all-required list behaves exactly as it does today. Reconciliation then requires the offer and the model to account for each other in both directions, refusing a mismatch before an engine is built: Model does not declare the required IO tensor(s): [...] Model declares IO tensor(s) that were not offered: [...] The second direction takes over from validateNetworkIO's cardinality check for caller error. That check compares counts rather than sets, so one tensor the model declares and one surplus offered entry cancelled out and setup() could succeed leaving a tensor unbound; and because it runs after the engine is loaded, a mismatch discarded a good cached engine and burned a full rebuild before failing. The count check stays, now guarding only against the engine's IO set diverging from the parsed network's, which reconciliation runs too early to see. On success setup() says which of the two happened, once: Model declares all 27 offered IO tensors Model declares 20 of 27 offered IO tensors; skipping the optional tensors it does not declare: [serialized_code, ...] so a narrower model is visible at load instead of being inferred from a shape error later. Name resolution for index-addressed entries moves ahead of the profile loop and now covers NetworkIO too, since the name is what the comparison and the log report; an index that cannot be named is an error rather than a crash assigning nullptr to std::string. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * test(autoware_tensorrt_common): cover IO reconciliation against a dummy network Adds the package's first unit tests. A 256-byte ONNX fixture declares three dynamically shaped inputs feeding one output, which is enough to exercise every branch of the offered-IO reconciliation: an artifact declaring everything, an optional tensor the artifact omits (dropped, and both by-name setters no-op for it while a never-offered name still fails), the same when only the profile list offers it, a required tensor the artifact omits (refused before an engine is built, asserted by the absent engine file), the same via the profile list alone, an out-of-range tensor index, a caller offering fewer tensors than the model declares, equal counts covering different sets, and an offer of nothing but optional tensors the artifact omits. The last two would pass a size comparison alone. The tensor-metadata cases need no device and always run. The rest build an engine, so they use autoware_cuda_utils' SKIP_TEST_IF_CUDA_UNAVAILABLE() to skip where there is no GPU, as the CUDA CI job has none. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • feat(autoware_tensorrt_common): add getIOTensorNames (#13346) Callers that need to know what a model declares had to enumerate getNbIOTensors/getIOTensorName themselves, or ask getTensorIOMode one name at a time. The latter is a trap: TensorRT logs an error for every name the engine does not have, so probing a contract against a narrower model fills the log with errors that report nothing wrong. getIOTensorNames enumerates once and returns the set, and its documentation says why it is the right way to ask. Like the accessors it wraps, it reads the parsed network before setup() and the engine afterwards. Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • fix(autoware_tensorrt_common): stop warning on the documented network fallback (#13288) getIOTensorName, getNbIOTensors and getTensorShape(index) fall back to the parsed network when the engine is not built yet. That is the documented contract - the header already says "with fallback from TensorRT network" - and it is how a caller inspects the IO a model declares before setup() builds or loads the engine. Logging kWARNING on every such call turns intended use into noise: enumerating a 27-input encoder emits 27 warnings before the engine exists, which buries the warnings that matter. The log is dropped; a missing network stays an error. The three fallbacks are also flattened to early returns - network missing is an error, an engine short-circuits, otherwise read the network - instead of nesting the network path inside [if (!engine_)]{.title-ref}. network_ is created by initialize() from the constructor and never reset, so testing it first is safe. Every member that reads only state established by the constructor now says so: "Valid immediately after construction. Valid to call before [setup()]{.title-ref}." Co-authored-by: Claude Opus 5 (1M context)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_tensorrt_common at Robotics Stack Exchange

No version for distro kilted showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_tensorrt_common package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-26
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

tensorrt utility wrapper

Maintainers

  • Dan Umeda
  • Manato Hirabayashi
  • Amadeusz Szymko
  • Kenzo Lobos-Tsunekawa
  • Masato Saeki
  • Yi-Hsiang Fang
  • Max Schmeller

Authors

  • Taichi Higashide
  • Daisuke Nishimatsu

autoware_tensorrt_common

This package provides a high-level API to work with TensorRT. This library simplifies the process of loading, building, and executing TensorRT inference engines using ONNX models. It also includes utilities for profiling and managing TensorRT execution contexts, making it easier to integrate TensorRT-based packages in Autoware.

Usage

Here is an example usage of the library. For the full API documentation, please refer to the doxygen documentation (see header file).

#include <autoware/tensorrt_common/tensorrt_common.hpp>

#include <memory>
#include <utility>
#include <vector>

using autoware::tensorrt_common::TrtCommon;
using autoware::tensorrt_common::TrtCommonConfig;
using autoware::tensorrt_common::TensorInfo;
using autoware::tensorrt_common::NetworkIO;
using autoware::tensorrt_common::ProfileDims;

std::unique_ptr<TrtCommon> trt_common_;

Create a tensorrt common instance and setup engine

  • With minimal configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx"));
trt_common_->setup();

  • With full configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx", "fp16", "/path/to/engine/model.engine", (1ULL << 30U), -1, false));

std::vector<NetworkIO> network_io{
  NetworkIO("sample_input", {3, {-1, 64, 512}}), NetworkIO("sample_output", {1, {50}})};
std::vector<ProfileDims> profile_dims{
  ProfileDims("sample_input", {3, {1, 64, 512}}, {3, {3, 64, 512}}, {3, {9, 64, 512}})};

auto network_io_ptr = std::make_unique<std::vector<NetworkIO>>(network_io);
auto profile_dims_ptr = std::make_unique<std::vector<ProfileDims>>(profile_dims);

trt_common_->setup(std::move(profile_dims_ptr), std::move(network_io_ptr));

By defining network IO names and dimensions, an extra shapes validation will be performed after building / loading engine. This is useful to ensure the model is compatible with current code for preprocessing as it might consists of operations dependent on tensor shapes.

Profile dimension is used to specify the min, opt, and max dimensions for dynamic shapes.

Network IO or / and profile dimensions can be omitted if not needed.

Setting input and output tensors

bool success = true;
success &= trt_common_->setTensor("sample_input", sample_input_d_.get(), nvinfer1::Dims{3, {var_size, 64, 512}});
success &= trt_common_->setTensor("sample_output", sample_output_d_.get());
return success;

Execute inference

auto success = trt_common_->enqueueV3(stream_);
return success;

CHANGELOG

Changelog for package autoware_tensorrt_common

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(autoware_tensorrt_common): let a caller offer IO the model may omit (#13347)

    * feat(autoware_tensorrt_common): let a caller offer IO the model may omit A caller declares the IO its node can serve, and setup() compares that list against the model. An architecture variant that gates blocks off declares less than the full contract, and the ONNX exporter drops inputs the traced graph never consumes, so such a model arrives narrower than the offered list and validateNetworkIO rejects it on the count. Every node facing that has to enumerate the model itself and pre-filter its own lists before calling setup(). NetworkIO and ProfileDims entries can now be marked optional, and setup() drops the optional ones the model does not declare before profiling or comparing them. An all-required list behaves exactly as it does today. Reconciliation then requires the offer and the model to account for each other in both directions, refusing a mismatch before an engine is built: Model does not declare the required IO tensor(s): [...] Model declares IO tensor(s) that were not offered: [...] The second direction takes over from validateNetworkIO's cardinality check for caller error. That check compares counts rather than sets, so one tensor the model declares and one surplus offered entry cancelled out and setup() could succeed leaving a tensor unbound; and because it runs after the engine is loaded, a mismatch discarded a good cached engine and burned a full rebuild before failing. The count check stays, now guarding only against the engine's IO set diverging from the parsed network's, which reconciliation runs too early to see. On success setup() says which of the two happened, once: Model declares all 27 offered IO tensors Model declares 20 of 27 offered IO tensors; skipping the optional tensors it does not declare: [serialized_code, ...] so a narrower model is visible at load instead of being inferred from a shape error later. Name resolution for index-addressed entries moves ahead of the profile loop and now covers NetworkIO too, since the name is what the comparison and the log report; an index that cannot be named is an error rather than a crash assigning nullptr to std::string. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * test(autoware_tensorrt_common): cover IO reconciliation against a dummy network Adds the package's first unit tests. A 256-byte ONNX fixture declares three dynamically shaped inputs feeding one output, which is enough to exercise every branch of the offered-IO reconciliation: an artifact declaring everything, an optional tensor the artifact omits (dropped, and both by-name setters no-op for it while a never-offered name still fails), the same when only the profile list offers it, a required tensor the artifact omits (refused before an engine is built, asserted by the absent engine file), the same via the profile list alone, an out-of-range tensor index, a caller offering fewer tensors than the model declares, equal counts covering different sets, and an offer of nothing but optional tensors the artifact omits. The last two would pass a size comparison alone. The tensor-metadata cases need no device and always run. The rest build an engine, so they use autoware_cuda_utils' SKIP_TEST_IF_CUDA_UNAVAILABLE() to skip where there is no GPU, as the CUDA CI job has none. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • feat(autoware_tensorrt_common): add getIOTensorNames (#13346) Callers that need to know what a model declares had to enumerate getNbIOTensors/getIOTensorName themselves, or ask getTensorIOMode one name at a time. The latter is a trap: TensorRT logs an error for every name the engine does not have, so probing a contract against a narrower model fills the log with errors that report nothing wrong. getIOTensorNames enumerates once and returns the set, and its documentation says why it is the right way to ask. Like the accessors it wraps, it reads the parsed network before setup() and the engine afterwards. Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • fix(autoware_tensorrt_common): stop warning on the documented network fallback (#13288) getIOTensorName, getNbIOTensors and getTensorShape(index) fall back to the parsed network when the engine is not built yet. That is the documented contract - the header already says "with fallback from TensorRT network" - and it is how a caller inspects the IO a model declares before setup() builds or loads the engine. Logging kWARNING on every such call turns intended use into noise: enumerating a 27-input encoder emits 27 warnings before the engine exists, which buries the warnings that matter. The log is dropped; a missing network stays an error. The three fallbacks are also flattened to early returns - network missing is an error, an engine short-circuits, otherwise read the network - instead of nesting the network path inside [if (!engine_)]{.title-ref}. network_ is created by initialize() from the constructor and never reset, so testing it first is safe. Every member that reads only state established by the constructor now says so: "Valid immediately after construction. Valid to call before [setup()]{.title-ref}." Co-authored-by: Claude Opus 5 (1M context)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_tensorrt_common at Robotics Stack Exchange

No version for distro lyrical showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_tensorrt_common package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-26
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

tensorrt utility wrapper

Maintainers

  • Dan Umeda
  • Manato Hirabayashi
  • Amadeusz Szymko
  • Kenzo Lobos-Tsunekawa
  • Masato Saeki
  • Yi-Hsiang Fang
  • Max Schmeller

Authors

  • Taichi Higashide
  • Daisuke Nishimatsu

autoware_tensorrt_common

This package provides a high-level API to work with TensorRT. This library simplifies the process of loading, building, and executing TensorRT inference engines using ONNX models. It also includes utilities for profiling and managing TensorRT execution contexts, making it easier to integrate TensorRT-based packages in Autoware.

Usage

Here is an example usage of the library. For the full API documentation, please refer to the doxygen documentation (see header file).

#include <autoware/tensorrt_common/tensorrt_common.hpp>

#include <memory>
#include <utility>
#include <vector>

using autoware::tensorrt_common::TrtCommon;
using autoware::tensorrt_common::TrtCommonConfig;
using autoware::tensorrt_common::TensorInfo;
using autoware::tensorrt_common::NetworkIO;
using autoware::tensorrt_common::ProfileDims;

std::unique_ptr<TrtCommon> trt_common_;

Create a tensorrt common instance and setup engine

  • With minimal configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx"));
trt_common_->setup();

  • With full configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx", "fp16", "/path/to/engine/model.engine", (1ULL << 30U), -1, false));

std::vector<NetworkIO> network_io{
  NetworkIO("sample_input", {3, {-1, 64, 512}}), NetworkIO("sample_output", {1, {50}})};
std::vector<ProfileDims> profile_dims{
  ProfileDims("sample_input", {3, {1, 64, 512}}, {3, {3, 64, 512}}, {3, {9, 64, 512}})};

auto network_io_ptr = std::make_unique<std::vector<NetworkIO>>(network_io);
auto profile_dims_ptr = std::make_unique<std::vector<ProfileDims>>(profile_dims);

trt_common_->setup(std::move(profile_dims_ptr), std::move(network_io_ptr));

By defining network IO names and dimensions, an extra shapes validation will be performed after building / loading engine. This is useful to ensure the model is compatible with current code for preprocessing as it might consists of operations dependent on tensor shapes.

Profile dimension is used to specify the min, opt, and max dimensions for dynamic shapes.

Network IO or / and profile dimensions can be omitted if not needed.

Setting input and output tensors

bool success = true;
success &= trt_common_->setTensor("sample_input", sample_input_d_.get(), nvinfer1::Dims{3, {var_size, 64, 512}});
success &= trt_common_->setTensor("sample_output", sample_output_d_.get());
return success;

Execute inference

auto success = trt_common_->enqueueV3(stream_);
return success;

CHANGELOG

Changelog for package autoware_tensorrt_common

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(autoware_tensorrt_common): let a caller offer IO the model may omit (#13347)

    * feat(autoware_tensorrt_common): let a caller offer IO the model may omit A caller declares the IO its node can serve, and setup() compares that list against the model. An architecture variant that gates blocks off declares less than the full contract, and the ONNX exporter drops inputs the traced graph never consumes, so such a model arrives narrower than the offered list and validateNetworkIO rejects it on the count. Every node facing that has to enumerate the model itself and pre-filter its own lists before calling setup(). NetworkIO and ProfileDims entries can now be marked optional, and setup() drops the optional ones the model does not declare before profiling or comparing them. An all-required list behaves exactly as it does today. Reconciliation then requires the offer and the model to account for each other in both directions, refusing a mismatch before an engine is built: Model does not declare the required IO tensor(s): [...] Model declares IO tensor(s) that were not offered: [...] The second direction takes over from validateNetworkIO's cardinality check for caller error. That check compares counts rather than sets, so one tensor the model declares and one surplus offered entry cancelled out and setup() could succeed leaving a tensor unbound; and because it runs after the engine is loaded, a mismatch discarded a good cached engine and burned a full rebuild before failing. The count check stays, now guarding only against the engine's IO set diverging from the parsed network's, which reconciliation runs too early to see. On success setup() says which of the two happened, once: Model declares all 27 offered IO tensors Model declares 20 of 27 offered IO tensors; skipping the optional tensors it does not declare: [serialized_code, ...] so a narrower model is visible at load instead of being inferred from a shape error later. Name resolution for index-addressed entries moves ahead of the profile loop and now covers NetworkIO too, since the name is what the comparison and the log report; an index that cannot be named is an error rather than a crash assigning nullptr to std::string. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * test(autoware_tensorrt_common): cover IO reconciliation against a dummy network Adds the package's first unit tests. A 256-byte ONNX fixture declares three dynamically shaped inputs feeding one output, which is enough to exercise every branch of the offered-IO reconciliation: an artifact declaring everything, an optional tensor the artifact omits (dropped, and both by-name setters no-op for it while a never-offered name still fails), the same when only the profile list offers it, a required tensor the artifact omits (refused before an engine is built, asserted by the absent engine file), the same via the profile list alone, an out-of-range tensor index, a caller offering fewer tensors than the model declares, equal counts covering different sets, and an offer of nothing but optional tensors the artifact omits. The last two would pass a size comparison alone. The tensor-metadata cases need no device and always run. The rest build an engine, so they use autoware_cuda_utils' SKIP_TEST_IF_CUDA_UNAVAILABLE() to skip where there is no GPU, as the CUDA CI job has none. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • feat(autoware_tensorrt_common): add getIOTensorNames (#13346) Callers that need to know what a model declares had to enumerate getNbIOTensors/getIOTensorName themselves, or ask getTensorIOMode one name at a time. The latter is a trap: TensorRT logs an error for every name the engine does not have, so probing a contract against a narrower model fills the log with errors that report nothing wrong. getIOTensorNames enumerates once and returns the set, and its documentation says why it is the right way to ask. Like the accessors it wraps, it reads the parsed network before setup() and the engine afterwards. Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • fix(autoware_tensorrt_common): stop warning on the documented network fallback (#13288) getIOTensorName, getNbIOTensors and getTensorShape(index) fall back to the parsed network when the engine is not built yet. That is the documented contract - the header already says "with fallback from TensorRT network" - and it is how a caller inspects the IO a model declares before setup() builds or loads the engine. Logging kWARNING on every such call turns intended use into noise: enumerating a 27-input encoder emits 27 warnings before the engine exists, which buries the warnings that matter. The log is dropped; a missing network stays an error. The three fallbacks are also flattened to early returns - network missing is an error, an engine short-circuits, otherwise read the network - instead of nesting the network path inside [if (!engine_)]{.title-ref}. network_ is created by initialize() from the constructor and never reset, so testing it first is safe. Every member that reads only state established by the constructor now says so: "Valid immediately after construction. Valid to call before [setup()]{.title-ref}." Co-authored-by: Claude Opus 5 (1M context)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_tensorrt_common at Robotics Stack Exchange

No version for distro rolling showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_tensorrt_common package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-26
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

tensorrt utility wrapper

Maintainers

  • Dan Umeda
  • Manato Hirabayashi
  • Amadeusz Szymko
  • Kenzo Lobos-Tsunekawa
  • Masato Saeki
  • Yi-Hsiang Fang
  • Max Schmeller

Authors

  • Taichi Higashide
  • Daisuke Nishimatsu

autoware_tensorrt_common

This package provides a high-level API to work with TensorRT. This library simplifies the process of loading, building, and executing TensorRT inference engines using ONNX models. It also includes utilities for profiling and managing TensorRT execution contexts, making it easier to integrate TensorRT-based packages in Autoware.

Usage

Here is an example usage of the library. For the full API documentation, please refer to the doxygen documentation (see header file).

#include <autoware/tensorrt_common/tensorrt_common.hpp>

#include <memory>
#include <utility>
#include <vector>

using autoware::tensorrt_common::TrtCommon;
using autoware::tensorrt_common::TrtCommonConfig;
using autoware::tensorrt_common::TensorInfo;
using autoware::tensorrt_common::NetworkIO;
using autoware::tensorrt_common::ProfileDims;

std::unique_ptr<TrtCommon> trt_common_;

Create a tensorrt common instance and setup engine

  • With minimal configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx"));
trt_common_->setup();

  • With full configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx", "fp16", "/path/to/engine/model.engine", (1ULL << 30U), -1, false));

std::vector<NetworkIO> network_io{
  NetworkIO("sample_input", {3, {-1, 64, 512}}), NetworkIO("sample_output", {1, {50}})};
std::vector<ProfileDims> profile_dims{
  ProfileDims("sample_input", {3, {1, 64, 512}}, {3, {3, 64, 512}}, {3, {9, 64, 512}})};

auto network_io_ptr = std::make_unique<std::vector<NetworkIO>>(network_io);
auto profile_dims_ptr = std::make_unique<std::vector<ProfileDims>>(profile_dims);

trt_common_->setup(std::move(profile_dims_ptr), std::move(network_io_ptr));

By defining network IO names and dimensions, an extra shapes validation will be performed after building / loading engine. This is useful to ensure the model is compatible with current code for preprocessing as it might consists of operations dependent on tensor shapes.

Profile dimension is used to specify the min, opt, and max dimensions for dynamic shapes.

Network IO or / and profile dimensions can be omitted if not needed.

Setting input and output tensors

bool success = true;
success &= trt_common_->setTensor("sample_input", sample_input_d_.get(), nvinfer1::Dims{3, {var_size, 64, 512}});
success &= trt_common_->setTensor("sample_output", sample_output_d_.get());
return success;

Execute inference

auto success = trt_common_->enqueueV3(stream_);
return success;

CHANGELOG

Changelog for package autoware_tensorrt_common

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(autoware_tensorrt_common): let a caller offer IO the model may omit (#13347)

    * feat(autoware_tensorrt_common): let a caller offer IO the model may omit A caller declares the IO its node can serve, and setup() compares that list against the model. An architecture variant that gates blocks off declares less than the full contract, and the ONNX exporter drops inputs the traced graph never consumes, so such a model arrives narrower than the offered list and validateNetworkIO rejects it on the count. Every node facing that has to enumerate the model itself and pre-filter its own lists before calling setup(). NetworkIO and ProfileDims entries can now be marked optional, and setup() drops the optional ones the model does not declare before profiling or comparing them. An all-required list behaves exactly as it does today. Reconciliation then requires the offer and the model to account for each other in both directions, refusing a mismatch before an engine is built: Model does not declare the required IO tensor(s): [...] Model declares IO tensor(s) that were not offered: [...] The second direction takes over from validateNetworkIO's cardinality check for caller error. That check compares counts rather than sets, so one tensor the model declares and one surplus offered entry cancelled out and setup() could succeed leaving a tensor unbound; and because it runs after the engine is loaded, a mismatch discarded a good cached engine and burned a full rebuild before failing. The count check stays, now guarding only against the engine's IO set diverging from the parsed network's, which reconciliation runs too early to see. On success setup() says which of the two happened, once: Model declares all 27 offered IO tensors Model declares 20 of 27 offered IO tensors; skipping the optional tensors it does not declare: [serialized_code, ...] so a narrower model is visible at load instead of being inferred from a shape error later. Name resolution for index-addressed entries moves ahead of the profile loop and now covers NetworkIO too, since the name is what the comparison and the log report; an index that cannot be named is an error rather than a crash assigning nullptr to std::string. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * test(autoware_tensorrt_common): cover IO reconciliation against a dummy network Adds the package's first unit tests. A 256-byte ONNX fixture declares three dynamically shaped inputs feeding one output, which is enough to exercise every branch of the offered-IO reconciliation: an artifact declaring everything, an optional tensor the artifact omits (dropped, and both by-name setters no-op for it while a never-offered name still fails), the same when only the profile list offers it, a required tensor the artifact omits (refused before an engine is built, asserted by the absent engine file), the same via the profile list alone, an out-of-range tensor index, a caller offering fewer tensors than the model declares, equal counts covering different sets, and an offer of nothing but optional tensors the artifact omits. The last two would pass a size comparison alone. The tensor-metadata cases need no device and always run. The rest build an engine, so they use autoware_cuda_utils' SKIP_TEST_IF_CUDA_UNAVAILABLE() to skip where there is no GPU, as the CUDA CI job has none. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • feat(autoware_tensorrt_common): add getIOTensorNames (#13346) Callers that need to know what a model declares had to enumerate getNbIOTensors/getIOTensorName themselves, or ask getTensorIOMode one name at a time. The latter is a trap: TensorRT logs an error for every name the engine does not have, so probing a contract against a narrower model fills the log with errors that report nothing wrong. getIOTensorNames enumerates once and returns the set, and its documentation says why it is the right way to ask. Like the accessors it wraps, it reads the parsed network before setup() and the engine afterwards. Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • fix(autoware_tensorrt_common): stop warning on the documented network fallback (#13288) getIOTensorName, getNbIOTensors and getTensorShape(index) fall back to the parsed network when the engine is not built yet. That is the documented contract - the header already says "with fallback from TensorRT network" - and it is how a caller inspects the IO a model declares before setup() builds or loads the engine. Logging kWARNING on every such call turns intended use into noise: enumerating a 27-input encoder emits 27 warnings before the engine exists, which buries the warnings that matter. The log is dropped; a missing network stays an error. The three fallbacks are also flattened to early returns - network missing is an error, an engine short-circuits, otherwise read the network - instead of nesting the network path inside [if (!engine_)]{.title-ref}. network_ is created by initialize() from the constructor and never reset, so testing it first is safe. Every member that reads only state established by the constructor now says so: "Valid immediately after construction. Valid to call before [setup()]{.title-ref}." Co-authored-by: Claude Opus 5 (1M context)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_tensorrt_common at Robotics Stack Exchange

Package symbol

autoware_tensorrt_common package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-26
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

tensorrt utility wrapper

Maintainers

  • Dan Umeda
  • Manato Hirabayashi
  • Amadeusz Szymko
  • Kenzo Lobos-Tsunekawa
  • Masato Saeki
  • Yi-Hsiang Fang
  • Max Schmeller

Authors

  • Taichi Higashide
  • Daisuke Nishimatsu

autoware_tensorrt_common

This package provides a high-level API to work with TensorRT. This library simplifies the process of loading, building, and executing TensorRT inference engines using ONNX models. It also includes utilities for profiling and managing TensorRT execution contexts, making it easier to integrate TensorRT-based packages in Autoware.

Usage

Here is an example usage of the library. For the full API documentation, please refer to the doxygen documentation (see header file).

#include <autoware/tensorrt_common/tensorrt_common.hpp>

#include <memory>
#include <utility>
#include <vector>

using autoware::tensorrt_common::TrtCommon;
using autoware::tensorrt_common::TrtCommonConfig;
using autoware::tensorrt_common::TensorInfo;
using autoware::tensorrt_common::NetworkIO;
using autoware::tensorrt_common::ProfileDims;

std::unique_ptr<TrtCommon> trt_common_;

Create a tensorrt common instance and setup engine

  • With minimal configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx"));
trt_common_->setup();

  • With full configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx", "fp16", "/path/to/engine/model.engine", (1ULL << 30U), -1, false));

std::vector<NetworkIO> network_io{
  NetworkIO("sample_input", {3, {-1, 64, 512}}), NetworkIO("sample_output", {1, {50}})};
std::vector<ProfileDims> profile_dims{
  ProfileDims("sample_input", {3, {1, 64, 512}}, {3, {3, 64, 512}}, {3, {9, 64, 512}})};

auto network_io_ptr = std::make_unique<std::vector<NetworkIO>>(network_io);
auto profile_dims_ptr = std::make_unique<std::vector<ProfileDims>>(profile_dims);

trt_common_->setup(std::move(profile_dims_ptr), std::move(network_io_ptr));

By defining network IO names and dimensions, an extra shapes validation will be performed after building / loading engine. This is useful to ensure the model is compatible with current code for preprocessing as it might consists of operations dependent on tensor shapes.

Profile dimension is used to specify the min, opt, and max dimensions for dynamic shapes.

Network IO or / and profile dimensions can be omitted if not needed.

Setting input and output tensors

bool success = true;
success &= trt_common_->setTensor("sample_input", sample_input_d_.get(), nvinfer1::Dims{3, {var_size, 64, 512}});
success &= trt_common_->setTensor("sample_output", sample_output_d_.get());
return success;

Execute inference

auto success = trt_common_->enqueueV3(stream_);
return success;

CHANGELOG

Changelog for package autoware_tensorrt_common

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(autoware_tensorrt_common): let a caller offer IO the model may omit (#13347)

    * feat(autoware_tensorrt_common): let a caller offer IO the model may omit A caller declares the IO its node can serve, and setup() compares that list against the model. An architecture variant that gates blocks off declares less than the full contract, and the ONNX exporter drops inputs the traced graph never consumes, so such a model arrives narrower than the offered list and validateNetworkIO rejects it on the count. Every node facing that has to enumerate the model itself and pre-filter its own lists before calling setup(). NetworkIO and ProfileDims entries can now be marked optional, and setup() drops the optional ones the model does not declare before profiling or comparing them. An all-required list behaves exactly as it does today. Reconciliation then requires the offer and the model to account for each other in both directions, refusing a mismatch before an engine is built: Model does not declare the required IO tensor(s): [...] Model declares IO tensor(s) that were not offered: [...] The second direction takes over from validateNetworkIO's cardinality check for caller error. That check compares counts rather than sets, so one tensor the model declares and one surplus offered entry cancelled out and setup() could succeed leaving a tensor unbound; and because it runs after the engine is loaded, a mismatch discarded a good cached engine and burned a full rebuild before failing. The count check stays, now guarding only against the engine's IO set diverging from the parsed network's, which reconciliation runs too early to see. On success setup() says which of the two happened, once: Model declares all 27 offered IO tensors Model declares 20 of 27 offered IO tensors; skipping the optional tensors it does not declare: [serialized_code, ...] so a narrower model is visible at load instead of being inferred from a shape error later. Name resolution for index-addressed entries moves ahead of the profile loop and now covers NetworkIO too, since the name is what the comparison and the log report; an index that cannot be named is an error rather than a crash assigning nullptr to std::string. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * test(autoware_tensorrt_common): cover IO reconciliation against a dummy network Adds the package's first unit tests. A 256-byte ONNX fixture declares three dynamically shaped inputs feeding one output, which is enough to exercise every branch of the offered-IO reconciliation: an artifact declaring everything, an optional tensor the artifact omits (dropped, and both by-name setters no-op for it while a never-offered name still fails), the same when only the profile list offers it, a required tensor the artifact omits (refused before an engine is built, asserted by the absent engine file), the same via the profile list alone, an out-of-range tensor index, a caller offering fewer tensors than the model declares, equal counts covering different sets, and an offer of nothing but optional tensors the artifact omits. The last two would pass a size comparison alone. The tensor-metadata cases need no device and always run. The rest build an engine, so they use autoware_cuda_utils' SKIP_TEST_IF_CUDA_UNAVAILABLE() to skip where there is no GPU, as the CUDA CI job has none. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • feat(autoware_tensorrt_common): add getIOTensorNames (#13346) Callers that need to know what a model declares had to enumerate getNbIOTensors/getIOTensorName themselves, or ask getTensorIOMode one name at a time. The latter is a trap: TensorRT logs an error for every name the engine does not have, so probing a contract against a narrower model fills the log with errors that report nothing wrong. getIOTensorNames enumerates once and returns the set, and its documentation says why it is the right way to ask. Like the accessors it wraps, it reads the parsed network before setup() and the engine afterwards. Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • fix(autoware_tensorrt_common): stop warning on the documented network fallback (#13288) getIOTensorName, getNbIOTensors and getTensorShape(index) fall back to the parsed network when the engine is not built yet. That is the documented contract - the header already says "with fallback from TensorRT network" - and it is how a caller inspects the IO a model declares before setup() builds or loads the engine. Logging kWARNING on every such call turns intended use into noise: enumerating a 27-input encoder emits 27 warnings before the engine exists, which buries the warnings that matter. The log is dropped; a missing network stays an error. The three fallbacks are also flattened to early returns - network missing is an error, an engine short-circuits, otherwise read the network - instead of nesting the network path inside [if (!engine_)]{.title-ref}. network_ is created by initialize() from the constructor and never reset, so testing it first is safe. Every member that reads only state established by the constructor now says so: "Valid immediately after construction. Valid to call before [setup()]{.title-ref}." Co-authored-by: Claude Opus 5 (1M context)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_tensorrt_common at Robotics Stack Exchange

No version for distro galactic showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_tensorrt_common package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-26
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

tensorrt utility wrapper

Maintainers

  • Dan Umeda
  • Manato Hirabayashi
  • Amadeusz Szymko
  • Kenzo Lobos-Tsunekawa
  • Masato Saeki
  • Yi-Hsiang Fang
  • Max Schmeller

Authors

  • Taichi Higashide
  • Daisuke Nishimatsu

autoware_tensorrt_common

This package provides a high-level API to work with TensorRT. This library simplifies the process of loading, building, and executing TensorRT inference engines using ONNX models. It also includes utilities for profiling and managing TensorRT execution contexts, making it easier to integrate TensorRT-based packages in Autoware.

Usage

Here is an example usage of the library. For the full API documentation, please refer to the doxygen documentation (see header file).

#include <autoware/tensorrt_common/tensorrt_common.hpp>

#include <memory>
#include <utility>
#include <vector>

using autoware::tensorrt_common::TrtCommon;
using autoware::tensorrt_common::TrtCommonConfig;
using autoware::tensorrt_common::TensorInfo;
using autoware::tensorrt_common::NetworkIO;
using autoware::tensorrt_common::ProfileDims;

std::unique_ptr<TrtCommon> trt_common_;

Create a tensorrt common instance and setup engine

  • With minimal configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx"));
trt_common_->setup();

  • With full configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx", "fp16", "/path/to/engine/model.engine", (1ULL << 30U), -1, false));

std::vector<NetworkIO> network_io{
  NetworkIO("sample_input", {3, {-1, 64, 512}}), NetworkIO("sample_output", {1, {50}})};
std::vector<ProfileDims> profile_dims{
  ProfileDims("sample_input", {3, {1, 64, 512}}, {3, {3, 64, 512}}, {3, {9, 64, 512}})};

auto network_io_ptr = std::make_unique<std::vector<NetworkIO>>(network_io);
auto profile_dims_ptr = std::make_unique<std::vector<ProfileDims>>(profile_dims);

trt_common_->setup(std::move(profile_dims_ptr), std::move(network_io_ptr));

By defining network IO names and dimensions, an extra shapes validation will be performed after building / loading engine. This is useful to ensure the model is compatible with current code for preprocessing as it might consists of operations dependent on tensor shapes.

Profile dimension is used to specify the min, opt, and max dimensions for dynamic shapes.

Network IO or / and profile dimensions can be omitted if not needed.

Setting input and output tensors

bool success = true;
success &= trt_common_->setTensor("sample_input", sample_input_d_.get(), nvinfer1::Dims{3, {var_size, 64, 512}});
success &= trt_common_->setTensor("sample_output", sample_output_d_.get());
return success;

Execute inference

auto success = trt_common_->enqueueV3(stream_);
return success;

CHANGELOG

Changelog for package autoware_tensorrt_common

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(autoware_tensorrt_common): let a caller offer IO the model may omit (#13347)

    * feat(autoware_tensorrt_common): let a caller offer IO the model may omit A caller declares the IO its node can serve, and setup() compares that list against the model. An architecture variant that gates blocks off declares less than the full contract, and the ONNX exporter drops inputs the traced graph never consumes, so such a model arrives narrower than the offered list and validateNetworkIO rejects it on the count. Every node facing that has to enumerate the model itself and pre-filter its own lists before calling setup(). NetworkIO and ProfileDims entries can now be marked optional, and setup() drops the optional ones the model does not declare before profiling or comparing them. An all-required list behaves exactly as it does today. Reconciliation then requires the offer and the model to account for each other in both directions, refusing a mismatch before an engine is built: Model does not declare the required IO tensor(s): [...] Model declares IO tensor(s) that were not offered: [...] The second direction takes over from validateNetworkIO's cardinality check for caller error. That check compares counts rather than sets, so one tensor the model declares and one surplus offered entry cancelled out and setup() could succeed leaving a tensor unbound; and because it runs after the engine is loaded, a mismatch discarded a good cached engine and burned a full rebuild before failing. The count check stays, now guarding only against the engine's IO set diverging from the parsed network's, which reconciliation runs too early to see. On success setup() says which of the two happened, once: Model declares all 27 offered IO tensors Model declares 20 of 27 offered IO tensors; skipping the optional tensors it does not declare: [serialized_code, ...] so a narrower model is visible at load instead of being inferred from a shape error later. Name resolution for index-addressed entries moves ahead of the profile loop and now covers NetworkIO too, since the name is what the comparison and the log report; an index that cannot be named is an error rather than a crash assigning nullptr to std::string. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * test(autoware_tensorrt_common): cover IO reconciliation against a dummy network Adds the package's first unit tests. A 256-byte ONNX fixture declares three dynamically shaped inputs feeding one output, which is enough to exercise every branch of the offered-IO reconciliation: an artifact declaring everything, an optional tensor the artifact omits (dropped, and both by-name setters no-op for it while a never-offered name still fails), the same when only the profile list offers it, a required tensor the artifact omits (refused before an engine is built, asserted by the absent engine file), the same via the profile list alone, an out-of-range tensor index, a caller offering fewer tensors than the model declares, equal counts covering different sets, and an offer of nothing but optional tensors the artifact omits. The last two would pass a size comparison alone. The tensor-metadata cases need no device and always run. The rest build an engine, so they use autoware_cuda_utils' SKIP_TEST_IF_CUDA_UNAVAILABLE() to skip where there is no GPU, as the CUDA CI job has none. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • feat(autoware_tensorrt_common): add getIOTensorNames (#13346) Callers that need to know what a model declares had to enumerate getNbIOTensors/getIOTensorName themselves, or ask getTensorIOMode one name at a time. The latter is a trap: TensorRT logs an error for every name the engine does not have, so probing a contract against a narrower model fills the log with errors that report nothing wrong. getIOTensorNames enumerates once and returns the set, and its documentation says why it is the right way to ask. Like the accessors it wraps, it reads the parsed network before setup() and the engine afterwards. Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • fix(autoware_tensorrt_common): stop warning on the documented network fallback (#13288) getIOTensorName, getNbIOTensors and getTensorShape(index) fall back to the parsed network when the engine is not built yet. That is the documented contract - the header already says "with fallback from TensorRT network" - and it is how a caller inspects the IO a model declares before setup() builds or loads the engine. Logging kWARNING on every such call turns intended use into noise: enumerating a 27-input encoder emits 27 warnings before the engine exists, which buries the warnings that matter. The log is dropped; a missing network stays an error. The three fallbacks are also flattened to early returns - network missing is an error, an engine short-circuits, otherwise read the network - instead of nesting the network path inside [if (!engine_)]{.title-ref}. network_ is created by initialize() from the constructor and never reset, so testing it first is safe. Every member that reads only state established by the constructor now says so: "Valid immediately after construction. Valid to call before [setup()]{.title-ref}." Co-authored-by: Claude Opus 5 (1M context)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_tensorrt_common at Robotics Stack Exchange

No version for distro iron showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_tensorrt_common package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-26
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

tensorrt utility wrapper

Maintainers

  • Dan Umeda
  • Manato Hirabayashi
  • Amadeusz Szymko
  • Kenzo Lobos-Tsunekawa
  • Masato Saeki
  • Yi-Hsiang Fang
  • Max Schmeller

Authors

  • Taichi Higashide
  • Daisuke Nishimatsu

autoware_tensorrt_common

This package provides a high-level API to work with TensorRT. This library simplifies the process of loading, building, and executing TensorRT inference engines using ONNX models. It also includes utilities for profiling and managing TensorRT execution contexts, making it easier to integrate TensorRT-based packages in Autoware.

Usage

Here is an example usage of the library. For the full API documentation, please refer to the doxygen documentation (see header file).

#include <autoware/tensorrt_common/tensorrt_common.hpp>

#include <memory>
#include <utility>
#include <vector>

using autoware::tensorrt_common::TrtCommon;
using autoware::tensorrt_common::TrtCommonConfig;
using autoware::tensorrt_common::TensorInfo;
using autoware::tensorrt_common::NetworkIO;
using autoware::tensorrt_common::ProfileDims;

std::unique_ptr<TrtCommon> trt_common_;

Create a tensorrt common instance and setup engine

  • With minimal configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx"));
trt_common_->setup();

  • With full configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx", "fp16", "/path/to/engine/model.engine", (1ULL << 30U), -1, false));

std::vector<NetworkIO> network_io{
  NetworkIO("sample_input", {3, {-1, 64, 512}}), NetworkIO("sample_output", {1, {50}})};
std::vector<ProfileDims> profile_dims{
  ProfileDims("sample_input", {3, {1, 64, 512}}, {3, {3, 64, 512}}, {3, {9, 64, 512}})};

auto network_io_ptr = std::make_unique<std::vector<NetworkIO>>(network_io);
auto profile_dims_ptr = std::make_unique<std::vector<ProfileDims>>(profile_dims);

trt_common_->setup(std::move(profile_dims_ptr), std::move(network_io_ptr));

By defining network IO names and dimensions, an extra shapes validation will be performed after building / loading engine. This is useful to ensure the model is compatible with current code for preprocessing as it might consists of operations dependent on tensor shapes.

Profile dimension is used to specify the min, opt, and max dimensions for dynamic shapes.

Network IO or / and profile dimensions can be omitted if not needed.

Setting input and output tensors

bool success = true;
success &= trt_common_->setTensor("sample_input", sample_input_d_.get(), nvinfer1::Dims{3, {var_size, 64, 512}});
success &= trt_common_->setTensor("sample_output", sample_output_d_.get());
return success;

Execute inference

auto success = trt_common_->enqueueV3(stream_);
return success;

CHANGELOG

Changelog for package autoware_tensorrt_common

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(autoware_tensorrt_common): let a caller offer IO the model may omit (#13347)

    * feat(autoware_tensorrt_common): let a caller offer IO the model may omit A caller declares the IO its node can serve, and setup() compares that list against the model. An architecture variant that gates blocks off declares less than the full contract, and the ONNX exporter drops inputs the traced graph never consumes, so such a model arrives narrower than the offered list and validateNetworkIO rejects it on the count. Every node facing that has to enumerate the model itself and pre-filter its own lists before calling setup(). NetworkIO and ProfileDims entries can now be marked optional, and setup() drops the optional ones the model does not declare before profiling or comparing them. An all-required list behaves exactly as it does today. Reconciliation then requires the offer and the model to account for each other in both directions, refusing a mismatch before an engine is built: Model does not declare the required IO tensor(s): [...] Model declares IO tensor(s) that were not offered: [...] The second direction takes over from validateNetworkIO's cardinality check for caller error. That check compares counts rather than sets, so one tensor the model declares and one surplus offered entry cancelled out and setup() could succeed leaving a tensor unbound; and because it runs after the engine is loaded, a mismatch discarded a good cached engine and burned a full rebuild before failing. The count check stays, now guarding only against the engine's IO set diverging from the parsed network's, which reconciliation runs too early to see. On success setup() says which of the two happened, once: Model declares all 27 offered IO tensors Model declares 20 of 27 offered IO tensors; skipping the optional tensors it does not declare: [serialized_code, ...] so a narrower model is visible at load instead of being inferred from a shape error later. Name resolution for index-addressed entries moves ahead of the profile loop and now covers NetworkIO too, since the name is what the comparison and the log report; an index that cannot be named is an error rather than a crash assigning nullptr to std::string. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * test(autoware_tensorrt_common): cover IO reconciliation against a dummy network Adds the package's first unit tests. A 256-byte ONNX fixture declares three dynamically shaped inputs feeding one output, which is enough to exercise every branch of the offered-IO reconciliation: an artifact declaring everything, an optional tensor the artifact omits (dropped, and both by-name setters no-op for it while a never-offered name still fails), the same when only the profile list offers it, a required tensor the artifact omits (refused before an engine is built, asserted by the absent engine file), the same via the profile list alone, an out-of-range tensor index, a caller offering fewer tensors than the model declares, equal counts covering different sets, and an offer of nothing but optional tensors the artifact omits. The last two would pass a size comparison alone. The tensor-metadata cases need no device and always run. The rest build an engine, so they use autoware_cuda_utils' SKIP_TEST_IF_CUDA_UNAVAILABLE() to skip where there is no GPU, as the CUDA CI job has none. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • feat(autoware_tensorrt_common): add getIOTensorNames (#13346) Callers that need to know what a model declares had to enumerate getNbIOTensors/getIOTensorName themselves, or ask getTensorIOMode one name at a time. The latter is a trap: TensorRT logs an error for every name the engine does not have, so probing a contract against a narrower model fills the log with errors that report nothing wrong. getIOTensorNames enumerates once and returns the set, and its documentation says why it is the right way to ask. Like the accessors it wraps, it reads the parsed network before setup() and the engine afterwards. Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • fix(autoware_tensorrt_common): stop warning on the documented network fallback (#13288) getIOTensorName, getNbIOTensors and getTensorShape(index) fall back to the parsed network when the engine is not built yet. That is the documented contract - the header already says "with fallback from TensorRT network" - and it is how a caller inspects the IO a model declares before setup() builds or loads the engine. Logging kWARNING on every such call turns intended use into noise: enumerating a 27-input encoder emits 27 warnings before the engine exists, which buries the warnings that matter. The log is dropped; a missing network stays an error. The three fallbacks are also flattened to early returns - network missing is an error, an engine short-circuits, otherwise read the network - instead of nesting the network path inside [if (!engine_)]{.title-ref}. network_ is created by initialize() from the constructor and never reset, so testing it first is safe. Every member that reads only state established by the constructor now says so: "Valid immediately after construction. Valid to call before [setup()]{.title-ref}." Co-authored-by: Claude Opus 5 (1M context)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_tensorrt_common at Robotics Stack Exchange

No version for distro melodic showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_tensorrt_common package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-26
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

tensorrt utility wrapper

Maintainers

  • Dan Umeda
  • Manato Hirabayashi
  • Amadeusz Szymko
  • Kenzo Lobos-Tsunekawa
  • Masato Saeki
  • Yi-Hsiang Fang
  • Max Schmeller

Authors

  • Taichi Higashide
  • Daisuke Nishimatsu

autoware_tensorrt_common

This package provides a high-level API to work with TensorRT. This library simplifies the process of loading, building, and executing TensorRT inference engines using ONNX models. It also includes utilities for profiling and managing TensorRT execution contexts, making it easier to integrate TensorRT-based packages in Autoware.

Usage

Here is an example usage of the library. For the full API documentation, please refer to the doxygen documentation (see header file).

#include <autoware/tensorrt_common/tensorrt_common.hpp>

#include <memory>
#include <utility>
#include <vector>

using autoware::tensorrt_common::TrtCommon;
using autoware::tensorrt_common::TrtCommonConfig;
using autoware::tensorrt_common::TensorInfo;
using autoware::tensorrt_common::NetworkIO;
using autoware::tensorrt_common::ProfileDims;

std::unique_ptr<TrtCommon> trt_common_;

Create a tensorrt common instance and setup engine

  • With minimal configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx"));
trt_common_->setup();

  • With full configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx", "fp16", "/path/to/engine/model.engine", (1ULL << 30U), -1, false));

std::vector<NetworkIO> network_io{
  NetworkIO("sample_input", {3, {-1, 64, 512}}), NetworkIO("sample_output", {1, {50}})};
std::vector<ProfileDims> profile_dims{
  ProfileDims("sample_input", {3, {1, 64, 512}}, {3, {3, 64, 512}}, {3, {9, 64, 512}})};

auto network_io_ptr = std::make_unique<std::vector<NetworkIO>>(network_io);
auto profile_dims_ptr = std::make_unique<std::vector<ProfileDims>>(profile_dims);

trt_common_->setup(std::move(profile_dims_ptr), std::move(network_io_ptr));

By defining network IO names and dimensions, an extra shapes validation will be performed after building / loading engine. This is useful to ensure the model is compatible with current code for preprocessing as it might consists of operations dependent on tensor shapes.

Profile dimension is used to specify the min, opt, and max dimensions for dynamic shapes.

Network IO or / and profile dimensions can be omitted if not needed.

Setting input and output tensors

bool success = true;
success &= trt_common_->setTensor("sample_input", sample_input_d_.get(), nvinfer1::Dims{3, {var_size, 64, 512}});
success &= trt_common_->setTensor("sample_output", sample_output_d_.get());
return success;

Execute inference

auto success = trt_common_->enqueueV3(stream_);
return success;

CHANGELOG

Changelog for package autoware_tensorrt_common

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(autoware_tensorrt_common): let a caller offer IO the model may omit (#13347)

    * feat(autoware_tensorrt_common): let a caller offer IO the model may omit A caller declares the IO its node can serve, and setup() compares that list against the model. An architecture variant that gates blocks off declares less than the full contract, and the ONNX exporter drops inputs the traced graph never consumes, so such a model arrives narrower than the offered list and validateNetworkIO rejects it on the count. Every node facing that has to enumerate the model itself and pre-filter its own lists before calling setup(). NetworkIO and ProfileDims entries can now be marked optional, and setup() drops the optional ones the model does not declare before profiling or comparing them. An all-required list behaves exactly as it does today. Reconciliation then requires the offer and the model to account for each other in both directions, refusing a mismatch before an engine is built: Model does not declare the required IO tensor(s): [...] Model declares IO tensor(s) that were not offered: [...] The second direction takes over from validateNetworkIO's cardinality check for caller error. That check compares counts rather than sets, so one tensor the model declares and one surplus offered entry cancelled out and setup() could succeed leaving a tensor unbound; and because it runs after the engine is loaded, a mismatch discarded a good cached engine and burned a full rebuild before failing. The count check stays, now guarding only against the engine's IO set diverging from the parsed network's, which reconciliation runs too early to see. On success setup() says which of the two happened, once: Model declares all 27 offered IO tensors Model declares 20 of 27 offered IO tensors; skipping the optional tensors it does not declare: [serialized_code, ...] so a narrower model is visible at load instead of being inferred from a shape error later. Name resolution for index-addressed entries moves ahead of the profile loop and now covers NetworkIO too, since the name is what the comparison and the log report; an index that cannot be named is an error rather than a crash assigning nullptr to std::string. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * test(autoware_tensorrt_common): cover IO reconciliation against a dummy network Adds the package's first unit tests. A 256-byte ONNX fixture declares three dynamically shaped inputs feeding one output, which is enough to exercise every branch of the offered-IO reconciliation: an artifact declaring everything, an optional tensor the artifact omits (dropped, and both by-name setters no-op for it while a never-offered name still fails), the same when only the profile list offers it, a required tensor the artifact omits (refused before an engine is built, asserted by the absent engine file), the same via the profile list alone, an out-of-range tensor index, a caller offering fewer tensors than the model declares, equal counts covering different sets, and an offer of nothing but optional tensors the artifact omits. The last two would pass a size comparison alone. The tensor-metadata cases need no device and always run. The rest build an engine, so they use autoware_cuda_utils' SKIP_TEST_IF_CUDA_UNAVAILABLE() to skip where there is no GPU, as the CUDA CI job has none. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • feat(autoware_tensorrt_common): add getIOTensorNames (#13346) Callers that need to know what a model declares had to enumerate getNbIOTensors/getIOTensorName themselves, or ask getTensorIOMode one name at a time. The latter is a trap: TensorRT logs an error for every name the engine does not have, so probing a contract against a narrower model fills the log with errors that report nothing wrong. getIOTensorNames enumerates once and returns the set, and its documentation says why it is the right way to ask. Like the accessors it wraps, it reads the parsed network before setup() and the engine afterwards. Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • fix(autoware_tensorrt_common): stop warning on the documented network fallback (#13288) getIOTensorName, getNbIOTensors and getTensorShape(index) fall back to the parsed network when the engine is not built yet. That is the documented contract - the header already says "with fallback from TensorRT network" - and it is how a caller inspects the IO a model declares before setup() builds or loads the engine. Logging kWARNING on every such call turns intended use into noise: enumerating a 27-input encoder emits 27 warnings before the engine exists, which buries the warnings that matter. The log is dropped; a missing network stays an error. The three fallbacks are also flattened to early returns - network missing is an error, an engine short-circuits, otherwise read the network - instead of nesting the network path inside [if (!engine_)]{.title-ref}. network_ is created by initialize() from the constructor and never reset, so testing it first is safe. Every member that reads only state established by the constructor now says so: "Valid immediately after construction. Valid to call before [setup()]{.title-ref}." Co-authored-by: Claude Opus 5 (1M context)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_tensorrt_common at Robotics Stack Exchange

No version for distro noetic showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_tensorrt_common package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-26
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

tensorrt utility wrapper

Maintainers

  • Dan Umeda
  • Manato Hirabayashi
  • Amadeusz Szymko
  • Kenzo Lobos-Tsunekawa
  • Masato Saeki
  • Yi-Hsiang Fang
  • Max Schmeller

Authors

  • Taichi Higashide
  • Daisuke Nishimatsu

autoware_tensorrt_common

This package provides a high-level API to work with TensorRT. This library simplifies the process of loading, building, and executing TensorRT inference engines using ONNX models. It also includes utilities for profiling and managing TensorRT execution contexts, making it easier to integrate TensorRT-based packages in Autoware.

Usage

Here is an example usage of the library. For the full API documentation, please refer to the doxygen documentation (see header file).

#include <autoware/tensorrt_common/tensorrt_common.hpp>

#include <memory>
#include <utility>
#include <vector>

using autoware::tensorrt_common::TrtCommon;
using autoware::tensorrt_common::TrtCommonConfig;
using autoware::tensorrt_common::TensorInfo;
using autoware::tensorrt_common::NetworkIO;
using autoware::tensorrt_common::ProfileDims;

std::unique_ptr<TrtCommon> trt_common_;

Create a tensorrt common instance and setup engine

  • With minimal configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx"));
trt_common_->setup();

  • With full configuration.
trt_common_ = std::make_unique<TrtCommon>(TrtCommonConfig("/path/to/onnx/model.onnx", "fp16", "/path/to/engine/model.engine", (1ULL << 30U), -1, false));

std::vector<NetworkIO> network_io{
  NetworkIO("sample_input", {3, {-1, 64, 512}}), NetworkIO("sample_output", {1, {50}})};
std::vector<ProfileDims> profile_dims{
  ProfileDims("sample_input", {3, {1, 64, 512}}, {3, {3, 64, 512}}, {3, {9, 64, 512}})};

auto network_io_ptr = std::make_unique<std::vector<NetworkIO>>(network_io);
auto profile_dims_ptr = std::make_unique<std::vector<ProfileDims>>(profile_dims);

trt_common_->setup(std::move(profile_dims_ptr), std::move(network_io_ptr));

By defining network IO names and dimensions, an extra shapes validation will be performed after building / loading engine. This is useful to ensure the model is compatible with current code for preprocessing as it might consists of operations dependent on tensor shapes.

Profile dimension is used to specify the min, opt, and max dimensions for dynamic shapes.

Network IO or / and profile dimensions can be omitted if not needed.

Setting input and output tensors

bool success = true;
success &= trt_common_->setTensor("sample_input", sample_input_d_.get(), nvinfer1::Dims{3, {var_size, 64, 512}});
success &= trt_common_->setTensor("sample_output", sample_output_d_.get());
return success;

Execute inference

auto success = trt_common_->enqueueV3(stream_);
return success;

CHANGELOG

Changelog for package autoware_tensorrt_common

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(autoware_tensorrt_common): let a caller offer IO the model may omit (#13347)

    * feat(autoware_tensorrt_common): let a caller offer IO the model may omit A caller declares the IO its node can serve, and setup() compares that list against the model. An architecture variant that gates blocks off declares less than the full contract, and the ONNX exporter drops inputs the traced graph never consumes, so such a model arrives narrower than the offered list and validateNetworkIO rejects it on the count. Every node facing that has to enumerate the model itself and pre-filter its own lists before calling setup(). NetworkIO and ProfileDims entries can now be marked optional, and setup() drops the optional ones the model does not declare before profiling or comparing them. An all-required list behaves exactly as it does today. Reconciliation then requires the offer and the model to account for each other in both directions, refusing a mismatch before an engine is built: Model does not declare the required IO tensor(s): [...] Model declares IO tensor(s) that were not offered: [...] The second direction takes over from validateNetworkIO's cardinality check for caller error. That check compares counts rather than sets, so one tensor the model declares and one surplus offered entry cancelled out and setup() could succeed leaving a tensor unbound; and because it runs after the engine is loaded, a mismatch discarded a good cached engine and burned a full rebuild before failing. The count check stays, now guarding only against the engine's IO set diverging from the parsed network's, which reconciliation runs too early to see. On success setup() says which of the two happened, once: Model declares all 27 offered IO tensors Model declares 20 of 27 offered IO tensors; skipping the optional tensors it does not declare: [serialized_code, ...] so a narrower model is visible at load instead of being inferred from a shape error later. Name resolution for index-addressed entries moves ahead of the profile loop and now covers NetworkIO too, since the name is what the comparison and the log report; an index that cannot be named is an error rather than a crash assigning nullptr to std::string. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * test(autoware_tensorrt_common): cover IO reconciliation against a dummy network Adds the package's first unit tests. A 256-byte ONNX fixture declares three dynamically shaped inputs feeding one output, which is enough to exercise every branch of the offered-IO reconciliation: an artifact declaring everything, an optional tensor the artifact omits (dropped, and both by-name setters no-op for it while a never-offered name still fails), the same when only the profile list offers it, a required tensor the artifact omits (refused before an engine is built, asserted by the absent engine file), the same via the profile list alone, an out-of-range tensor index, a caller offering fewer tensors than the model declares, equal counts covering different sets, and an offer of nothing but optional tensors the artifact omits. The last two would pass a size comparison alone. The tensor-metadata cases need no device and always run. The rest build an engine, so they use autoware_cuda_utils' SKIP_TEST_IF_CUDA_UNAVAILABLE() to skip where there is no GPU, as the CUDA CI job has none. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • feat(autoware_tensorrt_common): add getIOTensorNames (#13346) Callers that need to know what a model declares had to enumerate getNbIOTensors/getIOTensorName themselves, or ask getTensorIOMode one name at a time. The latter is a trap: TensorRT logs an error for every name the engine does not have, so probing a contract against a narrower model fills the log with errors that report nothing wrong. getIOTensorNames enumerates once and returns the set, and its documentation says why it is the right way to ask. Like the accessors it wraps, it reads the parsed network before setup() and the engine afterwards. Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • fix(autoware_tensorrt_common): stop warning on the documented network fallback (#13288) getIOTensorName, getNbIOTensors and getTensorShape(index) fall back to the parsed network when the engine is not built yet. That is the documented contract - the header already says "with fallback from TensorRT network" - and it is how a caller inspects the IO a model declares before setup() builds or loads the engine. Logging kWARNING on every such call turns intended use into noise: enumerating a 27-input encoder emits 27 warnings before the engine exists, which buries the warnings that matter. The log is dropped; a missing network stays an error. The three fallbacks are also flattened to early returns - network missing is an error, an engine short-circuits, otherwise read the network - instead of nesting the network path inside [if (!engine_)]{.title-ref}. network_ is created by initialize() from the constructor and never reset, so testing it first is safe. Every member that reads only state established by the constructor now says so: "Valid immediately after construction. Valid to call before [setup()]{.title-ref}." Co-authored-by: Claude Opus 5 (1M context)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_tensorrt_common at Robotics Stack Exchange