Skip to content
  • 0 Votes
    2 Posts
    2k Views
    L
    UPDATE I've simplified my snippet and I'm now able to "connect" to the VOXL2 via MAVSDK. It's still now working as I would expect it to, but first, here's my new script: #!/usr/bin/env python3 import asyncio from mavsdk import System target_ip="192.168.1.187" target_port=14550 async def connect_to_drone(): print("Connecting to VOXL2...") # Create a System object with specific system ID and component ID # These match the IDs we're using in the heartbeat sender print("Creating System object...") drone = System() # Different connection string formats to try print("Connecting to drone...") await drone.connect(system_address=f"udp://{target_ip}:{target_port}") print("Waiting for drone to connect...") timeout = 60 # Extended timeout start_time = asyncio.get_event_loop().time() try: async for state in drone.core.connection_state(): print(f"Connection state: {state}") if state.is_connected: print(f"Connected to drone!") return drone # Check if we've timed out current_time = asyncio.get_event_loop().time() if current_time - start_time > timeout: print(f"Connection timed out after {timeout} seconds") break await asyncio.sleep(1) except Exception as e: print(f"Connection error: {e}") return None async def main(): # Try to connect to the drone drone = await connect_to_drone() # If connected, do something with the drone if drone and drone.core: try: # Print basic information info = await drone.info.get_version() print(f"Version Info: {info}") except Exception as e: print(f"Could not get info: {e}") if __name__ == "__main__": # Run the asyncio loop asyncio.run(main()) When I run this script I see only 3 logs: Connecting to VOXL2... Creating System object... Connecting to drone... When I adb shell and run voxl-inspect-mavlink mavlink_from_gcs I now see that the VOXL2 is receiving a heartbeat: ID Mavlink MSG Name Counter Hz 0 heartbeat 5 1.1 But like I mentioned above, the code doesn't execute past await drone.connect(system_address=f"udp://{target_ip}:{target_port}"). I've tried udpout and nothing changes.
  • 0 Votes
    3 Posts
    1k Views
    G
    edit: use mavutil.mavlink.MAVLINK_MSG_ID_LOCAL_POSITION_NED* instead of magic number 32 for message ID
  • Unknown Mavlink Messages

    VOXL 2 mavlink
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Best Method for Developping API

    VOXL SDK voxl2 px4 mavlink mavros
    3
    0 Votes
    3 Posts
    2k Views
    G
    @Eric-Katzfey thanks! I got started using mavsdk and pymavlink
  • 0 Votes
    5 Posts
    2k Views
    V
    @I_Dwyer @Chad-Sweet Hello all, has this issue been solved in and particular version, we too are facing the same issue, on HS1 the voxl-mavlink server is initiating but we are not able to see any data from this port. We are right now on the 1.5.3 build. Pls provided more info on the same.
  • 0 Votes
    13 Posts
    4k Views
    tomT
    @zkern5254 I'll see if I can get any other ideas from the team.