MAVSDK-Python icon indicating copy to clipboard operation
MAVSDK-Python copied to clipboard

connectivity

Open peakyquest opened this issue 1 year ago • 5 comments

#!/usr/bin/env python3

import asyncio
from mavsdk import System


async def run():
    # Connect to the drone
    drone = System()
    await drone.connect('serial://com7:57600')

# Run the asyncio loop
asyncio.run(run())

what I am doing wrong ?

peakyquest avatar Jun 20 '24 08:06 peakyquest

Are you using a Windows or Unix operating system?

ShafSpecs avatar Jun 20 '24 20:06 ShafSpecs

I am working on windows

peakyquest avatar Jun 21 '24 08:06 peakyquest

I am working on windows

On Windows, you would need to actually start mavsdk_server manually and then pass the server port to the System instantiation. I'm not near my PC atm so I can't paste a snippet

ShafSpecs avatar Jun 21 '24 15:06 ShafSpecs

Try the debugging instructions: http://mavsdk-python-docs.s3-website.eu-central-1.amazonaws.com/#debug-connection-issues

julianoes avatar Jun 22 '24 07:06 julianoes

Or check out this comment: https://github.com/mavlink/MAVSDK-Python/issues/678#issuecomment-2065319944

ShafSpecs avatar Jun 22 '24 10:06 ShafSpecs