Skip to content

v4 自瞄重构:DevC 相机同步、自瞄 Topic 与 CDC 接口名 - #29

Merged
Jiu-xiao merged 6 commits into
devfrom
refactor/autoaim-v4
Oct 11, 2026
Merged

Jiu-xiao merged 6 commits into
devfrom
refactor/autoaim-v4

Conversation

@Jiu-xiao

@Jiu-xiao Jiu-xiao commented Oct 7, 2026

Copy link
Copy Markdown
Contributor
  • hero、sentry 增加 CameraSync 与自瞄口 SharedTopic 转发;hero IMU Topic 改名 gimbal_*。
  • CDC 接口名:XRobot Terminal / XRobot AutoAim / XRobot Aux(需 LibXR_CppCodeGenerator 的 cdc[].interface)。
  • LibXR 更新到 98bc7b2(CDC 在 STM32 OTG 枚举后发送,fix(usb): CDC sends nothing after enumeration on STM32 OTG xrobot-org/libxr#333)。
  • CameraSync 触发 5 ms(200 Hz)。

注意:本分支叠在 feat/host-referee-pack(a9ec7de)之上,应先合并该分支。CodeGenerator 带 interface 字段的版本发布、generator: 更新之前,CI 的生成比对会失败。验证:hero、sentry、omni_infantry_3 编译通过;13T 台架 200 Hz 整链通过(板已恢复原固件)。

提交:

  • a9ec7de feat: 256 B HS CDC transmit buffers for the larger robot_game_ref pack
  • 65fb5bf Camera sync and auto-aim topics for hero and sentry; 10 ms trigger period
  • 0568163 Name the CDC interfaces
  • 5947bd4 Update LibXR to 98bc7b2: CDC sends after enumeration on STM32 OTG
  • 6398ede CameraSync trigger period 5 ms (200 Hz) for hero, sentry and omni infantry

Jiu-xiao and others added 6 commits October 6, 2026 17:43
RobotGameRefereePack grows from 92 to 117 bytes (Referee
feat/host-referee-pack). SharedTopicClient needs payload + 17 bytes of the
UART write queue: 134 > 128. usb_otg_hs_cdc (omni_infantry_3/4) and
usb_otg_hs_cdc2 (sentry) get a 256 B transmit buffer (CDCUart tx_buffer_size
128 -> 256, app_main.cpp regenerated with generator 6.0.0), leaving 105 B
for later fields. The lock pins Referee feat/host-referee-pack f3f44bd.
FreeRTOS heap (heap_1, 64 KiB) grows by about 0.66 KiB per affected config
(2 x 128 B CDC buffer + 16 SharedTopicClient slots x 25 B).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…riod

hero: rename the IMU topics to gimbal_gyro/gimbal_accl/gimbal_quat, add CameraSync and forward camera_sync_command/camera_sync_result and robot_game_ref over the auto-aim SharedTopic.
sentry: add CameraSync and the same forwarding; the host converts the board's x-forward IMU axes.
omni_infantry_3/4: trigger_period_us is in microseconds, 10 -> 10000.
XRobot Terminal (FS), XRobot AutoAim and XRobot Aux (HS) set through interface in libxr_config.yaml; the auto-aim host opens its port by VID:PID and XRobot AutoAim. Needs the generator release that supports cdc interface.
Includes xrobot-org/libxr#333. With 783b157 no USB CDC port sent any data: writes made before configuration filled the queue and transmission never restarted, and on OTG_HS a late EPDISD flush discarded the first packet after SET_CONFIGURATION.
…antry

Matches the host CameraFrameSync trigger_period_us. Bench-verified on PI-HAILO-13T with LibXR 98bc7b29.
@Jiu-xiao
Jiu-xiao merged commit 9a565d3 into dev Oct 11, 2026
13 checks passed
@Jiu-xiao
Jiu-xiao deleted the refactor/autoaim-v4 branch October 11, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant