在自動駕駛儀中創建複雜的用戶定義的無人機行為的可用解決方案有哪些?


5

針對愛好/消費級無人機的大多數可免費獲得的,具有自動駕駛功能的飛行控制硬件和固件似乎都具有相當固定的功能集。通常存在不同程度的穩定度,位置保持/起落架模式,自動起飛和著陸,返回家園以及遵循航路點的"任務"模式,但除此之外沒有什麼。有時會有一些特殊的模式,例如熱騰騰和地形追踪。但是,所有這些都是預先編程的且不可擴展的,這意味著用戶無法(至少我找不到)來編程自己的自定義飛行邏輯,例如通過腳本。不過,我可能錯過了。

那麼,在目前可供業餘愛好者使用的任何自動駕駛解決方案中,用戶是否可以通過在現有軟件之上構建而不定義自動駕駛軟件本身的方式來定義自己的飛行邏輯?/ strong>

需要明確的是,我正在尋找一種方法來編寫主飛行控制/自動駕駛程序包的邏輯外部,可以通過自動駕駛程序固有的某種腳本引擎或作為程序運行在與自動駕駛儀平行的設備上,可以與之通信並獲得必要的飛行信息/發送命令。

2

PX4 looks like it is quite flexible, and might be what you are looking for. It might not be as user friendly as for example iNAV, but it should give you much more possibilities even if that comes at the cost of having to write more code.


1

You can program/script elaborate flight patterns and then translate it to MAVLink format mission messages either live or in pre-recorded mission mode. Then depending on your needs - you either upload your mission or send it live over telemetry connection.


3

I think your best bet would be Ardupilot. The communication protocol it uses, called MavLink, is documented and easy to use. Connect to the UART with an Arduino and you will have full control over the UAV.

There is even an Arduino library and a bunch of examples, like this forum post, of people doing exactly what you are looking to do. I did this once because I needed to grab the GPS and Compass information for a work project. You can research the various mission control programs that use MavLink to see the extent of control the protocol has. If I remember correctly you can even send direct stick commands over that interface to manually pilot the craft. This solution makes for lots of flexibility, especially when you consider the huge community writing Arduino libraries. It would be simple to add just about any sensor you could want.


0

After digging deeper on the Ardupilot website, I've found that besides MAVLink, it now supports onboard Lua scripts with full control of the aircraft that can be loaded to the flight controller's SD card.

The functionality is experimental as of now, and has been available in Copter/Rover since version 4.0 and Plane since v3.11. Further information can be found on the project's website.


2

You could consider looking for research autopilots. Researchers try new things in all levels of the autopilot, and so they need extensibility and performance more than advanced features.

From what I understand Ardupilot and PX4 are popular. My university uses ROSflight, which is nice because it interfaces with Robot Operating System, which allows for sensor and control data to get around relatively easily. Depending on the type of UAV you're using, you would run ROSplane or ROScopter on top of it to provide higher level functions. It is all highly extensible, and you can replace any of the layers of the autopilot independently. Also nice, it has a pretty good simulator so that you can try fancy stuff without crashing a real UAV. Do note that it lacks some of the higher-level features provided by other autopilots, and so you'll have to look at what you want to do to decide.