Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

control_allocator: increase max num motors to 12 #81

Open
wants to merge 1 commit into
base: aviant/1.13
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions msg/actuator_motors.msg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ uint64 timestamp_sample # the timestamp the data this control response is ba

uint16 reversible_flags # bitset which motors are configured to be reversible

uint8 NUM_CONTROLS = 8
float32[8] control # range: [-1, 1], where 1 means maximum positive thrust,
# -1 maximum negative (if not supported by the output, <0 maps to NaN),
# and NaN maps to disarmed (stop the motors)
uint8 NUM_CONTROLS = 12
float32[12] control # range: [-1, 1], where 1 means maximum positive thrust,
# -1 maximum negative (if not supported by the output, <0 maps to NaN),
# and NaN maps to disarmed (stop the motors)
2 changes: 1 addition & 1 deletion msg/actuator_test.msg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ uint8 ACTION_RELEASE_CONTROL = 0 # exit test mode for the given function
uint8 ACTION_DO_CONTROL = 1 # enable actuator test mode

uint8 FUNCTION_MOTOR1 = 101
uint8 MAX_NUM_MOTORS = 8
uint8 MAX_NUM_MOTORS = 12
uint8 FUNCTION_SERVO1 = 201
uint8 MAX_NUM_SERVOS = 8

Expand Down
2 changes: 1 addition & 1 deletion src/lib/mixer_module/output_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ functions:

Motor:
start: 101
count: 8
count: 12
Servo:
start: 201
count: 8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ActuatorEffectivenessRotors : public ModuleParams, public ActuatorEffectiv
FixedUpwards, ///< axis is fixed, pointing upwards (negative Z)
};

static constexpr int NUM_ROTORS_MAX = 8;
static constexpr int NUM_ROTORS_MAX = 12;

struct RotorGeometry {
matrix::Vector3f position;
Expand Down
10 changes: 9 additions & 1 deletion src/modules/control_allocator/module.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__max_num_mc_motors: &max_num_mc_motors 8
__max_num_mc_motors: &max_num_mc_motors 12
__max_num_servos: &max_num_servos 8
__max_num_tilts: &max_num_tilts 4

Expand Down Expand Up @@ -58,6 +58,10 @@ parameters:
5: Motor 6
6: Motor 7
7: Motor 8
8: Motor 9
9: Motor 10
10: Motor 11
11: Motor 12
default: 0
CA_R${i}_SLEW:
description:
Expand Down Expand Up @@ -111,6 +115,10 @@ parameters:
6: '6'
7: '7'
8: '8'
9: '9'
10: '10'
11: '11'
12: '12'
default: 0
CA_ROTOR${i}_PX:
description:
Expand Down
Loading