Skip to content
Discussion options

You must be logged in to vote

まずは、Aについて回答しますね。

PX4を使ったSITLのシミュレーションは、こちらの記事を参考にしてください。

https://qiita.com/kanetugu2018/items/d4a21b590950774c6cf8

次に、WSL2でMAVSDKをインストールしてください。

pip install mavsdk

こちらで確認したサンプルコードを以下に貼り付けます。

import asyncio
from mavsdk import System
from mavsdk.offboard import PositionNedYaw


async def wait_until_ready(drone):
    print("-- Waiting for drone to be ready...")
    async for health in drone.telemetry.health():
        if health.is_global_position_ok and health.is_home_position_ok:
            print("✓ Drone is ready (GPS & home position OK)")
            break
        await asyncio.sleep(1)

async def wait_until_altitude(drone, target_altitude, tolerance=0.2):
    print(f"-- Waiting to reach {t…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@tmori
Comment options

tmori Jun 9, 2025
Maintainer

Answer selected by nakada-tatsuyoshi
@tmori
Comment options

tmori Jun 9, 2025
Maintainer

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants