3.1 HITL PX4 - terrytaylorbonn/auxdrone GitHub Wiki
Part 3 is HITL (hardware in the loop) simulation (part 1 was total sim (connections were TDP, UDP, USB, etc) and part 2 was AI algorithms).
This Part 3 section 3-1 for PX4 firmware (I am using Pixhawk 6c). The focus is on
- jMAVsim flight testing (emulation of the missing copter HW)
- while (from #1-4) increasing the amount of real HW (without actual building the copter (that's part 4)
This page summarizes main test stages (latest first) (this is my own conceptual approach... I could very well be mistaken in my assumptions):
-
#4 Final HITL test using the max possible of
- Real HW
- Flight ready wiring
-
#3 Flight ready wiring. Finding how to flight-ready conect HW components (also explore Win11, Ubuntu test connections). I am new to this, so its messy learning experience :) .
-
#2 Jetson Nano Object recognition sends land command to Pixhawk 6c FC. To #1 add Nano + camera. Nano object_recognizes a person (me), then (via UDP) using Pymavlink sends Mavlink command to force land the copter.
-
#1 HITL on PX4 (firmware) / Pixhawk 6C (hardware) using jMavSim + QGC. Ubuntu runs copter frame + world sim with real 6c (FC). Ubuntu connected to 6c via USB. Shown in the following diagram.
The #4 goal is sim flight testing using HW2 (the battery + power distribution (PD) module (part of the copter frame kit)). At this point (24.0320), much of this is a guess. But I think something like following diagram. See doc 3.1-4_hitl1_px4_nano-6c_final_testing_v01_24.0320.docx.
Determine actual flight wiring that works. And test. This is turning out to be more difficult than I thought. All I have gotten working so far between the Nano and 6c is [ Nano dev kit USB <> 6c USB TTL port (on front of device) ]. See section "7.4b nano usb <> 6c usb ttl W/ Generic USB (WORKS!!) 24.0318" in doc 3.1-3_hitl1_px4_nano-6c_connection_v15_24.0320.docx.
Verify that Nano/camera object recognition and Pymavlink flight commands (Mavlink) work.
For details and notes see 3.1-2_hitl1_px4_nano+camera+objrecog_vxx_24.xxxx.docx.
HITL + jMAVsim work on my new Pixhawk 6c! For details and notes see 3.1_hitl1_px4_v06_24.0306.docx.
https://discuss.ardupilot.org/t/pixhawk-led-definitions/1139/3
The LEDs are
FMU PWR = Flight management Unit Power FMU B/E = FMU Processor in Bootloader mode (flashing) or Error (Steady)
I/O PWR = Input/ Output Power I/O B/E = I/O processor in Bootloader mode (flashing) or Error (Steady)
ACT = Activity (a flashing heartbeat) indicating everything is ok
I’ll get that added to the documentation
https://docs.px4.io/main/en/assembly/quick_start_pixhawk6c.html
https://docs.px4.io/main/en/assembly/quick_start_pixhawk6c.html
https://docs.px4.io/main/en/airframes/airframe_reference.html
https://ardupilot.org/copter/docs/advanced-pixhawk-quadcopter-wiring-chart.html
https://ardupilot.org/copter/docs/common-telemetry-port-setup.html
https://holybro.com/products/pixhawk-6c
https://docs.holybro.com/autopilot/pixhawk-6c
https://docs.holybro.com/autopilot/pixhawk-6c/sample-wiring-diagram
https://docs.holybro.com/autopilot/pixhawk-6c/download (Pixhawk 6C CAD 3D File)