chassis::motion::Steering4
四舵轮底盘。 enabled() isReady() 和普通全向轮不同,四舵轮在真正 ready 之前可能还要经历轮组校准阶段, 所以上层必须同时关注和。
继承关系
- 基类
IChassisMotion公开
构造与析构
1Steering4
chassis::motion::Steering4::Steering4 (const Config &cfg)
上游未提供说明。
Chassis/Steering4/Steering4.hpp:50成员函数
9applyVelocity
void chassis::motion::Steering4::applyVelocity (const Velocity &velocity) override
上游未提供说明。
Chassis/Steering4/Steering4.hpp:100disable
void chassis::motion::Steering4::disable () override
关闭四个轮组。
Chassis/Steering4/Steering4.hpp:69enable
bool chassis::motion::Steering4::enable () override
依次使能四个轮组;任意一个失败都会整体回滚。
Chassis/Steering4/Steering4.hpp:52enabled
bool chassis::motion::Steering4::enabled () const override
上游未提供说明。
Chassis/Steering4/Steering4.hpp:76forwardGetVelocity
Velocity chassis::motion::Steering4::forwardGetVelocity () override
返回四舵轮根据当前轮速和舵向反解出的底盘反馈速度。
Chassis/Steering4/Steering4.hpp:91getWheelPosition
Steering4::WheelPosition chassis::motion::Steering4::getWheelPosition (WheelType wheel) const
根据轮序返回该轮相对于底盘中心的位置。
Chassis/Steering4/Steering4.hpp:123isReady
bool chassis::motion::Steering4::isReady () const override
启用校准时,ready 表示四个轮组都已经建立舵向零点。
Chassis/Steering4/Steering4.hpp:94startCalibration
void chassis::motion::Steering4::startCalibration ()
启动四个轮组的校准流程。 isReady() 仅在 enable 成功之后才有意义。启用校准时,只有全部轮组完成校准后才会变为 true,在此之前控制器下发的底盘速度会被忽略。
Chassis/Steering4/Steering4.hpp:84update
void chassis::motion::Steering4::update ()
周期刷新校准状态、轮组控制器以及反馈速度。
Chassis/Steering4/Steering4.hpp:97成员变量
10calibrated_
bool chassis::motion::Steering4::calibrated_
四个轮组是否都已完成校准
Chassis/Steering4/Steering4.hpp:105enable_calib_
bool chassis::motion::Steering4::enable_calib_
是否启用启动校准
Chassis/Steering4/Steering4.hpp:104enabled_
bool chassis::motion::Steering4::enabled_
上游未提供说明。
Chassis/Steering4/Steering4.hpp:103half_distance_x
float chassis::motion::Steering4::half_distance_x
半前后轮距 (unit: m)
Chassis/Steering4/Steering4.hpp:108half_distance_y
float chassis::motion::Steering4::half_distance_y
半左右轮距 (unit: m)
Chassis/Steering4/Steering4.hpp:109inv_l2_
float chassis::motion::Steering4::inv_l2_
角速度反解时使用的几何项倒数
Chassis/Steering4/Steering4.hpp:110spd2rpm_
float chassis::motion::Steering4::spd2rpm_
线速度与轮速 rpm 的换算系数
Chassis/Steering4/Steering4.hpp:111velocity_
Velocity chassis::motion::Steering4::velocity_
当前由四个轮组反解得到的反馈速度
Chassis/Steering4/Steering4.hpp:113wheel_
steering::SteeringWheel chassis::motion::Steering4::wheel_[static_cast< size_t >(WheelType::Max)] [static_cast< size_t >(WheelType::Max)]
上游未提供说明。
Chassis/Steering4/Steering4.hpp:115wheel_radius_
float chassis::motion::Steering4::wheel_radius_
驱动轮半径 (unit: m)
Chassis/Steering4/Steering4.hpp:107嵌套类型
3上游未提供说明。
Chassis/Steering4/Steering4.hpp:31上游未提供说明。
Chassis/Steering4/Steering4.hpp:117WheelType
上游未提供说明。
FrontLeft = 1U- 左前轮
FrontRight = 0U- 右前轮
Max- 上游未提供说明。
RearLeft = 2U- 左后轮
RearRight = 3U- 右后轮