Skip to content

Commit 892c29f

Browse files
authored
Merge branch 'main' into feat/remove-glog-from-online-evaluator-node-constructor
2 parents 2068802 + 9eec3a4 commit 892c29f

File tree

27 files changed

+344
-286
lines changed

27 files changed

+344
-286
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ control/autoware_control_validator/** kyoichi.sugahara@tier4.jp makoto.kurihara@
2525
control/autoware_external_cmd_selector/** fumiya.watanabe@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
2626
control/autoware_joy_controller/** fumiya.watanabe@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
2727
control/autoware_lane_departure_checker/** kyoichi.sugahara@tier4.jp makoto.kurihara@tier4.jp zulfaqar.azmi@tier4.jp
28-
control/autoware_mpc_lateral_controller/** alqudah.mohammad@tier4.jp kyoichi.sugahara@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
28+
control/autoware_mpc_lateral_controller/** alqudah.mohammad@tier4.jp arjun.ram@tier4.jp kyoichi.sugahara@tier4.jp
2929
control/autoware_obstacle_collision_checker/** fumiya.watanabe@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
3030
control/autoware_operation_mode_transition_manager/** isamu.takagi@tier4.jp taiki.yamada@tier4.jp
3131
control/autoware_pid_longitudinal_controller/** arjun.ram@tier4.jp kyoichi.sugahara@tier4.jp yuki.takagi@tier4.jp
@@ -118,8 +118,8 @@ perception/perception_utils/** lei.gu@tier4.jp taekjin.lee@tier4.jp yoshi.ri@tie
118118
planning/autoware_costmap_generator/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
119119
planning/autoware_diffusion_planner/** daniel.sanchez@tier4.jp go.sakayori@tier4.jp shintaro.sakoda@tier4.jp yukihiro.saito@tier4.jp
120120
planning/autoware_external_velocity_limit_selector/** satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomohito.ando@tier4.jp tomoya.kimura@tier4.jp
121-
planning/autoware_freespace_planner/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
122-
planning/autoware_freespace_planning_algorithms/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
121+
planning/autoware_freespace_planner/** alqudah.mohammad@tier4.jp kosuke.takeuchi@tier4.jp
122+
planning/autoware_freespace_planning_algorithms/** alqudah.mohammad@tier4.jp kosuke.takeuchi@tier4.jp
123123
planning/autoware_hazard_lights_selector/** makoto.kurihara@tier4.jp mamoru.sobue@tier4.jp
124124
planning/autoware_manual_lane_change_handler/** arjun.ram@tier4.jp
125125
planning/autoware_mission_planner_universe/** isamu.takagi@tier4.jp kosuke.takeuchi@tier4.jp mamoru.sobue@tier4.jp ryohsuke.mitsudome@tier4.jp taiki.yamada@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp

control/autoware_pid_longitudinal_controller/src/pid_longitudinal_controller.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,12 @@ PidLongitudinalController::Motion PidLongitudinalController::calcCtrlCmd(
816816

817817
m_debug_values.setValues(DebugValues::TYPE::ACC_CMD_ACC_LIMITED, ctrl_cmd_as_pedal_pos.acc);
818818
m_debug_values.setValues(DebugValues::TYPE::ACC_CMD_JERK_LIMITED, ctrl_cmd_as_pedal_pos.acc);
819+
820+
if (m_enable_slope_compensation) {
821+
const double pitch_limited =
822+
std::clamp(control_data.slope_angle, m_min_pitch_rad, m_max_pitch_rad);
823+
ctrl_cmd_as_pedal_pos.acc -= 9.81 * std::sin(std::abs(pitch_limited));
824+
}
819825
m_debug_values.setValues(DebugValues::TYPE::ACC_CMD_SLOPE_APPLIED, ctrl_cmd_as_pedal_pos.acc);
820826

821827
RCLCPP_DEBUG(

perception/autoware_camera_streampetr/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ You can download the ONNX model files for StreamPETR. The files should be placed
152152

153153
Required model files:
154154

155-
- Backbone ONNX model: TODO
156-
- Head ONNX model: TODO
157-
- Position embedding ONNX model: TODO
155+
- [Backbone ONNX Model](https://awf.ml.dev.web.auto/perception/models/streampetr/v1/simplify_extract_img_feat.onnx)
156+
- [Head ONNX Model](https://awf.ml.dev.web.auto/perception/models/streampetr/v1/simplify_pts_head_memory.onnx)
157+
- [Position Embedding ONNX Model](https://awf.ml.dev.web.auto/perception/models/streampetr/v1/simplify_position_embedding.onnx)
158158

159159
If you want to train and deploy your own model, you can find the source code for that in [AWML](https://github.com/tier4/AWML/tree/main/projects/StreamPETR).
160160

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**:
2+
ros__parameters:
3+
debug_mode: true # Whether to enable debug mode, which may include additional logging
4+
max_camera_time_diff: 0.15 #Maximum allowed time difference for camera image sync in seconds
5+
multithreading: false # Whether to use multithreading for handling image callbacks
6+
anchor_camera_id: 0 # Camera id of the anchor topic. The forward pass begins once every anchor camera topic reaches.
7+
is_compressed_image: false # Whether the input images are compressed
8+
is_distorted_image: false # Whether the input images are distorted
9+
model_params:
10+
11+
trt_precision: "fp16" # TensorRT precision mode: "fp16" or "fp32"
12+
use_temporal: true # Can the model use temporal information or not.
13+
14+
backbone_path: "$(var model_path)/simplify_extract_img_feat.onnx" # Path to the backbone onnx file, relative to the model_param_path
15+
head_path: "$(var model_path)/simplify_pts_head_memory.onnx" # Path to the detection head onnx file, relative to the model_param_path
16+
position_embedding_path: "$(var model_path)/simplify_position_embedding.onnx" # Path to the position embedding onnx file, relative to the model_param_path
17+
18+
backbone_engine_path: "" # Path to the tensorRT engine file for the backbone. If empty, the path will be set to backbone_path with .engine extension, and the engine will be built if it does not exist.
19+
head_engine_path: "" # Path to the tensorRT engine file for the head. If empty, the path will be set to head_path with .engine extension, and the engine will be built if it does not exist.
20+
position_embedding_engine_path: "" # Path to the tensorRT engine file for the position embedding. If empty, the path will be set to position_embedding_path with .engine extension, and the engine will be built if it does not exist.
21+
22+
workspace_size: 32 # TensorRT workspace size for building the engine. 2^workspace_size bytes, e.g., 32 means 4 GB of workspace will be used for building the engine.
23+
24+
post_process_params: # These are post-processing parameters to improve the predictions.
25+
confidence_threshold: [0.36, 0.39, 0.38, 0.41, 0.43] # Per-class thresholds: [CAR, TRUCK, BUS, BICYCLE, PEDESTRIAN]
26+
circle_nms_dist_threshold: 0.0 # turn off circle NMS by setting 0.0, otherwise set to around 0.5
27+
iou_nms_search_distance_2d: 10.0
28+
iou_nms_threshold: 0.5 # set to 0 to turn off iou NMS
29+
yaw_norm_thresholds: [0.3, 0.3, 0.3, 0.3, 0.0]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This is just an example file, the actual model param file comes with the model onnx files
2+
# and is stored in the artifacts directory (~/autoware_data/camera_streampetr by default).
3+
4+
/**:
5+
ros__parameters:
6+
model_params: # These are parameters that are dependent on the onnx file.
7+
class_names: ["CAR", "TRUCK", "BUS", "BICYCLE", "PEDESTRIAN"]
8+
detection_range: [-61.2, -61.2, -10.0, 61.2, 61.2, 10.0] # [-x,-y,-z,x,y,z] from base_link. The model is not trained to predict objects outside this range.
9+
# So, anything outside this range is wrong, and this parameter is used to filter out objects that are outside this range
10+
input_image_height: 480
11+
input_image_width: 640
12+
num_proposals: 5400
13+
rois_number: 5 # ["CAM_FRONT", "CAM_FRONT_LEFT", "CAM_BACK_LEFT", "CAM_FRONT_RIGHT", "CAM_BACK_RIGHT"]
14+
pre_memory_length: 1024 # Input memory length for the temporal model
15+
post_memory_length: 1280 # Output memory length for the temporal model

perception/autoware_camera_streampetr/config/tensorrt_stream_petr.param.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<launch>
2+
<arg name="build_only" default="false" description="shutdown node after TensorRT engine file is built"/>
3+
<arg name="model_path" default="$(env HOME)/autoware_data/camera_streampetr"/>
4+
5+
<arg name="model_param_path" default="$(var model_path)/ml_package_camera_streampetr.param.yaml"/>
6+
<arg name="node_param_path" default="$(find-pkg-share autoware_camera_streampetr)/config/camera_streampetr.param.yaml"/>
7+
8+
<arg name="is_compressed_image" default="false" description="whether the input image is compressed"/>
9+
10+
<let name="compressed_suffix" value="$(eval &quot;'/compressed' if '$(var is_compressed_image)' == 'true' else ''&quot;)"/>
11+
<let name="camera0_topic" value="/sensing/camera/camera0/image_rect_color$(var compressed_suffix)"/>
12+
<let name="camera1_topic" value="/sensing/camera/camera1/image_rect_color$(var compressed_suffix)"/>
13+
<let name="camera2_topic" value="/sensing/camera/camera2/image_rect_color$(var compressed_suffix)"/>
14+
<let name="camera3_topic" value="/sensing/camera/camera3/image_rect_color$(var compressed_suffix)"/>
15+
<let name="camera4_topic" value="/sensing/camera/camera4/image_rect_color$(var compressed_suffix)"/>
16+
17+
<node pkg="autoware_camera_streampetr" exec="autoware_camera_streampetr_node" name="stream_petr" output="screen">
18+
<param from="$(var model_param_path)" allow_substs="true"/>
19+
<param from="$(var node_param_path)" allow_substs="true"/>
20+
<param name="build_only" value="$(var build_only)"/>
21+
22+
<!-- Image of ~/input/camera_i will be the ith image in the model input -->
23+
<remap from="~/input/camera0/camera_info" to="/sensing/camera/camera0/camera_info"/>
24+
<remap from="~/input/camera1/camera_info" to="/sensing/camera/camera1/camera_info"/>
25+
<remap from="~/input/camera2/camera_info" to="/sensing/camera/camera2/camera_info"/>
26+
<remap from="~/input/camera3/camera_info" to="/sensing/camera/camera3/camera_info"/>
27+
<remap from="~/input/camera4/camera_info" to="/sensing/camera/camera4/camera_info"/>
28+
29+
<remap from="~/input/camera0/image$(var compressed_suffix)" to="$(var camera0_topic)"/>
30+
<remap from="~/input/camera1/image$(var compressed_suffix)" to="$(var camera1_topic)"/>
31+
<remap from="~/input/camera2/image$(var compressed_suffix)" to="$(var camera2_topic)"/>
32+
<remap from="~/input/camera3/image$(var compressed_suffix)" to="$(var camera3_topic)"/>
33+
<remap from="~/input/camera4/image$(var compressed_suffix)" to="$(var camera4_topic)"/>
34+
</node>
35+
</launch>

perception/autoware_camera_streampetr/launch/tensorrt_stream_petr.launch.xml

Lines changed: 0 additions & 51 deletions
This file was deleted.

perception/autoware_camera_streampetr/launch/tensorrt_stream_petr_compressed.launch.xml

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)