msgs: Clean up message definitions and descriptions

- Add versioning to interfacing messages
- Add header description
- Add units, frame and range wherever possible
This commit is contained in:
mahima-yoga
2025-04-16 09:54:21 +02:00
committed by Silvan
parent 1a6b16c8ce
commit a8a354d04a
12 changed files with 65 additions and 38 deletions
+5 -5
View File
@@ -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
@@ -238,7 +234,6 @@ set(msg_files
VehicleTorqueSetpoint.msg
VelocityLimits.msg
WheelEncoders.msg
Wind.msg
YawEstimatorStatus.msg
versioned/ActuatorMotors.msg
versioned/ActuatorServos.msg
@@ -247,8 +242,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
@@ -268,6 +267,7 @@ set(msg_files
versioned/VehicleRatesSetpoint.msg
versioned/VehicleStatus.msg
versioned/VtolVehicleStatus.msg
versioned/Wind.msg
)
list(SORT msg_files)
+10 -7
View File
@@ -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]
float32 course_setpoint # [rad] [-pi, pi] Bearing angle. Same as course over ground setpoint, w.r.t. North.
float32 lateral_acceleration_ff # [m/s^2] [FRD] lateral acceleration demand only for maintaining curvature
float32 bearing_feas # [0,1] bearing feasibility
float32 bearing_feas_on_track # [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 est usage is disabled despite being valid)
-7
View File
@@ -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.
+6 -3
View File
@@ -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 # [0, 1] estimate of certainty of the correct functionality of the npfg roll setpoint in
-9
View File
@@ -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
-3
View File
@@ -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
@@ -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] [-pi, pi] Course over ground setpoint, w.r.t. North. NAN if not controlled directly.
float32 airspeed_direction # [rad] [-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] [FRD] Lateral acceleration setpoint. NAN if not controlled directly, used as feedforward if either course setpoint or airspeed_direction is finite.
@@ -0,0 +1,13 @@
# Fixed Wing Longitudinal Setpoint message
# Used by the fw_lateral_longitudinal_control module
# If not both pitch_direct and throttle_direct are finite, then either altitude or height_rate must be finite.
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] NAN if not controlled directly
float32 equivalent_airspeed # [m/s] NAN if system default should be used
float32 pitch_direct # [rad] [FRD] NAN if not controlled, overrides total energy controller
float32 throttle_direct # [0,1] NAN if not controlled, overrides total energy controller
@@ -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] maps 1:1 to a maximum roll angle, accel_max = tan(roll_max) * GRAVITY
@@ -1,11 +1,17 @@
uint64 timestamp
# 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]
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 climb_rate_target # [m/s] target climbrate used to change altitude. Not used if height_rate is directly set in FixedWingLongitudinalSetpoint.
float32 sink_rate_target # [m/s] target sinkrate used to change altitude. Not used if height_rate is directly set in FixedWingLongitudinalSetpoint.
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
+2
View File
@@ -1,3 +1,5 @@
uint32 MESSAGE_VERSION = 0
uint64 timestamp # time since system start (microseconds)
uint64 timestamp_sample # the timestamp of the raw data (microseconds)
@@ -278,7 +278,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);