Blog (old) - terrytaylorbonn/auxdrone GitHub Wiki
24.0730
24.0617-0618 endless problems getting py script to recognize port AND get heartbeat (finally got a hack to work)
https://discuss.px4.io/t/pymavlink-script-not-getting-heartbeat-from-pixhawk-6c-sometimes/39261
24.0616 16:30 Will this brick fly? :)
24.0616 09:00 Look for solution in Matlab??
Custom MavLink Packets with Simulink + Connect Multiple instances of Drones to QGroundControl
what i really need is to know what qgc is doing to always get heartbeat. this video shows how to create a simulated drone and setup the heartbeat.
@13:30 He sets up heartbeat emission
@17:30 he is running the sim against qgc. i think the heartbeat part is in the red box.
what i want is to open his example code, and see what matlab generates for the heartbeat. but need to beg for a trial license extension for matlab (again). :) this is why i added months ago section 3.3 HITL Matlab.. i think much of the code for this stuff in px4 was generated in matlab (seems like much of the px4 software was generated.. it has that "generated" look and feel). need to study this in more detail eventually... this is the key (i think) to creating customized FC firmware (bloggers like to boast about creating their custom firmware, but never get into the details).
24.0615 progress on heartbeat problem
Seems like getting a heartbeat error. I posted in px4 forum about this.
figured out how to "coax" this to work after a lot of testing on this. Word file for details (with screenshots; see the two chapters “0615 …” for details of pixhawk 6c <> jnano object recognition tests) E3-7.2.1b_jnano_pix6c_pymavlink_tests_v04_24.0609_0615 @ E3-7 AI basic examples (2c) - Google Drive
setup
ethernet adapter / telem3
i ordered this ... thought about connecting via ethernet.. maybe try later.. been wanting to set this up and try.
If this does not work, them maybe try to start from 0... reinstall PX4. clean.
24.0614 evening QGC running on Jnano, receiving (not sending) mavlink
QGC can receive via holybro telem radio link from jnano. Have not figured out how to send (is it possible) using py script via qgc? That functionality once existed i think, but now gone.
See flatpak_install_v02_24.0615
24.0613,0614 morning Rabbit holes, rabbit holes....
Just when i thought i had it all completed... PX4 throws me a curve ball.
The link between JNano and 6c were working fine on 24.0609 (see jnano_pix6c_pymavlink_tests_v03_24.0609.docx),
but on 0613 did not work. Tried everything for 2 days... no luck.
Cant get a heartbeat from Jnano on ttl-usb or telem2, telem3. tried different connectors. tried various settings in mavlink (screenshot: win11 qgc via tele radio).
also tried using pi5. same problem.. no heartbeat. used various cables, usb, ftdi adapters. no luck.
24.0612 Nano seems to work on (slim phone) battery power
@ ~3-4 meters, ~11 fps (good enough for flight test)
24.0610 Nano recognizes person and modifies PX4 flight mode
win11: mode = stabilize (link via wireless telem)
nano camera (920s) recognizes person (at ~22 frames/sec @ 1080x720 (!) :)
nano changes the FC mode to land (screenshot from win11: mode = land)
setup (could use RC to change modes, start a flight mission (no props, but motors spin), etc)
Now need to
- 3 Figure out how to power Jnano (own battery or split from drone battery?)
- 4 start up procedure
then plan to test (very simple test)
- 1 copter flies simple mission.
- 2 I walk in front of camera, jnano recognizes me, and commands copter to land
24.0610 tt16 try HITL w/ pymavlink (failed)
trying hitl with jnano object recog + pymavlink changing the flight mode to land. so many problems...
- 1 i was trying to run mavproxy while running the pymavlink. i think thats a no no. did not realize it until late.
- 2 thats caused because i was using both usb ports (top and side)... and internally apparently these use same hardware.
- 3 hitl requires the usb, and the usb (ttl) is the only reliable connection i have so far.
- 4 so i need to find an other way to connect. (telem2, etc).
- 5 or just go to SITL (which is probably good enough).
24.0609 Object detection using Jetson Nano + logitech 920s camera
person detected at 22 fps :)
24.0609 Switching pixhawk flight modes via pymavlink program on JNano
Switch between RTL and land works.
Now need to
- 1 add 920s camera to jnano (did this before).. or picam? (920s is usb connection.. simpler, good quality, but at distance?)
- 2 Add obj recog to Jnano (did this months ago)
- 3 Figure out how to power Jnano (own battery or split from drone battery?)
- 4 start up procedure
then plan to test (very simple test)
- 0 HITL test? (jmavsim... done this before)
- 1 copter flies simple mission.
- 2 I walk in front of camera, jnano recognizes me, and commands copter to land
mavlink links
do with mavsdk in future?
Flawless first mission flight test for PX4 X500
24.0607Strange feeling after all the problems with the FPV drone :) .
Video of mission plan flight (I flicked a switched and the copter did the rest by itself
Flawless (no crashes) maiden flight for PX4 X500
24.0606Making stupid mistakes with cheap FPV and then training on Liftoff simulator paid off. :)
Video of loiter/hold + land in wind.
New wiki page about how to setup PI5/JNano for PX4 X500
24.060624.0605 Pixhawk 6c drone (not touched in a month) still works :)
this works:
- motor test spin
- take outside and get a gps lock
- rc inputs
See
seems like everything need for test flight. but..
- but need to add legs.
rain today.. first attempt flight maybe tomorrow.
24.0605 FPV drone is shot
tested this morning.. one motor messed up, flipped over and hit (wet) dirt. This will take some time to fix. time to switch to Pixhawk 6c drone.
24.0604 The laughably bad quality of the INAV mission implementation
1a.5 Flight 5 (missions / flight modes)
24.0604 Simulation with Liftoff
Click Simulation video to see how I recommend to any beginner to train on Liftoff simulator. For more info see FPV simulators.
video of last part of RTH): Failsafe, Angle and RTH modes work
24.0603 drone flies good (phoneTraining with the simulator + working angle mode made it much more relaxing flying (under control).
MODES tested:
- 1 Beep OK
- 2 Failsafe (land) OK
- 3 Nav poshold.. seemed to start rocketing into space again.. FAILED?
- 4 NAV RTH (return to home) OK
- 5 Angle OK (Great)
- 6 Nav WP (waypoints, mission) TOMORROW.. not enough battery and gps blinking strange... will try mission tomorrow.
VTX tx wire came loose.. cheap wires (SBEE wires)
24.0603 speedybee junk vtx
24.0602 was able to set zeus vtx band/channels using rc (1) switch, (2) lua, (3) sticks
1a.3b-Smart-audio#setting-levels-band--works-240602-using-tx12-lua-and-switch
switch
lua
sticks
X Special projects 24.0602
24.0602 Added a new part to this wiki:Right now only contains 2 sections:
- X.6 Stealth (wired comms). The idea is to have a drone that makes no wireless comm emissions.
- X.2 ESP32 Radar. Not sure about this.. Just discovered today. Seems to be a way to discover those (uavs) around you if they have the same equipment? Or is it like real radar?
24.0601 Cheapo VTX works! (I bought it to verify my SBee VTX failed)
INAV mission flight (not this weekend... bad weather)
24.0601 Getting ready to test24.0601 I finally started honing drone flying skills on a simulator
Liftoff was $20 very well spent. See FPV-simulators.
INAV xplane HITL only works for plane (not copter)
24.053124.0531
Why INAV climbs rapidly in Altitude Hold mode?. This video explains why in one of my first flights when I took off the copter shot up into the sky, straight up?? There is an error in the flight algorigthms in INAV?
24.0530
24.0529 successful several-minute flights, several crashes, copter still works
(details)
i am starting to appreciate how flying an FPV is like learning to drive a car. when i first learned to drive, i could not keep the car going straight, was constantly correctly the steering wheel. braking was a challenge. i hated it... moving a ton of steel down the road at 100 km/h was not fun. but after a while you subconciously learn to make inputs that smooth out movements.
same with flying a drone. except
- you are in air (more complex)
- crashing wont kill you (if the copter does not crash into you)
crashed several times.. battery thrown off, 2-3 zipties broken that held it in place. but the copter still works. impressive. today was the first day i could hold it in the air for a few minutes and move around.. just now starting to get used to the sticks. just like when i first started drive a car. i have now learned respect for the skills of good copter pilots. amazing that these aspects for first pilots are never discussed by the experts.
24.0527 Ready for flight test with new carbon frame
(I added a piece of plywood down the middle to mount the GPS and RX on (so that its not so crowded). For flight 2 (outside).
shopping list posted.
24.0524 First fairly useful version of the7a Tech overviews).
24.0521 Added my first tech overview (These tech overviews will explain tech concepts behind major copter subsystems that the experts never explain (or problems/issues they conveniently ignore when telling you how easy things are).
24.0520 SBee/INAV first (outdoor, untethered) flight is a success!
Part 7 Config files.
24.0515 Created pageDescribes types of config files that will be stored on the gdrive. These files are the critical result of configurations, but for some reason the experts rarely talk about them. File types include .hex, .bin, .yml, .etx, .txt.
The AI part
24.0514 Updatedwith a unique definition of AI for the the ZiptieAI project.
24.05 Started to build/modify/understand the messaging chain for PX4 drone
(goal is, among other things, "stealth" drone (all comms over wire, no wireless xmissions... see 5.6 Stealth (wired comms))):
- 24.0511 Built edgtx (rc firmware). Goal is to understand how RC comms with FC (via Rx). See 5.5 PA5 RxTx dev.
- 24.0505 Ran my first px4 mod. Tested on Pixhawk 6c. See 5.2 FC FW dev.
- 24.05 Built PX4 (firmware). Tested on Pixhawk 6c. See 4b.4 PB4 Firmware build.
24.04-05 Built and kitchen flight tested my 2 test platforms:
-
24.0507 Installed INAV on SpeedyBee F405 and completed "kitchen table flight test". See 4a.5 SpeedyBee F405v3 config.
-
24.0415 Installed Betaflight (BF) on SpeedyBee F405 and completed "kitchen table flight test" (my very first build). See 4a.5 SpeedyBee F405v3 config.
- 24.0422 Installed PX4 on Pixhawk 6c and completed "kitchen table flight test". See 4b.5 Pixhawk 6c config.
24.0622 mission test #2
download from vehicle
{ "fileType": "Plan", "geoFence": { "circles": [ ], "polygons": [ ], "version": 2 }, "groundStation": "QGroundControl", "mission": { "cruiseSpeed": 15, "firmwareType": 12, "globalPlanAltitudeMode": 1, "hoverSpeed": 5, "items": [ { "autoContinue": true, "command": 178, "doJumpId": 1, "frame": 2, "params": [ 1, 1.34112, -1, 0, 0, 0, 0 ], "type": "SimpleItem" }, { "AMSLAltAboveTerrain": null, "Altitude": 3.07848, "AltitudeMode": 1, "autoContinue": true, "command": 22, "doJumpId": 2, "frame": 3, "params": [ 0, 0, 0, null, 39.2906189, -85.21254549999999, 3.07848 ], "type": "SimpleItem" }, { "AMSLAltAboveTerrain": null, "Altitude": 3.1089599999999997, "AltitudeMode": 1, "autoContinue": true, "command": 16, "doJumpId": 3, "frame": 3, "params": [ 5, 0, 0, null, 39.290677441725286, -85.21242845493745, 3.1089599999999997 ], "type": "SimpleItem" }, { "autoContinue": true, "command": 178, "doJumpId": 4, "frame": 2, "params": [ 1, 1.430528, -1, 0, 0, 0, 0 ], "type": "SimpleItem" }, { "AMSLAltAboveTerrain": null, "Altitude": 3.1394400000000005, "AltitudeMode": 1, "autoContinue": true, "command": 16, "doJumpId": 5, "frame": 3, "params": [ 5, 0, 0, null, 39.29051529181098, -85.2124325814585, 3.1394400000000005 ], "type": "SimpleItem" }, { "autoContinue": true, "command": 178, "doJumpId": 6, "frame": 2, "params": [ 1, 1.4752319999999999, -1, 0, 0, 0, 0 ], "type": "SimpleItem" }, { "AMSLAltAboveTerrain": null, "Altitude": 0, "AltitudeMode": 1, "autoContinue": true, "command": 21, "doJumpId": 7, "frame": 3, "params": [ 0, 0, 0, null, 39.290568, -85.2125471, 0 ], "type": "SimpleItem" } ], "plannedHomePosition": [ 39.29059337396191, -85.21254665630224, 297 ], "vehicleType": 2, "version": 2 }, "rallyPoints": { "points": [ ], "version": 2 }, "version": 1 }
24.0621 mission test new
mission start
takeoff
waypoint (3)
waypoint (5)
land
mission_new_7-8ft_24.0621_1439.plan
{ "fileType": "Plan", "geoFence": { "circles": [ ], "polygons": [ ], "version": 2 }, "groundStation": "QGroundControl", "mission": { "cruiseSpeed": 15, "firmwareType": 12, "globalPlanAltitudeMode": 1, "hoverSpeed": 5, "items": [ { "autoContinue": true, "command": 178, "doJumpId": 1, "frame": 2, "params": [ 1, 2.2352, -1, 0, 0, 0, 0 ], "type": "SimpleItem" }, { "AMSLAltAboveTerrain": null, "Altitude": 2.16408, "AltitudeMode": 1, "autoContinue": true, "command": 22, "doJumpId": 2, "frame": 3, "params": [ 0, 0, 0, null, 39.290618958778154, -85.21254559958125, 2.16408 ], "type": "SimpleItem" }, { "AMSLAltAboveTerrain": null, "Altitude": 2.49936, "AltitudeMode": 1, "autoContinue": true, "command": 16, "doJumpId": 3, "frame": 3, "params": [ 2, 0, 0, null, 39.290644090845596, -85.21245626221605, 2.49936 ], "type": "SimpleItem" }, { "autoContinue": true, "command": 178, "doJumpId": 4, "frame": 2, "params": [ 1, 2.3246080000000005, -1, 0, 0, 0, 0 ], "type": "SimpleItem" }, { "AMSLAltAboveTerrain": null, "Altitude": 2.5298400000000005, "AltitudeMode": 1, "autoContinue": true, "command": 16, "doJumpId": 5, "frame": 3, "params": [ 3, 0, 0, null, 39.29053454640151, -85.21245748652615, 2.5298400000000005 ], "type": "SimpleItem" }, { "autoContinue": true, "command": 178, "doJumpId": 6, "frame": 2, "params": [ 1, 2.369312, -1, 0, 0, 0, 0 ], "type": "SimpleItem" }, { "AMSLAltAboveTerrain": null, "Altitude": 0, "AltitudeMode": 1, "autoContinue": true, "command": 21, "doJumpId": 7, "frame": 3, "params": [ 0, 0, 0, null, 39.29056800942455, -85.21254710190264, 0 ], "type": "SimpleItem" } ], "plannedHomePosition": [ 39.290618958778154, -85.21254559958125, null ], "vehicleType": 2, "version": 2 }, "rallyPoints": { "points": [ ], "version": 2 }, "version": 1 }
24.0621 mission test old
uploaded
mission_24.0607_1838pm.plan
{ "fileType": "Plan", "geoFence": { "circles": [ ], "polygons": [ ], "version": 2 }, "groundStation": "QGroundControl", "mission": { "cruiseSpeed": 15, "firmwareType": 12, "globalPlanAltitudeMode": 1, "hoverSpeed": 5, "items": [ { "autoContinue": true, "command": 530, "doJumpId": 1, "frame": 2, "params": [ 0, 2, null, null, null, null, null ], "type": "SimpleItem" }, { "autoContinue": true, "command": 178, "doJumpId": 2, "frame": 2, "params": [ 1, 5, -1, 0, 0, 0, 0 ], "type": "SimpleItem" }, { "AMSLAltAboveTerrain": null, "Altitude": 3.0510480403900146, "AltitudeMode": 1, "autoContinue": true, "command": 22, "doJumpId": 3, "frame": 3, "params": [ 0, 0, 0, null, 39.2906012, -85.212526, 3.0510480403900146 ], "type": "SimpleItem" }, { "AMSLAltAboveTerrain": null, "Altitude": 3.060192108154297, "AltitudeMode": 1, "autoContinue": true, "command": 16, "doJumpId": 4, "frame": 3, "params": [ 4, 0, 0, null, 39.290656299999995, -85.2124032, 3.060192108154297 ], "type": "SimpleItem" }, { "autoContinue": true, "command": 178, "doJumpId": 5, "frame": 2, "params": [ 1, 2.414016008377075, -1, 0, 0, 0, 0 ], "type": "SimpleItem" }, { "AMSLAltAboveTerrain": null, "Altitude": 3.0662879943847656, "AltitudeMode": 1, "autoContinue": true, "command": 16, "doJumpId": 6, "frame": 3, "params": [ 6, 0, 0, null, 39.2904809, -85.2124006, 3.0662879943847656 ], "type": "SimpleItem" }, { "autoContinue": true, "command": 178, "doJumpId": 7, "frame": 2, "params": [ 1, 2.5034239292144775, -1, 0, 0, 0, 0 ], "type": "SimpleItem" }, { "AMSLAltAboveTerrain": null, "Altitude": 0, "AltitudeMode": 1, "autoContinue": true, "command": 21, "doJumpId": 8, "frame": 3, "params": [ 0, 0, 0, null, 39.2905595, -85.21252319999999, 0 ], "type": "SimpleItem" }, { "autoContinue": true, "command": 20, "doJumpId": 9, "frame": 2, "params": [ 0, 0, 0, 0, 0, 0, 0 ], "type": "SimpleItem" } ], "plannedHomePosition": [ 39.29087099617688, -85.212526, 297 ], "vehicleType": 2, "version": 2 }, "rallyPoints": { "points": [ ], "version": 2 }, "version": 1 }