From bedc6bbc8ac51c4fd2863b425ffcbcd94e33491b Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Wed, 30 Apr 2014 14:18:03 +0400 Subject: [PATCH] DSDL messages in uavcan.equpment.* --- .../actuator/265.ArrayCommand.uavcan | 10 ++++++++ .../equipment/actuator/600.Status.uavcan | 12 +++++++++ .../altitude_agl/290.AltitudeAGL.uavcan | 19 ++++++++++++++ .../equipment/camera/740.TakePhoto.uavcan | 9 +++++++ .../equipment/camera/741.Configure.uavcan | 12 +++++++++ .../equipment/camera/CaptureSettings.uavcan | 8 ++++++ .../uavcan/equipment/camera/ResultCode.uavcan | 10 ++++++++ .../equipment/esc/260.RawCommand.uavcan | 13 ++++++++++ .../equipment/esc/261.RPMCommand.uavcan | 12 +++++++++ dsdl/uavcan/equipment/esc/601.Status.uavcan | 13 ++++++++++ .../gimbal/390.AngularVelocityCommand.uavcan | 7 ++++++ .../equipment/gimbal/391.GeoPOICommand.uavcan | 9 +++++++ .../gimbal/392.OrientationCommand.uavcan | 11 ++++++++ .../uavcan/equipment/gimbal/393.Status.uavcan | 12 +++++++++ ...tcmStream.uavcan => 301.RTCMStream.uavcan} | 0 .../indication/742.BeepCommand.uavcan | 7 ++++++ .../indication/743.LightsCommand.uavcan | 5 ++++ .../uavcan/equipment/indication/RGB565.uavcan | 9 +++++++ .../indication/SingleLightCommand.uavcan | 8 ++++++ .../manual/740.RemoteControlInput.uavcan | 8 ++++++ .../manual/741.MasterSwitchStatus.uavcan | 6 +++++ .../optical_flow/291.OpticalFlow.uavcan | 9 +++++++ .../equipment/power/710.PowerStatus.uavcan | 7 ++++++ .../equipment/power/711.CircuitStatus.uavcan | 8 ++++++ .../equipment/power/BatteryStatus.uavcan | 20 +++++++++++++++ .../range_sensor/292.RangeMeasurement.uavcan | 25 +++++++++++++++++++ dsdl/uavcan/equipment/rotor/602.Status.uavcan | 8 ++++++ 27 files changed, 277 insertions(+) create mode 100644 dsdl/uavcan/equipment/actuator/265.ArrayCommand.uavcan create mode 100644 dsdl/uavcan/equipment/actuator/600.Status.uavcan create mode 100644 dsdl/uavcan/equipment/altitude_agl/290.AltitudeAGL.uavcan create mode 100644 dsdl/uavcan/equipment/camera/740.TakePhoto.uavcan create mode 100644 dsdl/uavcan/equipment/camera/741.Configure.uavcan create mode 100644 dsdl/uavcan/equipment/camera/CaptureSettings.uavcan create mode 100644 dsdl/uavcan/equipment/camera/ResultCode.uavcan create mode 100644 dsdl/uavcan/equipment/esc/260.RawCommand.uavcan create mode 100644 dsdl/uavcan/equipment/esc/261.RPMCommand.uavcan create mode 100644 dsdl/uavcan/equipment/esc/601.Status.uavcan create mode 100644 dsdl/uavcan/equipment/gimbal/390.AngularVelocityCommand.uavcan create mode 100644 dsdl/uavcan/equipment/gimbal/391.GeoPOICommand.uavcan create mode 100644 dsdl/uavcan/equipment/gimbal/392.OrientationCommand.uavcan create mode 100644 dsdl/uavcan/equipment/gimbal/393.Status.uavcan rename dsdl/uavcan/equipment/gnss/{301.RtcmStream.uavcan => 301.RTCMStream.uavcan} (100%) create mode 100644 dsdl/uavcan/equipment/indication/742.BeepCommand.uavcan create mode 100644 dsdl/uavcan/equipment/indication/743.LightsCommand.uavcan create mode 100644 dsdl/uavcan/equipment/indication/RGB565.uavcan create mode 100644 dsdl/uavcan/equipment/indication/SingleLightCommand.uavcan create mode 100644 dsdl/uavcan/equipment/manual/740.RemoteControlInput.uavcan create mode 100644 dsdl/uavcan/equipment/manual/741.MasterSwitchStatus.uavcan create mode 100644 dsdl/uavcan/equipment/optical_flow/291.OpticalFlow.uavcan create mode 100644 dsdl/uavcan/equipment/power/710.PowerStatus.uavcan create mode 100644 dsdl/uavcan/equipment/power/711.CircuitStatus.uavcan create mode 100644 dsdl/uavcan/equipment/power/BatteryStatus.uavcan create mode 100644 dsdl/uavcan/equipment/range_sensor/292.RangeMeasurement.uavcan create mode 100644 dsdl/uavcan/equipment/rotor/602.Status.uavcan diff --git a/dsdl/uavcan/equipment/actuator/265.ArrayCommand.uavcan b/dsdl/uavcan/equipment/actuator/265.ArrayCommand.uavcan new file mode 100644 index 0000000000..9d7ab703b5 --- /dev/null +++ b/dsdl/uavcan/equipment/actuator/265.ArrayCommand.uavcan @@ -0,0 +1,10 @@ +# +# Actuator commands. +# The system supports up to 256 actuators; up to 32 of them can be commanded with one message. +# + +uavcan.FigureOfMerit figure_of_merit + +uint8[<=32] actuator_id # Can be empty, in which case the ID is defined by the command index + +float16[<=32] command # For a servo use [-1; 1] diff --git a/dsdl/uavcan/equipment/actuator/600.Status.uavcan b/dsdl/uavcan/equipment/actuator/600.Status.uavcan new file mode 100644 index 0000000000..c2a842f061 --- /dev/null +++ b/dsdl/uavcan/equipment/actuator/600.Status.uavcan @@ -0,0 +1,12 @@ +# +# Generic actuator feedback, if available. +# + +uint8 actuator_id + +float16 position + +float16 power # Watt; negative if unknown + +uint7 POWER_RATE_PCT_UNKNOWN = 127 +uint7 power_rate_pct diff --git a/dsdl/uavcan/equipment/altitude_agl/290.AltitudeAGL.uavcan b/dsdl/uavcan/equipment/altitude_agl/290.AltitudeAGL.uavcan new file mode 100644 index 0000000000..bfbc07e4c3 --- /dev/null +++ b/dsdl/uavcan/equipment/altitude_agl/290.AltitudeAGL.uavcan @@ -0,0 +1,19 @@ +# +# Altitude above ground level. +# A single node can publish the measurements from different sensors concurrently. +# + +uavcan.Timestamp timestamp + +float16 altitude_agl # +inf - too far, -inf - too close +float16 altitude_agl_variance # +inf if too close or too far + +float16 sensor_max_range +float16 sensor_min_range + +uint4 SENSOR_UNKNOWN = 0 +uint4 SENSOR_SONAR = 1 +uint4 SENSOR_LASER = 2 +uint4 SENSOR_RADAR = 3 +uint4 SENSOR_CV = 4 +uint4 sensor_type diff --git a/dsdl/uavcan/equipment/camera/740.TakePhoto.uavcan b/dsdl/uavcan/equipment/camera/740.TakePhoto.uavcan new file mode 100644 index 0000000000..43677ec365 --- /dev/null +++ b/dsdl/uavcan/equipment/camera/740.TakePhoto.uavcan @@ -0,0 +1,9 @@ +# +# Take a photo. +# + +uint8[<128] description # To be associated with photo + +--- + +ResultCode result diff --git a/dsdl/uavcan/equipment/camera/741.Configure.uavcan b/dsdl/uavcan/equipment/camera/741.Configure.uavcan new file mode 100644 index 0000000000..b046b4e47f --- /dev/null +++ b/dsdl/uavcan/equipment/camera/741.Configure.uavcan @@ -0,0 +1,12 @@ +# +# Generic camera settings. +# + +CaptureSettings recording +CaptureSettings transmission + +float32 transmitter_power # Watts, useful for obey regulatory power; NAN if undefined + +--- + +ResultCode result diff --git a/dsdl/uavcan/equipment/camera/CaptureSettings.uavcan b/dsdl/uavcan/equipment/camera/CaptureSettings.uavcan new file mode 100644 index 0000000000..8e8e26bdec --- /dev/null +++ b/dsdl/uavcan/equipment/camera/CaptureSettings.uavcan @@ -0,0 +1,8 @@ +# +# Nested type. +# Generic camera capture settings. +# + +float16 fps + +uint8 compression_level # 0 - raw (no compression), 255 - max compression diff --git a/dsdl/uavcan/equipment/camera/ResultCode.uavcan b/dsdl/uavcan/equipment/camera/ResultCode.uavcan new file mode 100644 index 0000000000..2320841dc0 --- /dev/null +++ b/dsdl/uavcan/equipment/camera/ResultCode.uavcan @@ -0,0 +1,10 @@ +# +# Nested type. +# Camera operation result. +# + +uint8 OK = 0 +uint8 INVALID_PARAMS = 1 +uint8 OUT_OF_STORAGE = 2 +uint8 INTERNAL_ERROR = 255 +uint8 code diff --git a/dsdl/uavcan/equipment/esc/260.RawCommand.uavcan b/dsdl/uavcan/equipment/esc/260.RawCommand.uavcan new file mode 100644 index 0000000000..db2cf0ccaf --- /dev/null +++ b/dsdl/uavcan/equipment/esc/260.RawCommand.uavcan @@ -0,0 +1,13 @@ +# +# Raw ESC command. +# 0 - disarmed, 1+ - armed. +# Direct transition from disarmed state to high thrust should be rejected by the ESC. +# Non-zero setpoint value below minimum should be interpreted as min valid setpoint. +# + +uavcan.FigureOfMerit figure_of_merit + +uint12 CMD_DISARM = 0 +uint12 CMD_MIN = 1 +uint12 CMD_MAX = 4095 +uint12[<16] cmd diff --git a/dsdl/uavcan/equipment/esc/261.RPMCommand.uavcan b/dsdl/uavcan/equipment/esc/261.RPMCommand.uavcan new file mode 100644 index 0000000000..24564e062a --- /dev/null +++ b/dsdl/uavcan/equipment/esc/261.RPMCommand.uavcan @@ -0,0 +1,12 @@ +# +# Simple RPM setpoint. +# 0 - disarmed, 1+ - armed. +# Direct transition from disarmed state to high thrust should be rejected by the ESC. +# Non-zero setpoint value below minimum should be interpreted as min valid setpoint. +# + +uavcan.FigureOfMerit figure_of_merit + +uint16 RPM_DISARM = 0 +uint16 RPM_MIN = 1 +uint16[<16] rpm diff --git a/dsdl/uavcan/equipment/esc/601.Status.uavcan b/dsdl/uavcan/equipment/esc/601.Status.uavcan new file mode 100644 index 0000000000..00761b81ef --- /dev/null +++ b/dsdl/uavcan/equipment/esc/601.Status.uavcan @@ -0,0 +1,13 @@ +# +# Generic ESC status. +# + +uint4 index + +uint16 rpm +float16 power # Watt, NAN if unknown. Can be negative in case of a regenerative braking. +float16 temperature # Celsius, NAN if unknown + +uint7 power_rate_pct # Percent of maximum power + +uint33 error_count # Since the motor started diff --git a/dsdl/uavcan/equipment/gimbal/390.AngularVelocityCommand.uavcan b/dsdl/uavcan/equipment/gimbal/390.AngularVelocityCommand.uavcan new file mode 100644 index 0000000000..15e1758e9e --- /dev/null +++ b/dsdl/uavcan/equipment/gimbal/390.AngularVelocityCommand.uavcan @@ -0,0 +1,7 @@ +# +# Generic gimbal control. +# + +uavcan.FigureOfMerit figure_of_merit + +float16[3] angular_velocity diff --git a/dsdl/uavcan/equipment/gimbal/391.GeoPOICommand.uavcan b/dsdl/uavcan/equipment/gimbal/391.GeoPOICommand.uavcan new file mode 100644 index 0000000000..d20901861b --- /dev/null +++ b/dsdl/uavcan/equipment/gimbal/391.GeoPOICommand.uavcan @@ -0,0 +1,9 @@ +# +# Generic gimbal control. +# + +uavcan.FigureOfMerit figure_of_merit + +int32 lon_1e7 # 1 LSB = 1e-7 deg +int32 lat_1e7 +int24 alt_1e2 # 1 LSB = 1e-2 meters (10 mm) diff --git a/dsdl/uavcan/equipment/gimbal/392.OrientationCommand.uavcan b/dsdl/uavcan/equipment/gimbal/392.OrientationCommand.uavcan new file mode 100644 index 0000000000..7ff28149ec --- /dev/null +++ b/dsdl/uavcan/equipment/gimbal/392.OrientationCommand.uavcan @@ -0,0 +1,11 @@ +# +# Generic gimbal control. +# + +uavcan.FigureOfMerit figure_of_merit + +float16[4] orientation_xyzw + +uint2 REFERENCE_FRAME_FIXED = 0 +uint2 REFERENCE_FRAME_BODY = 1 +uint2 reference_frame diff --git a/dsdl/uavcan/equipment/gimbal/393.Status.uavcan b/dsdl/uavcan/equipment/gimbal/393.Status.uavcan new file mode 100644 index 0000000000..d375f57e82 --- /dev/null +++ b/dsdl/uavcan/equipment/gimbal/393.Status.uavcan @@ -0,0 +1,12 @@ +# +# Generic gimbal status. +# + +float16[4] orientation_xyzw +float16[<=9] orientation_covariance # +inf for non-existent axes + +uint4 MODE_ANGULAR_VELOCITY = 0 +uint4 MODE_ORIENTATION_FIXED_FRAME = 1 +uint4 MODE_ORIENTATION_BODY_FRAME = 2 +uint4 MODE_GEO_POI = 3 +uint4 mode diff --git a/dsdl/uavcan/equipment/gnss/301.RtcmStream.uavcan b/dsdl/uavcan/equipment/gnss/301.RTCMStream.uavcan similarity index 100% rename from dsdl/uavcan/equipment/gnss/301.RtcmStream.uavcan rename to dsdl/uavcan/equipment/gnss/301.RTCMStream.uavcan diff --git a/dsdl/uavcan/equipment/indication/742.BeepCommand.uavcan b/dsdl/uavcan/equipment/indication/742.BeepCommand.uavcan new file mode 100644 index 0000000000..23f4f6c639 --- /dev/null +++ b/dsdl/uavcan/equipment/indication/742.BeepCommand.uavcan @@ -0,0 +1,7 @@ +# +# Nodes that are capable of making noise (e.g. ESC) should obey. +# Use case: pre-arm warning sound, error indication. +# + +float16 frequency # Hz +float16 duration # Sec diff --git a/dsdl/uavcan/equipment/indication/743.LightsCommand.uavcan b/dsdl/uavcan/equipment/indication/743.LightsCommand.uavcan new file mode 100644 index 0000000000..094713fc10 --- /dev/null +++ b/dsdl/uavcan/equipment/indication/743.LightsCommand.uavcan @@ -0,0 +1,5 @@ +# +# Lights control command. +# + +SingleLightCommand[<=32] commands diff --git a/dsdl/uavcan/equipment/indication/RGB565.uavcan b/dsdl/uavcan/equipment/indication/RGB565.uavcan new file mode 100644 index 0000000000..7c6c92b0a2 --- /dev/null +++ b/dsdl/uavcan/equipment/indication/RGB565.uavcan @@ -0,0 +1,9 @@ +# +# Nested type. +# RGB color in 5-6-5 16-bit palette. +# Monocolor lights should interpret this as brightness setpoint: from zero (0, 0, 0) to full brightness (31, 63, 31). +# + +uint5 red +uint6 green +uint5 blue diff --git a/dsdl/uavcan/equipment/indication/SingleLightCommand.uavcan b/dsdl/uavcan/equipment/indication/SingleLightCommand.uavcan new file mode 100644 index 0000000000..babc62af5b --- /dev/null +++ b/dsdl/uavcan/equipment/indication/SingleLightCommand.uavcan @@ -0,0 +1,8 @@ +# +# Nested type. +# Controls single light source, color of monochrome. +# + +uint8 light_id + +RGB565 color # Monocolor lights should interpret this as brightness diff --git a/dsdl/uavcan/equipment/manual/740.RemoteControlInput.uavcan b/dsdl/uavcan/equipment/manual/740.RemoteControlInput.uavcan new file mode 100644 index 0000000000..9444bc0bff --- /dev/null +++ b/dsdl/uavcan/equipment/manual/740.RemoteControlInput.uavcan @@ -0,0 +1,8 @@ +# +# Scaled RC input for manual control/override. +# + +uavcan.FigureOfMerit figure_of_merit # E.g. receiver RSSI + +uint10 CHANNEL_MAX_VALUE = 1023 +uint10[<=16] channels # Normalized in range [0; CHANNEL_MAX_VALUE] diff --git a/dsdl/uavcan/equipment/manual/741.MasterSwitchStatus.uavcan b/dsdl/uavcan/equipment/manual/741.MasterSwitchStatus.uavcan new file mode 100644 index 0000000000..4f16971f36 --- /dev/null +++ b/dsdl/uavcan/equipment/manual/741.MasterSwitchStatus.uavcan @@ -0,0 +1,6 @@ +# +# Some nodes may refuse to operate unless some other node publishes this message with correct value. +# ESC should obey. +# + +bool enable diff --git a/dsdl/uavcan/equipment/optical_flow/291.OpticalFlow.uavcan b/dsdl/uavcan/equipment/optical_flow/291.OpticalFlow.uavcan new file mode 100644 index 0000000000..3e91234610 --- /dev/null +++ b/dsdl/uavcan/equipment/optical_flow/291.OpticalFlow.uavcan @@ -0,0 +1,9 @@ +# +# X/Y velocities estimated by simple optical flow sensor. +# + +uavcan.Timestamp timestamp + +float16 linear_velocity_x +float16 linear_velocity_y +float16 linear_velocity_variance diff --git a/dsdl/uavcan/equipment/power/710.PowerStatus.uavcan b/dsdl/uavcan/equipment/power/710.PowerStatus.uavcan new file mode 100644 index 0000000000..74b175da78 --- /dev/null +++ b/dsdl/uavcan/equipment/power/710.PowerStatus.uavcan @@ -0,0 +1,7 @@ +# +# Info for all battery packs of the primary power supply. +# + +bool external_power_connected + +BatteryStatus[<16] batteries diff --git a/dsdl/uavcan/equipment/power/711.CircuitStatus.uavcan b/dsdl/uavcan/equipment/power/711.CircuitStatus.uavcan new file mode 100644 index 0000000000..17d8a9a335 --- /dev/null +++ b/dsdl/uavcan/equipment/power/711.CircuitStatus.uavcan @@ -0,0 +1,8 @@ +# +# Generic electrical circuit info. +# + +uint8 circuit_id + +float16 voltage +float16 current diff --git a/dsdl/uavcan/equipment/power/BatteryStatus.uavcan b/dsdl/uavcan/equipment/power/BatteryStatus.uavcan new file mode 100644 index 0000000000..42ca83d2ee --- /dev/null +++ b/dsdl/uavcan/equipment/power/BatteryStatus.uavcan @@ -0,0 +1,20 @@ +# +# Nested type. +# Energy and capacity are expressed in watt hours (Joules are infeasible because of range limitations). +# Unknown values should be represented as NAN. +# + +uint8 battery_id + +uint8 MASK_IN_USE = 1 +uint8 MASK_CHARGING = 2 +uint8 MASK_CHARGED = 4 +uint8 mask + +float16 voltage +float16 power +float16 consumed_wh +float16 capacity_wh # NAN if unknown + +uint7 CHARGE_PCT_UNKNOWN = 127 +uint7 charge_pct diff --git a/dsdl/uavcan/equipment/range_sensor/292.RangeMeasurement.uavcan b/dsdl/uavcan/equipment/range_sensor/292.RangeMeasurement.uavcan new file mode 100644 index 0000000000..41a8b48f44 --- /dev/null +++ b/dsdl/uavcan/equipment/range_sensor/292.RangeMeasurement.uavcan @@ -0,0 +1,25 @@ +# +# Generic narrow-beam range sensor data. +# + +uavcan.Timestamp timestamp # Time when the probe signal was reflected from the target + +uint8 sensor_id + +uavcan.equipment.CoarseOrientation beam_orientation # In body frame + +float16 field_of_view # Radians + +uint4 SENSOR_TYPE_UNDEFINED = 0 +uint4 SENSOR_TYPE_SONAR = 1 +uint4 SENSOR_TYPE_LIDAR = 2 +uint4 SENSOR_TYPE_RADAR = 3 +uint4 sensor_type + +uint4 READING_TYPE_UNDEFINED = 0 # Range is unknown +uint4 READING_TYPE_VALID_RANGE = 1 # Range field contains valid distance +uint4 READING_TYPE_TOO_CLOSE = 2 # Range field contains min range for the sensor +uint4 READING_TYPE_TOO_FAR = 3 # Range field contains max range for the sensor +uint4 reading_type + +float16 range # Meters diff --git a/dsdl/uavcan/equipment/rotor/602.Status.uavcan b/dsdl/uavcan/equipment/rotor/602.Status.uavcan new file mode 100644 index 0000000000..874481410f --- /dev/null +++ b/dsdl/uavcan/equipment/rotor/602.Status.uavcan @@ -0,0 +1,8 @@ +# +# Generic rotor status. +# If the aircraft has one motor per rotor, rotor_index must match motor index. +# + +uint4 index + +uint16 rpm