Compare commits

...

7 Commits

Author SHA1 Message Date
Pedro-Roque cb47a620be fix: remove modules 2025-12-11 09:24:34 -08:00
Pedro Roque c2e70a46ec Merge branch 'main' into pr-dual-atmos 2025-12-10 16:08:52 -08:00
Pedro-Roque d093115534 fix: ensure esc count does not exceed maximum number of ESCs 2025-12-10 15:57:56 -08:00
Pedro-Roque d1c6e7f111 fix: revert non-necessary changes 2025-12-10 15:45:12 -08:00
Pedro-Roque 0b530615af fix: add motor number max fitting Actuator 2025-12-10 15:41:39 -08:00
Pedro-Roque 6991a6ac88 fix: update gz sim to latest 2025-12-07 23:35:50 -08:00
Pedro-Roque 49a8c46946 init: working towards dual-action ATMOS 2025-12-07 23:15:52 -08:00
4 changed files with 8 additions and 5 deletions
@@ -109,9 +109,11 @@ void GZMixingInterfaceESC::motorSpeedCallback(const gz::msgs::Actuators &actuato
pthread_mutex_lock(&_node_mutex);
esc_status_s esc_status{};
esc_status.esc_count = actuators.velocity_size();
// Limit to max supported ESCs while allowing for a larger number of system actuators
int actuators_size = math::min(actuators.velocity_size(), static_cast<int>(esc_status_s::CONNECTED_ESC_MAX));
esc_status.esc_count = actuators_size;
for (int i = 0; i < actuators.velocity_size(); i++) {
for (int i = 0; i < actuators_size; i++) {
esc_status.esc[i].timestamp = hrt_absolute_time();
esc_status.esc[i].esc_rpm = actuators.velocity(i);
esc_status.esc_online_flags |= 1 << i;
+2 -1
View File
@@ -1,3 +1,4 @@
__max_num_motors: &max_num_motors 12
__max_num_servos: &max_num_servos 8
__max_num_tilts: &max_num_tilts 4
@@ -18,7 +19,7 @@ actuator_output:
min: { min: 0, max: 1000, default: 0 }
max: { min: 0, max: 1000, default: 1000 }
failsafe: { min: 0, max: 1000 }
num_channels: *max_num_servos
num_channels: *max_num_motors
- param_prefix: SIM_GZ_SV
group_label: 'Servos'
channel_label: 'Servo'
+1 -1
View File
@@ -52,7 +52,7 @@ publications:
- topic: /fmu/out/transponder_report
type: px4_msgs::msg::TransponderReport
# - topic: /fmu/out/vehicle_angular_velocity
# type: px4_msgs::msg::VehicleAngularVelocity