feat: integrate cabin CAN and verified dynamic seat modes

This commit is contained in:
vee
2026-08-04 17:51:38 +08:00
parent 155fbb59ba
commit dc7c91800e
99 changed files with 51897 additions and 3618 deletions
@@ -0,0 +1,37 @@
environment: t2g_cabin_bench
platform: t2g_cabin_bench
execution:
mode: hil
hardware_enabled_env: COGNITIVE_AGENT_HARDWARE_EXECUTION_ENABLED
approval_token_required_env: COGNITIVE_AGENT_HARDWARE_APPROVAL_TOKEN_REQUIRED
approval_token_env: COGNITIVE_AGENT_HARDWARE_APPROVAL_TOKEN
seat_firmware_probe_timeout_ms: 3500
can_adapter:
backend: zlgcan
device: USBCANFD-200U
device_type: 41
device_index: 0
ownership: one_bridge_process_opens_device_once
buses:
seat_can:
channel_env: COGNITIVE_AGENT_SEAT_CAN_CHANNEL
default_channel: 0
frame_format: classic_can_11_bit
bitrate: 500000
termination_enabled_env: COGNITIVE_AGENT_SEAT_CAN_TERMINATION_ENABLED
termination_enabled_default: true
body_can:
enabled_env: COGNITIVE_AGENT_VEHICLE_CAN_ENABLED
channel_env: COGNITIVE_AGENT_VEHICLE_CAN_CHANNEL
default_channel: 1
frame_format: can_fd_11_bit
arbitration_bitrate: 500000
data_bitrate: 2000000
iso: true
bitrate_switch: true
termination_enabled_env: COGNITIVE_AGENT_VEHICLE_CAN_TERMINATION_ENABLED
termination_enabled_default: false
safety:
channels_must_be_distinct: true
raw_can_passthrough: false
feedback_timeout_ms_env: COGNITIVE_AGENT_VEHICLE_CAN_FEEDBACK_TIMEOUT_MS
@@ -20,7 +20,7 @@ firmware:
topology: one_board_unified_seat_controller
repository_project: firmware/t2g/Seat_Controller_demo/IAR/Seat_Controller_demo.ewp
repository_vendor_dependencies: [firmware/t2g/common, firmware/t2g/tviibh8m]
verification: passive_301_302_303_304_305_4FA_and_max_hall
verification: passive_301_302_303_304_305_306_4FA_revision_7_and_max_hall
expected_max_hall: [480, 374, 917, 647]
auto_flash_enabled_env: COGNITIVE_AGENT_SEAT_AUTO_FLASH_ENABLED
auto_flash_default_when_hardware_enabled: true
@@ -0,0 +1,82 @@
id: dynamic_cradle
name: 动态摇篮模式
aliases:
- 动态摇篮
- 摇篮模式
- cradle
- dynamic cradle
description: >-
腾势 N7 固件原生位置闭环动态模式。Step 1先进入起始姿态;Step 2四轴同步启动并
以目标会合方式到达向前收拢姿态;Step 3四轴同步启动并会合返回起点,随后持续循环。
icon: waves
scope:
vehicle_ids:
- denza_n7
timeline:
repeat: until_stopped_or_timeout
max_runtime_ms: 600000
entry:
id: step1
name: 起始位置
transition: all_targets_reached
timeout_ms: 30000
targets:
longitudinal: {value: 172, unit: mm, hall_pulse: 391}
cushion_tilt: {value: 37.5, unit: percent, hall_pulse: 140}
backrest_recline: {value: 30, unit: degree_from_upright, hall_pulse: 405}
legrest_height: {value: 45, unit: degree, hall_pulse: 404}
phases:
- id: forward
name: Step 2 向前收拢
completion: all_targets_reached
timeout_ms: 30000
transition: synchronized_target_rendezvous
targets:
longitudinal: {value: 110, unit: mm, hall_pulse: 246}
cushion_tilt: {value: 75, unit: percent, hall_pulse: 281}
backrest_recline: {value: 52, unit: degree_from_upright, hall_pulse: 701}
legrest_height: {value: 55, unit: degree, hall_pulse: 494}
effects:
body_motion: {metaphor: cradle_rise, easing: smooth}
motion:
synchronized_start: true
synchronized_arrival: true
continuous_four_axis_cruise: true
cruise_duty_percent:
longitudinal: 50
cushion_tilt: 50
backrest_recline: 90
legrest_height: 50
final_approach_hall_pulses: 12
final_duty_percent: 50
- id: return
name: Step 3 向后回复
completion: all_targets_reached
timeout_ms: 30000
transition: synchronized_target_rendezvous
targets:
longitudinal: {value: 172, unit: mm, hall_pulse: 391}
cushion_tilt: {value: 37.5, unit: percent, hall_pulse: 140}
backrest_recline: {value: 30, unit: degree_from_upright, hall_pulse: 405}
legrest_height: {value: 45, unit: degree, hall_pulse: 404}
effects:
body_motion: {metaphor: cradle_sink, easing: smooth}
motion:
synchronized_start: true
synchronized_arrival: true
continuous_four_axis_cruise: true
cruise_duty_percent:
longitudinal: 50
cushion_tilt: 50
backrest_recline: 90
legrest_height: 50
final_approach_hall_pulses: 12
final_duty_percent: 50
operations:
- domain: seat
capability: seat.start_dynamic_mode
target_scope: passenger
operation: set
parameters:
mode_id: 2
reason: 启动 IAR revision 13 四轴全程联动位置闭环动态摇篮,循环至停止指令或十分钟上限。
@@ -0,0 +1,103 @@
id: rocking_horse
name: 木马模式
aliases:
- 木马模式
- 木马
- 摇摇马
- 骑木马
- rocking horse
description: >-
腾势 N7 固件原生动态模式。座椅围绕中间姿态连续向前俯摆、向后仰摆,
坐盆使用增强上下行程,四电机在每个半周期同步启动并以位置会合方式到达,
形成可感知升降、无屏息、无末段追赶的木马节奏。
icon: waves
scope:
vehicle_ids:
- denza_n7
seat_tuning:
coordinate_space: hall_pulse
firmware_header: firmware/t2g/Seat_Controller_demo/Config/seat_dynamic_mode_config.h
calibrated_max_hall: [480, 374, 917, 647]
actual_bench_max_hall: [499, 374, 917, 647]
experience_tuning:
cushion_peak_to_peak_hall_pulses: 120
cushion_peak_to_peak_vertical_mm: 18.0
cushion_amplitude_gain_vs_revision_11: 2.0
diagonal_coupling_compensation:
cushion_opposing_horizontal_mm: 16.4
longitudinal_peak_to_peak_hall_pulses: 100
longitudinal_peak_to_peak_mm: 44.8
estimated_net_horizontal_mm: 28.4
customization_rules:
- 所有目标必须位于对应轴已标定 Hall 量程内
- 前后端点应围绕中心姿态分布,避免接近机械端点
- 四轴占空比不得低于台架已验证的可靠起动值
- 修改本文件后必须同步修改固件配置头并重新执行 IAR/HIL
timeline:
repeat: until_stopped_or_timeout
max_runtime_ms: 600000
entry:
id: center
name: 木马中心姿态
transition: all_targets_reached
timeout_ms: 30000
targets:
longitudinal: {value: 143, unit: mm, hall_pulse: 320}
cushion_tilt: {value: 50.8, unit: percent, hall_pulse: 190}
backrest_recline: {value: 37.1, unit: degree_from_upright, hall_pulse: 500}
legrest_height: {value: 47.9, unit: degree, hall_pulse: 430}
phases:
- id: rock_forward
name: 向前俯摆
completion: all_targets_reached
timeout_ms: 15000
transition: synchronized_target_rendezvous
targets:
longitudinal: {value: 121, unit: mm, hall_pulse: 270}
cushion_tilt: {value: 66.8, unit: percent, hall_pulse: 250}
backrest_recline: {value: 34.1, unit: degree_from_upright, hall_pulse: 460}
legrest_height: {value: 44.5, unit: degree, hall_pulse: 400}
effects:
body_motion: {metaphor: rocking_horse_nose_down, easing: smooth}
motion:
synchronized_start: true
synchronized_arrival: true
continuous_four_axis_cruise: true
cruise_duty_percent:
longitudinal: 90
cushion_tilt: 90
backrest_recline: 90
legrest_height: 50
final_approach_hall_pulses: 8
final_duty_percent: 50
- id: rock_backward
name: 向后仰摆
completion: all_targets_reached
timeout_ms: 15000
transition: synchronized_target_rendezvous
targets:
longitudinal: {value: 166, unit: mm, hall_pulse: 370}
cushion_tilt: {value: 34.8, unit: percent, hall_pulse: 130}
backrest_recline: {value: 40.0, unit: degree_from_upright, hall_pulse: 540}
legrest_height: {value: 51.2, unit: degree, hall_pulse: 460}
effects:
body_motion: {metaphor: rocking_horse_nose_up, easing: smooth}
motion:
synchronized_start: true
synchronized_arrival: true
continuous_four_axis_cruise: true
cruise_duty_percent:
longitudinal: 90
cushion_tilt: 90
backrest_recline: 90
legrest_height: 50
final_approach_hall_pulses: 8
final_duty_percent: 50
operations:
- domain: seat
capability: seat.start_dynamic_mode
target_scope: passenger
operation: set
parameters:
mode_id: 1
reason: 启动 IAR revision 13 带坐盆斜向耦合水平补偿的原生木马模式,循环至停止指令或十分钟上限。
+21
View File
@@ -0,0 +1,21 @@
apiVersion: cognitive-agent/v1alpha1
kind: CapabilityCatalog
metadata:
id: door-native-can-capabilities
name: Door native CAN capabilities
version: 1.0.0
spec:
domain: door
capabilities:
- name: door.set_rear_lock
description: Lock or unlock the second-row door lock through the verified vehicle CAN command.
target_devices: [rear_door_lock]
target_scopes: [rear]
parameters:
- name: state
type: string
required: true
allowed_values: [lock, unlock]
description: Absolute second-row lock request.
risk_level: medium
confirmation_policy: on_ambiguity
@@ -0,0 +1,35 @@
apiVersion: cognitive-agent/v1alpha1
kind: CapabilityCatalog
metadata:
id: interior-light-native-can-capabilities
name: Interior light native CAN capabilities
version: 1.0.0
spec:
domain: interior_light
capabilities:
- name: interior_light.set_indoor_power
description: Turn the general indoor light on or off through vehicle CAN.
target_devices: [indoor_light]
target_scopes: [vehicle]
parameters: &power_parameters
- name: state
type: string
required: true
allowed_values: ["on", "off"]
description: Absolute lamp power state.
risk_level: low
confirmation_policy: on_ambiguity
- name: interior_light.set_wall_power
description: Turn the wall lamp on or off through vehicle CAN.
target_devices: [wall_lamp]
target_scopes: [vehicle]
parameters: *power_parameters
risk_level: low
confirmation_policy: on_ambiguity
- name: interior_light.set_reading_power
description: Turn all or one supported reading-light zone on or off through vehicle CAN FD.
target_devices: [reading_light]
target_scopes: [all, front_left, front_right, middle_left, middle_right, middle_left_rotary, middle_right_rotary, rear_left, rear_right]
parameters: *power_parameters
risk_level: low
confirmation_policy: on_ambiguity
@@ -0,0 +1,27 @@
apiVersion: cognitive-agent/v1alpha1
kind: CapabilityCatalog
metadata:
id: outlet-native-can-capabilities
name: Air outlet native CAN capabilities
version: 1.0.0
spec:
domain: outlet
capabilities:
- name: outlet.set_position_percent
description: Set both axes of one calibrated front air outlet using normalized percentages through vehicle CAN FD.
target_devices: [motorized_air_outlet]
target_scopes: [driver_left, driver_right, passenger_left, passenger_right]
parameters:
- {name: horizontal_pct, type: integer, unit: percent, minimum: 0, maximum: 100, required: true, description: Left-to-right target.}
- {name: vertical_pct, type: integer, unit: percent, minimum: 0, maximum: 100, required: true, description: Down-to-up target.}
risk_level: medium
confirmation_policy: on_ambiguity
- name: outlet.set_calibrated_position
description: Set both raw calibrated axes of one front air outlet.
target_devices: [motorized_air_outlet]
target_scopes: [driver_left, driver_right, passenger_left, passenger_right]
parameters:
- {name: horizontal_value, type: integer, minimum: -128, maximum: 126, required: true, description: Calibrated left-to-right coordinate.}
- {name: vertical_value, type: integer, minimum: -128, maximum: 126, required: true, description: Calibrated down-to-up coordinate.}
risk_level: medium
confirmation_policy: on_ambiguity
@@ -0,0 +1,35 @@
apiVersion: cognitive-agent/v1alpha1
kind: CapabilityCatalog
metadata:
id: window-native-can-capabilities
name: Window native CAN capabilities
version: 1.0.0
spec:
domain: window
capabilities:
- name: window.set_motion
description: Open, close, or stop one or more windows through vehicle CAN FD.
target_devices: [window]
target_scopes: [all, front, rear, front_left, front_right, rear_left, rear_right]
parameters:
- name: motion
type: string
required: true
allowed_values: [open, close, stop]
description: Explicit window motion command.
risk_level: high
confirmation_policy: on_ambiguity
- name: window.set_position
description: Set one window to an absolute opening percentage using position feedback and a stop command.
target_devices: [window]
target_scopes: [front_left, front_right, rear_left, rear_right]
parameters:
- name: position_pct
type: integer
unit: percent
minimum: 0
maximum: 100
required: true
description: Absolute window opening percentage.
risk_level: high
confirmation_policy: on_ambiguity