How do I 'connect' to a COM port when using mavlinkio 'connect' , only UDP port is documented

14 ビュー (過去 30 日間)
Philip Anderson
Philip Anderson 2022 年 7 月 7 日
回答済み: 胡虎虎 2022 年 11 月 22 日
I wish to use Matlab's MAVlink libraries to listen and talk to a robotics platform: specifically ArduBoat which links to its ground station (MIssion Planner running on a Laptop) using the MAVlink protocol over an external radio link. The radio at the laptop has a USB cable and appears as a COM port on Windows.
Matlab MAVlink libraries use mavlinkio to make the initial connection, with
but there is no documentation for connecting via Serial Port (so the software can link to the radio) rather than UDP.
Is there an exisitnig solution for this, that is, to enable Matlab to listen (and talk) to the Ardupilot / (Pixhawk hardware) family of robotic platforms
Thanks in Advance
Phil

回答 (2 件)

Jianxin Sun
Jianxin Sun 2022 年 7 月 7 日
Hi Philip,
Serial port connection is not supported out of box. You could use serialport object to exchange binary data and use mavlinkio/mavlinkdialect objects to serailize and deserialize the messages.
You can install the UAV Toolbox PX4 support package and check the "HelperPX4" function used in https://www.mathworks.com/help/supportpkg/px4/ug/launch-nsh-px4.html that implemented a serial based mavlink communication for an example.
Jianxin
  1 件のコメント
Philip Anderson
Philip Anderson 2022 年 7 月 10 日
Hello Jianxin,
Perhaps I didn't explain the issue well, as your suggestions are rather complex for a simple rrequirement. A suitable answer I received via a different route was
which is what is required. Hope this clarifies what I was searching for
Rgds
Phil

サインインしてコメントする。


胡虎虎
胡虎虎 2022 年 11 月 22 日
Did you successfully? I have had the same promble. Could you give me some guidance if you have some iders?
Thank you very much

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by