Pixhawk software-in-the-loop (SIL) connector for Simulink

버전 1.4.0.0 (2.48 MB) 작성자: Kiril Boychev
Simulink C++ S-function for software-in-the-loop (SIL) simulation with Pixhawk.
다운로드 수: 241
업데이트 날짜: 2023/1/14

Pixhawk SIL Connector for Simulink

Simulink C++ S-function for software-in-the-loop simulation with Pixhawk.

View Pixhawk software-in-the-loop (SIL) connector for Simulink on File Exchange

Requirements

Files

pixhawk_sil_connector.cpp

make.m

includes.zip (contains the Asio C++ and MAVLink C libraries)

Build instructions

  • Install MATLAB-supported compiler
    https://mathworks.com/support/requirements/supported-compilers.html.
  • Download the "pixhawk_sil_connector.cpp" and "make.m" files and the "includes.zip" archive.
  • Unzip the "includes.zip archive".
  • Run "make.m" to create a "pixhawk_sil_connector.mexw64" (Windows), "pixhawk_sil_connector.mexa64" (Linux), "pixhawk_sil_connector.mexmaci64" (macOS) file.

Note: If you are using a compiler other than MSVC (e.g. MinGW64) you need to add the -lws2_32 flag to the "mex" command in the "make.m" file.

Use instructions (Simulink model running in Windows, PX4 Autopilot running in WSL 2)

  • Download and install QGroundControl for Windows https://docs.qgroundcontrol.com/master/en/getting_started/download_and_install.html.

  • Create a new "Comm Link" in QGroundControl via the "Application Settings" page. The type of the link must be UDP, thed port 18570, and the server address must be the ip address of the WLS 2 instance. You can use the "ip addr" command to find the ip of the WSL 2 instance. Note that the ip of the WSL isntance will change every time you relaunch the instance.

  • Open and run "pixhawk_sil_connector_example.slx".

  • Build the PX4-Autopilot source code in WSL 2 using the following commands:

    git clone --recursive https://github.com/PX4/PX4-Autopilot
    cd PX4-Autopilot
    git checkout v1.14.0
    git submodule sync --recursive
    git submodule update --init --recursive
    export PX4_SIM_HOST_ADDR=x.x.x.x #(the ip of the computer running the Simulink model)
    make px4_sitl none_iris
    https://docs.px4.io/master/en/dev_setup/building_px4.html
    https://docs.px4.io/main/en/simulation/.

  • If you already have a build of the PX4-Autopilot source code start PX4 using the following commands:

    export PX4_SIM_HOST_ADDR=x.x.x.x #(the ip of the computer running the Simulink model)
    export PX4_SIM_MODEL=model (iris for v1.13.3 or none_iris for v1.14.0)
    ./bin/px4 -s etc/init.d-posix/rcS

Demonstration of the Pixhawk SIL connector example

Demonstration of the Pixhawk SIL connector example

Pixhawk SIL connector example

Pixhawk SIL connector example

Pixhawk SIL connector sensors

Pixhawk SIL connector example sensors

Additional information available at:

https://fst.aviumtechnologies.com/pixhawk-sil-connector

인용 양식

Kiril Boychev (2024). Pixhawk software-in-the-loop (SIL) connector for Simulink (https://github.com/aviumtechnologies/pixhawk-sil-connector/releases/tag/1.4.0), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2022a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.4.0.0

See release notes for this release on GitHub: https://github.com/aviumtechnologies/pixhawk-sil-connector/releases/tag/1.4.0

1.1.0

See release notes for this release on GitHub: https://github.com/aviumtechnologies/pixhawk-sil-connector/releases/tag/1.1.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.