Skip to content

a little issue with protobuf #752

@najon6

Description

@najon6

Hi, I'm new to this research so please bear with me if my questions are weird or very simple.

I have drone for research with px4 and jetson nano. First I trying to get simple attitude data from drone to my laptop.
So with help from gpt, I write very simple code.

import asyncio
from mavsdk import System

async def print_attitude():
    drone = System()
    await drone.connect(system_address="udp://:14540")  # PX4와 연결 (기본 포트)

    print("connecting...")
    async for state in drone.core.connection_state():
        if state.is_connected:
            print("connected")
            break

    async for attitude in drone.telemetry.attitude_euler():
        print(f"Roll: {attitude.roll:.2f} deg, Pitch: {attitude.pitch:.2f} deg, Yaw: {attitude.yaw:.2f} deg")

async def main():
    await print_attitude()

if __name__ == "__main__":
    asyncio.run(main())

but, it gives me error message for line 2(from mavsdk import System)

importerror: cannot import name 'runtime_version' from 'google.protobuf' (/home/roh/.local/lib/python3.8/site-packages/google/protobuf/init.py)

for this error, downgrade the protobuf to 3.20.3 is the right way to fix this error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions