Skip to content

3.1 HITL PX4

terrytaylorbonn edited this page May 13, 2024 · 2 revisions

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).

Gdrive

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.

    image

#4 Final sim test (only a 1 page draft doc for now)

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.

image

#3 Flight ready wiring for HW1 (24.0318)

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.

image

#2 Jetson Nano Object recognition sends land command to Pixhawk 6c FC (24.0315)

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.

image

#1 HITL on PX4 (firmware) / Pixhawk 6C (hardware) using jMavSim + QGC (24.0306)

HITL + jMAVsim work on my new Pixhawk 6c! For details and notes see 3.1_hitl1_px4_v06_24.0306.docx.

image



NOTES ===================================

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

PX4

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

Ardupilot

https://ardupilot.org/copter/docs/advanced-pixhawk-quadcopter-wiring-chart.html

https://ardupilot.org/copter/docs/common-telemetry-port-setup.html

image

Holybro

https://holybro.com/products/pixhawk-6c

https://docs.holybro.com/autopilot/pixhawk-6c

image

https://docs.holybro.com/autopilot/pixhawk-6c/sample-wiring-diagram

https://docs.holybro.com/autopilot/pixhawk-6c/download (Pixhawk 6C CAD 3D File)


https://www.reddit.com/r/diydrones/comments/11e11um/how_do_i_connect_the_receiver_airspeed_sensor_and/

Home

Getting into the air ASAP

(0) Reference


EPIC 1 - Build/fly FPV drone

(1) FPV simulators (inav notes 0608)

(2) SBeeF405/INAV (1a)

(3) SBeeF405/BF (1b)

(4) SBeeF405/AP (1c)


EPIC 2 - Build/fly Pixhawk drone

(5) Pix6c/PX4 (2a)

(6) Pix6c/AP (2b)


EPIC 3 - Add AI to Pixhawk drone

(7) AI JNano (7.2)

(8) AI PI5 (7.1) (TODO)


EPIC 4 – Advanced AI

(9) FC HITL (frame+world sim)

(11) FC FW Mavlink API (via CC/GCS APIs) (5.3)

(12) ROS (+ROSMAV)

(13) CC AI (+ Mavlink) (2)

(10) (skip) SITL (total sim) (1)


EPIC 5 – Advanced platforms

(14) Firmware dev (5)

(14b) Matlab (added 24.0625)

(15) Mission platforms (6b)

(16) Special projects (5.6,5.5)



Clone this wiki locally