类
查看源码chassis::motion::Mecanum4
四轮麦克纳姆底盘。 该类只关心统一底盘速度和四个轮速控制器之间的换算,不负责轨迹规划或定位融合。
继承关系
- 基类
IChassisMotion公开
构造与析构
1Mecanum4
chassis::motion::Mecanum4::Mecanum4 (const Config &driver_cfg)
上游未提供说明。
Chassis/Mecanum4/Mecanum4.hpp:51成员函数
7applyVelocity
void chassis::motion::Mecanum4::applyVelocity (const Velocity &velocity) override
把底盘车体系速度换算成四个轮子的目标转速。 设置底盘速度
Chassis/Mecanum4/Mecanum4.hpp:69disable
void chassis::motion::Mecanum4::disable () override
上游未提供说明。
Chassis/Mecanum4/Mecanum4.hpp:54enable
bool chassis::motion::Mecanum4::enable () override
上游未提供说明。
Chassis/Mecanum4/Mecanum4.hpp:53enabled
bool chassis::motion::Mecanum4::enabled () const override
上游未提供说明。
Chassis/Mecanum4/Mecanum4.hpp:56forwardGetVelocity
Velocity chassis::motion::Mecanum4::forwardGetVelocity () override
由四个轮子的反馈速度反解出底盘车体系速度。
Chassis/Mecanum4/Mecanum4.hpp:59isReady
bool chassis::motion::Mecanum4::isReady () const override
当前实现不存在额外就绪阶段,使能后即可作为完整底盘使用。
Chassis/Mecanum4/Mecanum4.hpp:65update
void chassis::motion::Mecanum4::update ()
周期调用底层轮速控制器更新。 底盘控制更新函数 本函数自动处理控制逻辑,并依序调用每个轮子的 PID 更新函数 推荐控制调用频率 1kHz,调用频率将会影响轮子的 PID 参数
Chassis/Mecanum4/Mecanum4.hpp:62成员变量
5enabled_
bool chassis::motion::Mecanum4::enabled_
上游未提供说明。
Chassis/Mecanum4/Mecanum4.hpp:72k_omega_
float chassis::motion::Mecanum4::k_omega_
角速度项对应的等效力臂 (unit: m)
Chassis/Mecanum4/Mecanum4.hpp:75type_
ChassisType chassis::motion::Mecanum4::type_
底盘构型
Chassis/Mecanum4/Mecanum4.hpp:73wheel_
controllers::MotorVelController* chassis::motion::Mecanum4::wheel_[static_cast< size_t >(WheelType::Max)] [static_cast< size_t >(WheelType::Max)]
上游未提供说明。
Chassis/Mecanum4/Mecanum4.hpp:77wheel_radius_
float chassis::motion::Mecanum4::wheel_radius_
轮子半径 (unit: m)
Chassis/Mecanum4/Mecanum4.hpp:74嵌套类型
3ChassisType
上游未提供说明。
OType- O 型布局
XType = 0U- X 型布局
上游未提供说明。
Chassis/Mecanum4/Mecanum4.hpp:38WheelType
上游未提供说明。
FrontLeft- 左前轮
FrontRight = 0U- 右前轮
Max- 上游未提供说明。
RearLeft- 左后轮
RearRight- 右后轮