Skip to content

Commit

Permalink
Update the regulated set
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-kirienko committed Mar 8, 2020
1 parent 3800028 commit 9c6ad2c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion regulated/zubax/actuator/esc/AngVelSetpoint.0.1.uavcan
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# Negative values indicate reverse rotation.
# If reversal is not supported, negative values should be treated as zero setpoint.

uavcan.si.unit.angular_velocity.Scalar.1.0[<64] motor_mechanical_angular_velocity
uavcan.si.unit.angular_velocity.Scalar.1.0[<64] motor_mechanical_angular_velocity # [radian/second]

@assert _offset_ % 8 == {0}
3 changes: 3 additions & 0 deletions regulated/zubax/actuator/esc/RatiometricSetpoint.0.1.uavcan
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# For example, conventional trapezoidal (six-step) ESCs generally map the setpoint to the phase PWM duty cycle setting;
# a vector control ESC may map the setpoint to the Q-axis voltage vector projection or torque.

int16 FULL_REVERSE = -32768
int16 FULL_FORWARD = +32767

int16[<64] ratiometric

@assert _offset_ % 8 == {0}
8 changes: 3 additions & 5 deletions regulated/zubax/actuator/esc/Status.0.1.uavcan
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# The setpoint message types that can be used to command a group of ESC are defined in this namespace.
# Additional setpoint message types may also be supported on an implementation-specific basis.
# If a group is controlled using different setpoint subjects concurrently (e.g., ratiometric and torque),
# If a group is controlled using different setpoint subjects concurrently (e.g., ratiometric and speed),
# the behavior is implementation-defined.
#
# ESC should stop automatically if no setpoint was received in one second; this limit may be configurable.
Expand All @@ -33,20 +33,20 @@
uint8 MAX_PUBLICATION_PERIOD = 1 # [second]
# Publication frequency limits.

void2
uint6 index
# The index in the setpoint array that this status message refers to.
# This value should never be changed while the node is running.
void2

uint8 demand_factor # [percent]
# Percentage of the maximum rated power output. May exceed 100% in case of overload.

void12
bool dc_voltage_warning # DC link voltage above or below the SOA.
bool overload_warning # Output power/current above SOA or regeneration below the SOA.
bool motor_temperature_warning # Temperature above or below the SOA.
bool inverter_temperature_warning # Temperature above or below the SOA.
# A warning flag is set when the corresponding parameter exceeds the safe operating area (SOA) of the ESC.
void12

@assert _offset_ % 32 == {0}

Expand All @@ -72,8 +72,6 @@ float16 inverter_temperature # [kelvin]
# Sampled temperatures. If multiple values are available, reduction is implementation-defined.
# We use raw float16 here instead of the more type-safe SI types to reduce the footprint.

void32

@assert _offset_ % 8 == {0}
@assert _offset_.count == 1 # Fixed-size
@assert _offset_.max / 8 <= 63 # Fits into one CAN FD frame
2 changes: 1 addition & 1 deletion regulated/zubax/sensor/bms/BatteryPackParams.0.1.uavcan
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ uint32 cycle_count
Technology.0.1 technology
# Shall not change at runtime.

void1
uint7 state_of_health
# The SoH of the pack, ranges from 0 to 100. May change at runtime.
# If not provided by the BMS, use best guess or report 100%.
void1

void64
void64
Expand Down
2 changes: 1 addition & 1 deletion regulated/zubax/sensor/bms/BatteryPackStatus.0.1.uavcan
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ uavcan.time.SynchronizedTimestamp.1.0 timestamp

# -------------------------- ESTIMATES --------------------------

void1
uint7 state_of_charge # [percent]
# The instant SoC of the pack, ranges from 0 to 100. Mandatory.
# The methods of estimation are implementation-defined.
void1

@assert _offset_ % 32 == {0}

Expand Down
2 changes: 1 addition & 1 deletion regulated/zubax/sensor/bms/Technology.0.1.uavcan
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Battery chemistry type and its form-factor. This is a nested type.

void1
uint7 value
void1

uint7 UNKNOWN = 0
uint7 OTHER = 1 # The technology is not specified in this enumeration. Please submit a pull request.
Expand Down

0 comments on commit 9c6ad2c

Please sign in to comment.