PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.47k stars 13.5k forks source link

No actuator_outputs topic in \obj and no autopilots output messages on UAVCAN bus #17183

Open rligocki opened 3 years ago

rligocki commented 3 years ago

While trying to get running new prototype VTOL plane with pixracer autopilot (FMUv4) it was not possible to get output over UAVCAN. After some research when I tried different types of "airframes", I found out, that UAVCAN output esc.rawCommand messages are send only when VEHICLE_TYPE is "mc". Next I found, that with VEHICLE_TYPE "vtol" it is possible to get output, but only when mc_rate_control start has no vtol parameter. After examination of source code of mc_rate_control module it looks like problem is right here: https://github.com/PX4/PX4-Autopilot/blob/1e507f41ca4809793dc4e64dc0954eb1fffe3249/src/modules/mc_rate_control/MulticopterRateControl.cpp#L48

I will try to find solution, but I would be grateful for any advice. With default parameters there is still problem, so it looks like bug to me.

Steps to reproduce the behavior:

  1. Install PX4 on pixracer autopilot (v1.11.3)
  2. set AUTOSTART parameter to 4001 (quadcopter)
  3. topic "actuator_outpus0" is located in \obj and autopilot generates valid rawCommand messages
  4. change AUTOSTART parameter to 13013 (vtol delta quad)
  5. topic "actautor_outpus0" is not lacated in \obj and autopilot does not generates valid rawCommand messages

Expected behavior When VTOL, then topic "actuator_outputs0" is located in \obj and there are output "esc.rawCommand" messages generated on UAVCAN bus.

rligocki commented 3 years ago

Found where exactly is an issue. Whole module vtol_att_control crashes on this part of code -> https://github.com/PX4/PX4-Autopilot/blob/2dace0c9ea418c12ede719c3c74a3bc97d426ecf/src/modules/vtol_att_control/vtol_type.cpp#L86-L118. In case there is UAVCAN enabled in sensor and actuator mode, then there is no second PWM module for autopilots without IO. In that case it was pixracer