Skip to content

fr_quad ​

本页由 fr-docs-dev gen-api 从源码 docstring 生成,请勿手工编辑;重新生成执行 just api。

FlyRuler X 型四旋翼被控对象的公开 API。

该包把标准六自由度刚体与实测电机/螺旋桨标定表、二次偏航反扭矩、NED 风、柔性地面接触、运行时不确定度与确定性传感器向量模型组合在一起。坐标使用NED/FRD,四元数为 scalar-first [w, x, y, z](body 相对 NED),旋翼索引数组固定使用 FR, RL, FL, RR 顺序。

公开成员 ​

名称类型定义位置
ExternalWind函数fr_quad.blocks.wind
GroundContact函数本页
GroundContactConfig类本页
GroundContactPointConfig类本页
MassProperties函数fr_quad.blocks.mass
QuadRotorAerodynamics函数fr_quad.blocks.rotor
QuadRotorConfig类fr_quad.config
QuadRotorMotor函数fr_quad.blocks.rotor
QuadSensor函数fr_quad.blocks.sensor
QuadSystem函数fr_quad.system
SensorNoiseConfig类fr_quad.config
UncertaintyConfig类fr_quad.config
build_initial_state函数fr_quad.system
load_config函数fr_quad.config

定义 ​

GroundContact ​

python
def GroundContact(cfg: GroundContactConfig) -> None

聚合并配置任意数量的轮、滑橇或着陆接触点。

参数

名称类型默认值说明
cfgGroundContactConfig—地面接触配置,含启用开关、摩擦尺度与接触点列表。

NOTE

输入为质心 NED 位置 position、机体系速度 velocity_body、体到 NED 的 dcm 与机体系角速度 omega_body。每个接触点实例以配置中的 name 命名。导出 force_body、moment_body、 penetrations、normal_forces、longitudinal_forces、 lateral_forces 与 contact_count。

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:331

GroundContactConfig ​

python
class GroundContactConfig(BaseModel)

平直地面子系统的编译期开关与接触数据。

enabled ​

python
enabled: bool = False

是否启用地面接触,为 False 时法向力与接触计数恒为 0。

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:71

ground_down ​

python
ground_down: float = 0.0

地面在 NED 系下的 Down 坐标,单位 m。

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:73

friction_velocity_scale ​

python
friction_velocity_scale: float = 0.1

摩擦速度正则化尺度,必须为正数,单位 m/s。

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:75

contacts ​

python
contacts: list[GroundContactPointConfig]

接触点配置列表,至少一个且名称互不重复。

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:77

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:68

GroundContactPointConfig ​

python
class GroundContactPointConfig(BaseModel)

相对质心(FRD 机体系)的一个轮、滑橇或着陆接触点。

name ​

python
name: str

接触点名称,必须是合法的 FlyRuler 组件名。

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:15

point_body ​

python
point_body: list[float]

接触点在 FRD 机体系下的坐标 [x, y, z],单位 m。

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:17

normal_stiffness ​

python
normal_stiffness: float

法向接触刚度,必须为正数,单位 N/m。

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:19

normal_damping ​

python
normal_damping: float

法向接触阻尼,必须非负。

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:21

rolling_resistance_coefficient ​

python
rolling_resistance_coefficient: float = 0.02

滚动阻力系数,默认 0.02,必须非负。

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:23

lateral_friction_coefficient ​

python
lateral_friction_coefficient: float = 0.5

侧向摩擦系数,默认 0.5,必须非负。

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:25

max_normal_force ​

python
max_normal_force: float

法向力上限,必须为正数,单位 N。

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:27

实现位置:packages/fly_ruler/python/fly_ruler_std/blocks/physics/ground_contact.py:12