| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Commit af3cfae introduced a small semantic change in _actuator_sp: - prior to that commit it was always the output of the allocation algorithm, i.e. if 0 thrust was allocated the _actuator_sp was 0, and the NaN needed to stop some motors only entered the picture when populating the actuator_motors message in publish_actuator_controls - after that commit, we change _actuator_sp itself to be NaN when the corresponding motor should be stopped This breaks consumers of _actuator_sp that expect there to be a finite, physical thrust in _actuator_sp. One such consumer is publish_control_allocator_status, which produces NaN if the _actuator_sp is NaN and is thus currently useless. Fix: Convert NaNs back to zero in getAllocatedControl so all consumers of that work as before.
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 72 byte (0 %)] FILE SIZE VM SIZE
-------------- --------------
+0.0% +72 +0.0% +72 .text
[NEW] +240 [NEW] +240 ControlAllocation::getAllocatedControl()
-31.6% -168 -31.6% -168 ControlAllocator::publish_control_allocator_status()
+0.0% +51 [ = ] 0 .debug_abbrev
+0.0% +8 [ = ] 0 .debug_aranges
+0.0% +36 [ = ] 0 .debug_frame
+0.0% +496 [ = ] 0 .debug_info
+0.0% +181 [ = ] 0 .debug_line
-42.9% -3 [ = ] 0 [Unmapped]
+0.0% +184 [ = ] 0 [section .debug_line]
+0.0% +155 [ = ] 0 .debug_loclists
+0.0% +17 [ = ] 0 .debug_rnglists
[DEL] -1 [ = ] 0 [Unmapped]
+0.0% +18 [ = ] 0 [section .debug_rnglists]
-1.2% -3 [ = ] 0 .shstrtab
+0.0% +47 [ = ] 0 .strtab
[NEW] +47 [ = ] 0 ControlAllocation::getAllocatedControl()
+52% +16 [ = ] 0 __nxsched_process_timer_veneer
-38.1% -16 [ = ] 0 __nxsem_freeholder_veneer
+0.0% +32 [ = ] 0 .symtab
[NEW] +16 [ = ] 0 ControlAllocation::getAllocatedControl()
+0.1% +16 [ = ] 0 [section .symtab]
+33% +16 [ = ] 0 ___ZN4uORB7Manager17get_device_masterEv_veneer
-33.3% -16 [ = ] 0 ____aeabi_l2f_veneer
+50% +16 [ = ] 0 __net_unlock_veneer
+67% +32 [ = ] 0 __nxsched_process_timer_veneer
-40.0% -32 [ = ] 0 __nxsem_freeholder_veneer
-25.0% -16 [ = ] 0 __up_dma_rxavailable_veneer
-0.6% -72 [ = ] 0 [Unmapped]
+0.0% +1020 +0.0% +72 TOTAL
FILE SIZE VM SIZE
-------------- --------------
+0.0% +72 +0.0% +72 .text
[NEW] +240 [NEW] +240 ControlAllocation::getAllocatedControl()
-31.6% -168 -31.6% -168 ControlAllocator::publish_control_allocator_status()
+0.0% +51 [ = ] 0 .debug_abbrev
+0.0% +8 [ = ] 0 .debug_aranges
+0.0% +36 [ = ] 0 .debug_frame
+0.0% +496 [ = ] 0 .debug_info
+0.0% +189 [ = ] 0 .debug_line
[NEW] +5 [ = ] 0 [Unmapped]
+0.0% +184 [ = ] 0 [section .debug_line]
+0.0% +155 [ = ] 0 .debug_loclists
+0.0% +17 [ = ] 0 .debug_rnglists
-33.3% -1 [ = ] 0 [Unmapped]
+0.0% +18 [ = ] 0 [section .debug_rnglists]
-1.3% -3 [ = ] 0 .shstrtab
+0.0% +47 [ = ] 0 .strtab
[NEW] +47 [ = ] 0 ControlAllocation::getAllocatedControl()
+0.0% +32 [ = ] 0 .symtab
[NEW] +16 [ = ] 0 ControlAllocation::getAllocatedControl()
+0.1% +16 [ = ] 0 [section .symtab]
-1.0% -72 [ = ] 0 [Unmapped]
+0.0% +1.00Ki +0.0% +72 TOTAL
Updated: 2026-09-01T13:23:33 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Solved Problem
Commit af3cfae (#26530) introduced a semantic change in _actuator_sp:
This breaks consumers of _actuator_sp that expect there to be a finite, physical thrust in _actuator_sp. One such consumer is publish_control_allocator_status, which produces NaN if the _actuator_sp is NaN and is thus currently useless.
Solution
Convert NaNs back to zero in getAllocatedControl so all consumers of that work as before.
Test coverage
sihsim_standard_vtol, take off and then increase SIH_WIND_N to 10 m/s to cause unallocated thrust.
Before: unallocated thrust/torque are NaN
After: unallocated thrust/torque correctly logged