External module WorkItem not getting cycles on cube

The px4_sitl config runs my external module and it gets cycles, but the px4_fmu-v3_default.px4 image loaded on Black cube doesn’t.

px4_sitl looks good:

pxh> ai_vtol_att_control start
pxh> ai_vtol_att_control status
INFO  [ai_vtol_att_control] Running
vtol_att_control: cycle: 3898 events, 0us elapsed, 0.00us avg, min 0us max 0us 0.000us rms
pxh>
pxh> listener fake_vtol_vehicle_status

TOPIC: fake_vtol_vehicle_status
 vtol_vehicle_status_s
	timestamp: 105384000  (0.000000 seconds ago)
	vtol_in_rw_mode: True
	vtol_in_trans_mode: False
	in_transition_to_fw: False
	vtol_transition_failsafe: False
	fw_permanent_stab: False
pxh>

px4_fmu-v3 has the external module, but it doesn’t get cycles and never publishes (WorkItem::Run impl is what would publish):
Screenshot 2021-01-04 180024

Can anyone suggest why the difference between sitl and hitl?

(Unfortunately, I have not succeeded in using gdb/JTAG, yet…)

This can be marked resolved as user error. The sitl config works simply because the system reaches the state in which attitude control became active. The hitl config was in an early state where the neither upstream module was actively publishing any data for the for my subscriber to process.

Thanks for updating us with your progress. You can also try work_queue status to see what’s running.

1 Like