uBot Multirotor Movement
多旋翼飞行模型的基类。它按 uBot 仿真时间以固定物理步移动根组件(被更新的组件),用碰撞体扫过世界并沿接触面滑动(地面和其他表面一样),每帧显示外推到当前仿真时间的姿态。接受航向坐标系下的速度指令(IUBotVelocityCommandable):X 沿当前朝向向前,Y 向右,Z 向上,只用 Z 方向的角速度(偏航角速度)。
Get Last Velocity Command
Section titled “Get Last Velocity Command”Get Last Velocity CommandTarget is uBot Multirotor MovementTargetReturn Value
最近一条被接受的速度指令(限幅之后)。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | UBot Velocity Command结构体 |
Get Multirotor State
Section titled “Get Multirotor State”Get Multirotor StateTarget is uBot Multirotor MovementTargetReturn Value
最近一个物理步的真值状态(SI 单位,UE 世界轴)。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | UBot Multirotor State结构体 |
Get Physics Step Count
Section titled “Get Physics Step Count”Get Physics Step CountTarget is uBot Multirotor MovementTargetReturn Value
开始游玩以来已运行的物理步数。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | Integer64 |
Get Rotor Layout
Section titled “Get Rotor Layout”Get Rotor LayoutTarget is uBot Multirotor MovementTargetPositions MetersSpin Directions
按电机顺序返回转子的位置(机体坐标系,单位 m,UE 轴)和旋转方向。默认是臂长 0.225 m 的四旋翼 X 型,按 PX4 顺序:右前、左后、左前、右后。把每个 uBot Rotor 放在对应 Rotor Index 的位置上;开始游玩时转子从这里取旋转方向。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Positions Meters | 输出 | Vector数组 |
| Spin Directions | 输出 | EUBot Rotor Spin Direction枚举数组 |
Reset Flight
Section titled “Reset Flight”Reset FlightTarget is uBot Multirotor MovementTarget
停止所有运动,并像开始游玩时那样在当前位姿重新悬停。
Teleport Multirotor
Section titled “Teleport Multirotor”Teleport MultirotorTarget is uBot Multirotor MovementTargetNew Location0, 0, 0New Rotation0, 0, 0Stop Motion
把无人机移到新位姿,不做扫掠检测。勾选 Stop Motion 时速度清零,无人机在新位置悬停。
| 引脚 | 方向 | 类型 | 默认值 |
|---|---|---|---|
| New Location | 输入 | Vector | 0, 0, 0 |
| New Rotation | 输入 | Rotator | 0, 0, 0 |
Stop MotionbStopMotion | 输入 | Boolean | true |
在 Components 面板选中组件,在 Details 面板底部 Events 区点事件旁的 + 即可生成事件节点。
On Impact
Section titled “On Impact”On ImpactHitImpact Speed Meters Per Second
无人机开始接触物体,且撞击速度不低于 Impact Event Min Speed 时触发。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Hit | 输出 | Hit Result结构体 |
| Impact Speed Meters Per Second | 输出 | Float |
未特别标注的属性:蓝图里只读,Details 面板里可以编辑。
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
Actuator IdActuatorId · Multirotor | String | "" | 向 uBot 报告的执行器 ID。为空时使用所属 Actor 的机器人 ID(其 uBot Identity,否则用它的名字)。蓝图读写,Details 可编辑 |
Enable WindbEnableWind · Multirotor | Boolean | true | uBot Wind 的风是否影响这架无人机。蓝图读写,Details 可编辑 |
Max Steps Per FrameMaxStepsPerFrame · Multirotor | Integer | 250 | 每帧最多运行这么多个物理步。帧时间更长时,多出的时间被跳过,并记录一次警告。最小 1 |
Physics Rate HzPhysicsRateHz · Multirotor | Float | 500.0 | 每秒仿真时间的物理步数,单位 Hz。步数越多越准确,开销也越大。范围 100.0 – 4000.0;单位 Hertz |
Contact FrictionContactFriction · Multirotor|Contact | Float | 0.3 | 接触时的滑动摩擦:滑动速度减少冲击速度的这个比例。最小 0.0;蓝图读写,Details 可编辑 |
Impact Event Min Speed Meters Per SecondImpactEventMinSpeedMetersPerSecond · Multirotor|Contact | Float | 0.3 | 沿表面法线的撞击速度低于这个值时不触发 On Impact,单位 m/s。最小 0.0;单位 MetersPerSecond;蓝图读写,Details 可编辑 |
Velocity LimitsVelocityLimits · Multirotor|Limits | UBot Multirotor Velocity Limits结构体 | (MaxHorizontalSpeedMetersPerSecond=10.000000,MaxClimbSpeedMetersPerSecond=3.000000,MaxDescentSpeedMetersPerSecond=2.000000,MaxYawRateRadiansPerSecond=1.570796) | 超过这些限制的速度指令会被限幅。蓝图读写,Details 可编辑 |