Repository navigation
SerialArm-Core v0.4.0
SerialArm-Core v0.4.0
v0.4.0 将 v0.3.0 的 Shared CAN 扩展为统一的同进程 Shared Physical Bus 架构,目标是在机械臂与独立末端、附加轴或其他外设满足物理兼容条件时共享同一条 CAN 或串行总线,同时保持 Driver 解耦和物理资源唯一 ownership
Shared Physical Bus
BusRegistry成为 Core 内部唯一的 shared physical bus ownership 协调层,移除 legacyBusPool- Registry 使用
CREATING / READYreservation 保证并发 acquisition 只创建一次 physical bus,creator / open 在全局锁外执行,并支持失败后的 reservation 清理与重试 ownership_key用于识别真实物理资源,等价 tty alias 会归一到同一设备,CAN / Serial 不能重复占用同一个 physical tty- provider 必须通过
config_signature声明 provider identity 和物理兼容参数
CAN 与 Serial Consumer Contract
CAN Driver 不再持有 raw CanBus,统一通过 acquire_can_channel() 获取独立 CanChannel
Physical CanBus
↓
BusRegistry
↓
CanChannel
↓
Protocol / Driver
Serial Driver 通过 acquire_serial_bus_client() 获取 SerialBusClient,完整 request-response 在受限 SerialTransaction 中串行执行
Physical SerialPort
↓
internal SerialBus
↓
SerialBusClient
↓
SerialTransaction
↓
Protocol / Driver
不同 Serial Driver 可以使用独立 read / write timeout,Driver 无法直接 open / close shared SerialBus、修改持久串口配置或获取 raw fd
Damiao 与兼容性修复
- Damiao USB2CAN 接入迁移到统一 CAN acquisition contract
- 修复
/dev/serial/by-id/...与/dev/ttyACM*指向同一 USB2CAN 时的重复配置冲突 - 保留 v0.3.0 的 multi-
CanChannelfan-out、targeted receive、bounded queue 与 diagnostics 行为 - Runtime Override、Python、ros2_control 与 MoveIt 参数链继续兼容现有 Robot Profile
测试与设计边界
本版本已完成 clean build、Core / Transport / Damiao、Runtime Override、Python、ros2_control 与 Shared CAN / Shared Serial 回归测试
当前 Shared Bus 仍限定为同进程资源管理,不提供跨进程 broker;不同厂家或不同协议能否共线仍取决于 bitrate、地址 / CAN ID、framing、主动发送行为、电气层和总线负载等兼容条件;需要显式 RTS / TIOCSRS485 方向控制的 RS485、hot-plug / reconnect 和完整 Robot Component 框架留待后续版本
Full Changelog: v0.3.0...v0.4.0