chassis
上游未提供说明。
Core/IChassisController.hpp:100.1.0+825f1408280d20 / 69 个公开 API 符号没有说明。
上游未提供说明。
Core/IChassisController.hpp:10上游未提供说明。
Core/IChassisController.hpp:10上游未提供说明。
Core/IChassisLoc.hpp:17上游未提供说明。
Core/IChassisMotion.hpp:15业务层直接持有的控制器基类。 Motion 负责真正把速度命令下发到轮组 Loc 负责反馈底盘当前状态 Controller 基类负责控制权申请/释放,保证同一时刻只有一个控制器真正驱动底盘 Controller 同时依赖 Motion 和 Loc: 基类保留 acquireControl / releaseControl / enable / disable / stop 这些最基本控制语义, 其他控制能力由子类扩展。 不同 Controller 也可能拆出多个独立更新入口,因此基类不统一要求单一 update()。
Core/IChassisController.hpp:24定位层基类。 世界系位姿 车体系速度 世界系速度 它对外统一暴露: 同时封装了一组常用坐标变换,避免每个控制器或业务模块都重复写一遍旋转公式。 在接入层里,某些 Loc 后端可能要等到校准完成或首次外部结果到达后才真正构造, 因此业务代码里常会把 Loc 指针先置空,并在周期调用前先检查是否已经构造完成。 update(dt) update() updateLidar(...) 注意:本基类同样不统一规定 update() 形式。不同 Loc 后端可能需要、、等不同入口,具体调用方式由 接入方根据具体实现自行安排。
Core/IChassisLoc.hpp:37底盘动作系统,仅负责: 把底层轮组组织成统一的“底盘速度输入 / 反馈”模型 执行正逆解算 管理底层执行器的使能状态 它不直接暴露给业务层发送速度命令;真正对外的控制入口应是 Controller。 这里的 Motion 只抽象“全向底盘平面运动”本身。若某些特殊底盘还带有升降、 伸缩等与平面运动独立的自由度,这些自由度不应直接并入本接口,而应在其他 模块中独立抽象后,再与本仓库提供的底盘运动能力组合。 注意:本基类故意不定义统一的 update() 约束。不同 Motion 实现可能需要 不同参数、不同频率、甚至不同名字的更新入口,调用者应按具体实现自行调度。
Core/IChassisMotion.hpp:32底盘位姿。 x/y 所处的世界坐标系由具体定位后端决定,但单位和旋向约定在整个模块内保持一致。
Core/IChassisDef.hpp:33底盘速度。 x 轴指向车头前方 y 轴指向车体左侧 z 轴向上,逆时针旋转为正 这里约定的是“车体坐标系常用正方向”:
Core/IChassisDef.hpp:19
Posture chassis::Posture::operator+ (const Posture &rhs) const
上游未提供说明。
Core/IChassisDef.hpp:41
Posture chassis::Posture::operator- (const Posture &rhs) const
上游未提供说明。
Core/IChassisDef.hpp:46
static float chassis::Posture::yawError (const float current, const float target)
返回 current 相对 target 的最小等效 yaw 误差,单位 deg。
Core/IChassisDef.hpp:52
static constexpr Posture chassis::Posture::zero ()
上游未提供说明。
Core/IChassisDef.hpp:39
static constexpr Velocity chassis::Velocity::zero ()
上游未提供说明。
Core/IChassisDef.hpp:25
chassis::controller::IChassisController::IChassisController (motion::IChassisMotion &chassis_motion, loc::IChassisLoc &chassis_loc)
Controller 在构造时就必须绑定现成的 Motion 和 Loc。
Core/IChassisController.hpp:117
virtual bool chassis::controller::IChassisController::acquireControl ()
申请底盘控制权并进入 stop 状态。 acquireControl() stop() 只做控制权交接,不负责底盘执行器上电。 成功获取控制权后会立即,保证新接手的控制器从安全状态开始工作。 是否成功获取控制权
Core/IChassisController.hpp:44
void chassis::controller::IChassisController::applyVelocity (const Velocity &velocity)
上游未提供说明。
Core/IChassisController.hpp:126
virtual void chassis::controller::IChassisController::disable ()
直接关闭底盘执行器,同时释放当前控制器对底盘的控制权。
Core/IChassisController.hpp:89
virtual bool chassis::controller::IChassisController::enable ()
使能底盘并申请控制权 enable() 这里的 Controller 应被理解为“更高一层的控制器封装”: 调用它的会继续把使能动作传递给下层 Motion,而 Motion 又会继续把使能传递给更底层的轮组 / 电机控制器。 因此在正常接入里,业务层通常不需要再重复手动使能下层控制器。 是否成功使能底盘并获取控制权
Core/IChassisController.hpp:73
bool chassis::controller::IChassisController::enabled () const
只有持有控制权,且底层 Motion 已使能并 ready 时,控制器才认为自己可工作。
Core/IChassisController.hpp:103
bool chassis::controller::IChassisController::hasControl () const
当前 Controller 是否持有底盘控制权。
Core/IChassisController.hpp:97
const auto & chassis::controller::IChassisController::loc () const
上游未提供说明。
Core/IChassisController.hpp:31
const auto & chassis::controller::IChassisController::motion () const
上游未提供说明。
Core/IChassisController.hpp:30
auto chassis::controller::IChassisController::postureInWorld () const
上游未提供说明。
Core/IChassisController.hpp:34
virtual void chassis::controller::IChassisController::releaseControl ()
释放底盘控制权,但不关闭底层执行器。
Core/IChassisController.hpp:56
virtual void chassis::controller::IChassisController::stop ()=0
静止底盘 stop 状态应当是控制 motion 锁定在当前位置,即位置环锁定状态
Core/IChassisController.hpp:113
auto chassis::controller::IChassisController::velocityInBody () const
上游未提供说明。
Core/IChassisController.hpp:32
auto chassis::controller::IChassisController::velocityInWorld () const
上游未提供说明。
Core/IChassisController.hpp:33
virtual chassis::controller::IChassisController::~IChassisController ()
上游未提供说明。
Core/IChassisController.hpp:27
Posture chassis::loc::IChassisLoc::BodyPosture2WorldPosture (const Posture &posture_in_body) const
把“相对当前车体”的位姿换算回世界系。
Core/IChassisLoc.hpp:84
Velocity chassis::loc::IChassisLoc::BodyVelocity2WorldVelocity (const Velocity &velocity_in_body) const
使用当前朝向,把车体系速度转换为世界系速度。
Core/IChassisLoc.hpp:60
Posture chassis::loc::IChassisLoc::CurrentPostureRelativeTo (const Posture &base_in_world) const
便捷函数:计算“当前位置相对于某个世界系基准位姿”的相对位姿。
Core/IChassisLoc.hpp:129
chassis::loc::IChassisLoc::IChassisLoc (motion::IChassisMotion &motion)
Loc 虽然可能还依赖外部传感器,但一定依赖一个 Motion 作为速度输入来源。
Core/IChassisLoc.hpp:41
static Posture chassis::loc::IChassisLoc::RelativePosture2WorldPosture (const Posture &base_in_world, const Posture &posture_in_base)
已知某个基准位姿在世界系中的位置,把“相对基准”的位姿展开到世界系。
Core/IChassisLoc.hpp:98
Posture chassis::loc::IChassisLoc::WorldPosture2BodyPosture (const Posture &posture_in_world) const
把世界系位姿换算成“以当前车体为参考”的相对位姿。
Core/IChassisLoc.hpp:66
static Posture chassis::loc::IChassisLoc::WorldPosture2RelativePosture (const Posture &base_in_world, const Posture &posture_in_world)
已知某个基准位姿在世界系中的位置,把世界系位姿改写成“相对基准”的位姿。
Core/IChassisLoc.hpp:112
Velocity chassis::loc::IChassisLoc::WorldVelocity2BodyVelocity (const Velocity &velocity_in_world) const
使用当前朝向,把世界系速度转换为车体系速度。
Core/IChassisLoc.hpp:54
auto chassis::loc::IChassisLoc::forwardGetVelocity () const
受保护转发:读取 Motion 给出的车体系反馈速度。
Core/IChassisLoc.hpp:138
virtual Posture chassis::loc::IChassisLoc::postureInWorld () const =0
返回世界坐标系位姿。
Core/IChassisLoc.hpp:51
static Velocity chassis::loc::IChassisLoc::rotateVelocity (const Velocity &inp, const float theta)
二维平面旋转速度向量。角度单位仍是度,内部会转换成弧度。
Core/IChassisLoc.hpp:141
virtual Velocity chassis::loc::IChassisLoc::velocityInBody () const =0
返回车体坐标系速度。
Core/IChassisLoc.hpp:46
virtual Velocity chassis::loc::IChassisLoc::velocityInWorld () const =0
返回世界坐标系速度。
Core/IChassisLoc.hpp:48
virtual chassis::loc::IChassisLoc::~IChassisLoc ()=default
上游未提供说明。
Core/IChassisLoc.hpp:43
chassis::motion::IChassisMotion::IChassisMotion ()
上游未提供说明。
Core/IChassisMotion.hpp:85
virtual void chassis::motion::IChassisMotion::applyVelocity (const Velocity &velocity)=0
上游未提供说明。
Core/IChassisMotion.hpp:88
controller::IChassisController * chassis::motion::IChassisMotion::currentController () const
当前持有该 Motion 控制权的 Controller。
Core/IChassisMotion.hpp:79
virtual void chassis::motion::IChassisMotion::disable ()=0
关闭底层执行器。
Core/IChassisMotion.hpp:39
virtual bool chassis::motion::IChassisMotion::enable ()=0
使能底层执行器,返回是否成功进入可工作状态。
Core/IChassisMotion.hpp:37
virtual bool chassis::motion::IChassisMotion::enabled () const =0
查询底层执行器是否已经处于使能状态。
Core/IChassisMotion.hpp:41
virtual Velocity chassis::motion::IChassisMotion::forwardGetVelocity ()=0
正向解算得到当前底盘在车体坐标系下的反馈速度。
Core/IChassisMotion.hpp:53
virtual bool chassis::motion::IChassisMotion::isReady () const =0
是否就位 enabled() isReady() 只表示执行器已经上电/使能;进一步表示该 Motion 已经可以被当成完整底盘使用。像舵轮校准、机构变形、自检这类过程, 都可能出现“enabled 但 not-ready”。
Core/IChassisMotion.hpp:50
virtual void chassis::motion::IChassisMotion::releaseController (controller::IChassisController *ctrl)
释放控制权;只有当前持有者自己可以释放。
Core/IChassisMotion.hpp:72
virtual bool chassis::motion::IChassisMotion::tryAcquireController (controller::IChassisController *ctrl)
尝试让某个 Controller 获取该 Motion 的控制权。 同一时刻只允许一个 Controller 真正向 Motion 下发速度命令, 用来避免多个控制器并发写目标。
Core/IChassisMotion.hpp:61
virtual chassis::motion::IChassisMotion::~IChassisMotion ()=default
上游未提供说明。
Core/IChassisMotion.hpp:35
float chassis::Posture::x
指向车体前方 (unit: m)
Core/IChassisDef.hpp:35
float chassis::Posture::y
指向车体左侧 (unit: m)
Core/IChassisDef.hpp:36
float chassis::Posture::yaw
向上(逆时针)为正 (unit: deg)
Core/IChassisDef.hpp:37
float chassis::Velocity::vx
指向车体前方 (unit: m/s)
Core/IChassisDef.hpp:21
float chassis::Velocity::vy
指向车体左侧 (unit: m/s)
Core/IChassisDef.hpp:22
float chassis::Velocity::wz
向上(逆时针)为正 (unit: deg/s)
Core/IChassisDef.hpp:23
loc::IChassisLoc* chassis::controller::IChassisController::loc_
提供底盘状态反馈的定位层
Core/IChassisController.hpp:123
motion::IChassisMotion* chassis::controller::IChassisController::motion_
真正执行底盘速度命令的运动学层
Core/IChassisController.hpp:122
motion::IChassisMotion* chassis::loc::IChassisLoc::motion_
Loc 读取速度反馈所依赖的 Motion.
Core/IChassisLoc.hpp:135
controller::IChassisController* chassis::motion::IChassisMotion::controller_
当前持有控制权的控制器
Core/IChassisMotion.hpp:93上游未提供说明。
Core/IChassisLoc.hpp:14底盘控制层统一接口。 syhanjin 2026-03-15
Core/IChassisController.hppChassisController 对外统一使用的基础运动学数据结构。 syhanjin 2026-03-15
Core/IChassisDef.hpp底盘定位层统一接口与坐标变换工具。 syhanjin 2026-03-07
Core/IChassisLoc.hpp底盘运动学层统一接口。 syhanjin 2026-01-31
Core/IChassisMotion.hpp