mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
msgs: Clean up message definitions and descriptions
- Add versioning to interfacing messages - Add header description - Add units, frame and range wherever possible - Add [norm] and @range indentifiers
This commit is contained in:
parent
8c1f7ec7c0
commit
8a5e5a411a
@ -90,8 +90,6 @@ set(msg_files
|
||||
FollowTargetEstimator.msg
|
||||
FollowTargetStatus.msg
|
||||
FuelTankStatus.msg
|
||||
FixedWingLateralSetpoint.msg
|
||||
FixedWingLongitudinalSetpoint.msg
|
||||
FixedWingLateralGuidanceStatus.msg
|
||||
FixedWingLateralStatus.msg
|
||||
FixedWingRunwayControl.msg
|
||||
@ -125,12 +123,10 @@ set(msg_files
|
||||
LandingGearWheel.msg
|
||||
LandingTargetInnovations.msg
|
||||
LandingTargetPose.msg
|
||||
LateralControlConfiguration.msg
|
||||
LaunchDetectionStatus.msg
|
||||
LedControl.msg
|
||||
LoggerStatus.msg
|
||||
LogMessage.msg
|
||||
LongitudinalControlConfiguration.msg
|
||||
MagnetometerBiasEstimate.msg
|
||||
MagWorkerData.msg
|
||||
ManualControlSwitches.msg
|
||||
@ -247,8 +243,12 @@ set(msg_files
|
||||
versioned/ArmingCheckRequest.msg
|
||||
versioned/BatteryStatus.msg
|
||||
versioned/ConfigOverrides.msg
|
||||
versioned/FixedWingLateralSetpoint.msg
|
||||
versioned/FixedWingLongitudinalSetpoint.msg
|
||||
versioned/GotoSetpoint.msg
|
||||
versioned/HomePosition.msg
|
||||
versioned/LateralControlConfiguration.msg
|
||||
versioned/LongitudinalControlConfiguration.msg
|
||||
versioned/ManualControlSetpoint.msg
|
||||
versioned/ModeCompleted.msg
|
||||
versioned/RegisterExtComponentReply.msg
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
# Fixed Wing Lateral Guidance Status message
|
||||
# Published by fw_pos_control module to report the resultant lateral setpoints and NPFG debug outputs
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
float32 course_setpoint # bearing angle (same as course) [rad]
|
||||
float32 lateral_acceleration_ff # lateral acceleration demand only for maintaining curvature [m/s^2]
|
||||
float32 bearing_feas # bearing feasibility [0,1]
|
||||
float32 bearing_feas_on_track # on-track bearing feasibility [0,1]
|
||||
float32 signed_track_error # signed track error [m]
|
||||
float32 track_error_bound # track error bound [m]
|
||||
float32 adapted_period # adapted period (if auto-tuning enabled) [s]
|
||||
uint8 wind_est_valid # (boolean) true = wind estimate is valid and/or being used by controller (also indicates if wind est usage is disabled despite being valid)
|
||||
float32 course_setpoint # [rad] [@range -pi, pi] Desired direction of travel over ground w.r.t (true) North. Set by guidance law
|
||||
float32 lateral_acceleration_ff # [m/s^2] [FRD] lateral acceleration demand only for maintaining curvature
|
||||
float32 bearing_feas # [@range 0,1] bearing feasibility
|
||||
float32 bearing_feas_on_track # [@range 0,1] on-track bearing feasibility
|
||||
float32 signed_track_error # [m] signed track error
|
||||
float32 track_error_bound # [m] track error bound
|
||||
float32 adapted_period # [s] adapted period (if auto-tuning enabled)
|
||||
uint8 wind_est_valid # [boolean] true = wind estimate is valid and/or being used by controller (also indicates if wind estimate usage is disabled despite being valid)
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
uint64 timestamp
|
||||
|
||||
# NOTE: At least one of course, airspeed_direction, or lateral_acceleration must be finite
|
||||
|
||||
float32 course # [-pi, pi] Course over ground setpoint, w.r.t. North. NAN if not controlled directly.
|
||||
float32 airspeed_direction # [-pi, pi] Angle projected to ground of desired airspeed vector, w.r.t. North. NAN if not controlled directly, used as feedforward if course setpoint is finite.
|
||||
float32 lateral_acceleration # [m/s^2] Lateral acceleration setpoint in FRD frame. NAN if not controlled directly, used as feedforward if either course setpoint or airspeed_direction is finite.
|
||||
@ -1,4 +1,7 @@
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
# Fixed Wing Lateral Status message
|
||||
# Published by the fw_lateral_longitudinal_control module to report the resultant lateral setpoint
|
||||
|
||||
float32 lateral_acceleration # resultant lateral acceleration reference [m/s^2]
|
||||
float32 can_run_factor # estimate of certainty of the correct functionality of the npfg roll setpoint in [0, 1]
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
float32 lateral_acceleration_setpoint # [m/s^2] [FRD] resultant lateral acceleration setpoint
|
||||
float32 can_run_factor # [norm] [@range 0, 1] estimate of certainty of the correct functionality of the npfg roll setpoint
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
uint64 timestamp
|
||||
|
||||
# Note: If not both pitch_direct and throttle_direct are finite, then either altitude or height_rate must be finite
|
||||
|
||||
float32 altitude # [m] Altitude setpoint AMSL, NAN if not controlled
|
||||
float32 height_rate # [m/s] NAN if not controlled directly, used as feedforward if altitude is finite
|
||||
float32 equivalent_airspeed # [m/s] NAN if system default should be used
|
||||
float32 pitch_direct # [rad] NAN if not controlled, overrides total energy controller
|
||||
float32 throttle_direct # [0,1] NAN if not controlled, overrides total energy controller
|
||||
@ -5,4 +5,4 @@
|
||||
uint64 timestamp # [us] time since system start
|
||||
|
||||
bool wheel_steering_enabled # Flag that enables the wheel steering.
|
||||
float32 wheel_steering_nudging_rate # [norm] [-1, 1] [FRD] Manual wheel nudging, added to controller output. NAN is interpreted as 0.
|
||||
float32 wheel_steering_nudging_rate # [norm] [@range -1, 1] [FRD] Manual wheel nudging, added to controller output. NAN is interpreted as 0.
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
uint64 timestamp
|
||||
|
||||
float32 lateral_accel_max # [m/s^2] maps 1:1 to a maximum roll angle, accel_max = tan(roll_max) * GRAVITY
|
||||
@ -1,11 +0,0 @@
|
||||
uint64 timestamp
|
||||
|
||||
float32 pitch_min # [rad]
|
||||
float32 pitch_max # [rad]
|
||||
float32 throttle_min # [0,1]
|
||||
float32 throttle_max # [0,1]
|
||||
float32 climb_rate_target # [m/s] target climbrate used to change altitude
|
||||
float32 sink_rate_target # [m/s] target sinkrate used to change altitude
|
||||
float32 speed_weight # [0,2], 0=pitch controls altitude only, 2=pitch controls airspeed only
|
||||
bool enforce_low_height_condition # if true, total energy controller will use lower altitude control time constant
|
||||
bool disable_underspeed_protection # if true, underspeed handling is disabled in the total energy controller
|
||||
11
msg/versioned/FixedWingLateralSetpoint.msg
Normal file
11
msg/versioned/FixedWingLateralSetpoint.msg
Normal file
@ -0,0 +1,11 @@
|
||||
# Fixed Wing Lateral Setpoint message
|
||||
# Used by the fw_lateral_longitudinal_control module
|
||||
# At least one of course, airspeed_direction, or lateral_acceleration must be finite.
|
||||
|
||||
uint32 MESSAGE_VERSION = 0
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
float32 course # [rad] [@range -pi, pi] Desired direction of travel over ground w.r.t (true) North. NAN if not controlled directly.
|
||||
float32 airspeed_direction # [rad] [@range -pi, pi] Desired horizontal angle of airspeed vector w.r.t. (true) North. Same as vehicle heading if in the absence of sideslip. NAN if not controlled directly, takes precedence over course if finite.
|
||||
float32 lateral_acceleration # [m/s^2] [FRD] Lateral acceleration setpoint. NAN if not controlled directly, used as feedforward if either course setpoint or airspeed_direction is finite.
|
||||
14
msg/versioned/FixedWingLongitudinalSetpoint.msg
Normal file
14
msg/versioned/FixedWingLongitudinalSetpoint.msg
Normal file
@ -0,0 +1,14 @@
|
||||
# Fixed Wing Longitudinal Setpoint message
|
||||
# Used by the fw_lateral_longitudinal_control module
|
||||
# If pitch_direct and throttle_direct are not both finite, then the controller relies on altitude/height_rate and equivalent_airspeed to control vertical motion.
|
||||
# If both altitude and height_rate are NAN, the controller maintains the current altitude.
|
||||
|
||||
uint32 MESSAGE_VERSION = 0
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
float32 altitude # [m] Altitude setpoint AMSL, not controlled directly if NAN or if height_rate is finite
|
||||
float32 height_rate # [m/s] [ENU] Scalar height rate setpoint. NAN if not controlled directly
|
||||
float32 equivalent_airspeed # [m/s] [@range 0, inf] Scalar equivalent airspeed setpoint. NAN if system default should be used
|
||||
float32 pitch_direct # [rad] [@range -pi, pi] [FRD] NAN if not controlled, overrides total energy controller
|
||||
float32 throttle_direct # [norm] [@range 0,1] NAN if not controlled, overrides total energy controller
|
||||
8
msg/versioned/LateralControlConfiguration.msg
Normal file
8
msg/versioned/LateralControlConfiguration.msg
Normal file
@ -0,0 +1,8 @@
|
||||
# Fixed Wing Lateral Control Configuration message
|
||||
# Used by the fw_lateral_longitudinal_control module to constrain FixedWingLateralSetpoint messages.
|
||||
|
||||
uint32 MESSAGE_VERSION = 0
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
float32 lateral_accel_max # [m/s^2] currently maps to a maximum roll angle, accel_max = tan(roll_max) * GRAVITY
|
||||
17
msg/versioned/LongitudinalControlConfiguration.msg
Normal file
17
msg/versioned/LongitudinalControlConfiguration.msg
Normal file
@ -0,0 +1,17 @@
|
||||
# Fixed Wing Longitudinal Control Configuration message
|
||||
# Used by the fw_lateral_longitudinal_control module and TECS to constrain FixedWingLongitudinalSetpoint messages
|
||||
# and configure the resultant setpoints.
|
||||
|
||||
uint32 MESSAGE_VERSION = 0
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
float32 pitch_min # [rad][@range -pi, pi] defaults to FW_P_LIM_MIN if NAN.
|
||||
float32 pitch_max # [rad][@range -pi, pi] defaults to FW_P_LIM_MAX if NAN.
|
||||
float32 throttle_min # [norm] [@range 0,1] deaults to FW_THR_MIN if NAN.
|
||||
float32 throttle_max # [norm] [@range 0,1] defaults to FW_THR_MAX if NAN.
|
||||
float32 climb_rate_target # [m/s] target climbrate to change altitude. Defaults to FW_T_CLIMB_MAX if NAN. Not used if height_rate is directly set in FixedWingLongitudinalSetpoint.
|
||||
float32 sink_rate_target # [m/s] target sinkrate to change altitude. Defaults to FW_T_SINK_MAX if NAN. Not used if height_rate is directly set in FixedWingLongitudinalSetpoint.
|
||||
float32 speed_weight # [@range 0,2], 0=pitch controls altitude only, 2=pitch controls airspeed only
|
||||
bool enforce_low_height_condition # [boolean] if true, the altitude controller is configured with an alternative timeconstant for tighter altitude tracking
|
||||
bool disable_underspeed_protection # [boolean] if true, underspeed handling is disabled in the altitude controller
|
||||
@ -285,7 +285,7 @@ void FwLateralLongitudinalControl::Run()
|
||||
|
||||
fixed_wing_lateral_status_s fixed_wing_lateral_status{};
|
||||
fixed_wing_lateral_status.timestamp = hrt_absolute_time();
|
||||
fixed_wing_lateral_status.lateral_acceleration = lateral_accel_sp;
|
||||
fixed_wing_lateral_status.lateral_acceleration_setpoint = lateral_accel_sp;
|
||||
fixed_wing_lateral_status.can_run_factor = _can_run_factor;
|
||||
|
||||
_fixed_wing_lateral_status_pub.publish(fixed_wing_lateral_status);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user