跳转到内容

UBot Flight Setpoint

C++
FUBotFlightSetpoint
模块
UBotAerial · UBotAerial 0.1.0
节点
Break · Make
头文件
Source/UBotAerial/Public/UBotAerialTypes.h

飞控在一个物理步里要飞的目标。单位为 SI,坐标为 UE 世界轴。

字段类型蓝图说明
ModeModeEUBot Flight Control Mode枚举读写决定哪些字段生效。电机模式不会到达飞控。
Velocity Meters Per SecondVelocityMetersPerSecondVector读写速度模式:世界坐标系下的目标速度,单位 m/s。
Yaw Rate Radians Per SecondYawRateRadiansPerSecondFloat (double)读写速度模式:偏航角速度,单位 rad/s(正值向右转)。
Hold PositionbHoldPositionBoolean读写速度模式:水平方向保持 Hold Position,垂直速度为 0 时也保持其高度。
Hold Position MetersHoldPositionMetersVector读写速度模式:要保持的位置,单位 m(世界坐标)。
OrientationOrientationQuat结构体读写姿态模式:目标姿态(机体到世界)。
Use Yaw RatebUseYawRateBoolean读写姿态模式:按 Yaw Rate 转动朝向,而不是跟随 Orientation 的偏航角。
Body Rate Radians Per SecondBodyRateRadiansPerSecondVector读写角速度模式:机体坐标系下的目标角速度,单位 rad/s。
Use ThrustbUseThrustBoolean读写姿态和角速度模式:使用 Normalized Thrust,否则按 Vertical Velocity 飞。
Normalized ThrustNormalizedThrustFloat (double)读写总推力占最大推力的比例,范围 0 到 1。
Vertical Velocity Meters Per SecondVerticalVelocityMetersPerSecondFloat (double)读写不用推力的姿态和角速度模式:爬升速度,单位 m/s(向上为正)。

拆分结构体 · Break:FUBotFlightSetpoint

把 UBot Flight Setpoint 拆成各个成员字段。

引脚方向类型说明
UBot Flight Setpoint输入UBot Flight Setpoint结构体
Mode输出EUBot Flight Control Mode枚举Which fields apply. Motor mode never reaches a controller.
Velocity Meters Per Second输出VectorVelocity mode: target velocity in the world frame, m/s.
Yaw Rate Radians Per Second高级输出Float (double)Velocity mode: yaw rate, rad/s (+ turns right).
Hold Position高级bHoldPosition输出BooleanVelocity mode: hold Hold Position horizontally, and its altitude while the vertical velocity is 0.
Hold Position Meters高级输出VectorVelocity mode: the position to hold, m (world).
Orientation高级输出Quat结构体Attitude mode: target attitude, body to world.
Use Yaw Rate高级bUseYawRate输出BooleanAttitude mode: turn the heading at Yaw Rate instead of following the yaw of Orientation.
Body Rate Radians Per Second高级输出VectorBody rate mode: target angular velocity in the body frame, rad/s.
Use Thrust高级bUseThrust输出BooleanAttitude and body rate modes: use Normalized Thrust; otherwise fly Vertical Velocity.
Normalized Thrust高级输出Float (double)Collective thrust as a share of the maximum, 0..1.
Vertical Velocity Meters Per Second高级输出Float (double)Attitude and body rate modes without thrust: climb rate, m/s (+ up).

构造结构体 · Make:FUBotFlightSetpoint

用各个成员字段组成一个 UBot Flight Setpoint。

引脚方向类型默认值说明
Mode输入EUBot Flight Control Mode枚举VelocityWhich fields apply. Motor mode never reaches a controller.
Velocity Meters Per Second输入Vector0.000000,0.000000,0.000000Velocity mode: target velocity in the world frame, m/s.
Yaw Rate Radians Per Second高级输入Float (double)0.0Velocity mode: yaw rate, rad/s (+ turns right).
Hold Position高级bHoldPosition输入BooleanfalseVelocity mode: hold Hold Position horizontally, and its altitude while the vertical velocity is 0.
Hold Position Meters高级输入Vector0.000000,0.000000,0.000000Velocity mode: the position to hold, m (world).
Orientation高级输入Quat结构体(0.0, 0.0, 0.000000,W=1.000000)Attitude mode: target attitude, body to world.
Use Yaw Rate高级bUseYawRate输入BooleanfalseAttitude mode: turn the heading at Yaw Rate instead of following the yaw of Orientation.
Body Rate Radians Per Second高级输入Vector0.000000,0.000000,0.000000Body rate mode: target angular velocity in the body frame, rad/s.
Use Thrust高级bUseThrust输入BooleanfalseAttitude and body rate modes: use Normalized Thrust; otherwise fly Vertical Velocity.
Normalized Thrust高级输入Float (double)0.0Collective thrust as a share of the maximum, 0..1.
Vertical Velocity Meters Per Second高级输入Float (double)0.0Attitude and body rate modes without thrust: climb rate, m/s (+ up).
UBot Flight Setpoint输出UBot Flight Setpoint结构体