Git Product home page Git Product logo

Comments (19)

julianoes avatar julianoes commented on July 19, 2024 1
# pip install --user -r requirements.txt -r requirements-dev.txt -r requirements-test.txt

This needs to be in the README if it's the suggested way of doing it. Please please update the README.

from mavsdk-python.

julianoes avatar julianoes commented on July 19, 2024 1

Hm, yes works fine on Arch Linux. The run_protoc.sh output is different on macOS, I'll check that on Monday.

from mavsdk-python.

JonasVautherin avatar JonasVautherin commented on July 19, 2024

Which version of Python do you have?

from mavsdk-python.

julianoes avatar julianoes commented on July 19, 2024

it's Python 3.7.

from mavsdk-python.

xvzf avatar xvzf commented on July 19, 2024

I think the issue is that dcsdkgen is not in your PATH even though it is installed! You could try to add /Users/julianoes/Library/Python/3.7/bin to your PATH and should be good to go!

from mavsdk-python.

xvzf avatar xvzf commented on July 19, 2024

Another quick note, you can go for

# pip install --user -r requirements.txt -r requirements-dev.txt -r requirements-test.txt

instead of installing each dependency!

from mavsdk-python.

xvzf avatar xvzf commented on July 19, 2024

I'll add that later!

Is this issue resolved? Then I'll mark it as closed with the PR updating the Readme!

from mavsdk-python.

julianoes avatar julianoes commented on July 19, 2024

Ok, adding the path and installing all the requirements (with pip3, not pip) made the run_protoc.sh run through.

from mavsdk-python.

julianoes avatar julianoes commented on July 19, 2024

Then I did:

pip3 install --user -e .

and then got as far as:

python3 examples/takeoff_and_land.py
Traceback (most recent call last):
  File "examples/takeoff_and_land.py", line 3, in <module>
    from dronecode_sdk import connect as dronecode_sdk_connect
  File "/Users/julianoes/src/DronecodeSDK-Python/dronecode_sdk/__init__.py", line 38, in <module>
    from .plugins import *
  File "/Users/julianoes/src/DronecodeSDK-Python/dronecode_sdk/plugins/__init__.py", line 3, in <module>
    from .gimbal import *
  File "/Users/julianoes/src/DronecodeSDK-Python/dronecode_sdk/plugins/gimbal.py", line 3, in <module>
    from ..generated import gimbal_pb2, gimbal_pb2_grpc
  File "/Users/julianoes/src/DronecodeSDK-Python/dronecode_sdk/generated/gimbal_pb2_grpc.py", line 4, in <module>
    import gimbal_pb2 as gimbal__pb2
ModuleNotFoundError: No module named 'gimbal_pb2'

from mavsdk-python.

xvzf avatar xvzf commented on July 19, 2024

Can you post a dump of tree? This seems pretty strange to me and I cannot reproduce it

from mavsdk-python.

julianoes avatar julianoes commented on July 19, 2024
tree
.
├── README.rst
├── docs
│   └── TODO.md
├── dronecode_sdk
│   ├── __init__.py
│   ├── __pycache__
│   │   ├── __init__.cpython-37.pyc
│   │   ├── _base.cpython-37.pyc
│   │   └── async_plugin_manager.cpython-37.pyc
│   ├── _base.py
│   ├── async_plugin_manager.py
│   ├── generated
│   │   ├── __init__.py
│   │   ├── __pycache__
│   │   │   ├── __init__.cpython-37.pyc
│   │   │   ├── gimbal_pb2.cpython-37.pyc
│   │   │   └── gimbal_pb2_grpc.cpython-37.pyc
│   │   ├── action_pb2.py
│   │   ├── action_pb2_grpc.py
│   │   ├── calibration_pb2.py
│   │   ├── calibration_pb2_grpc.py
│   │   ├── camera_pb2.py
│   │   ├── camera_pb2_grpc.py
│   │   ├── core_pb2.py
│   │   ├── core_pb2_grpc.py
│   │   ├── discovery_pb2.py
│   │   ├── discovery_pb2_grpc.py
│   │   ├── gimbal_pb2.py
│   │   ├── gimbal_pb2_grpc.py
│   │   ├── mission_pb2.py
│   │   ├── mission_pb2_grpc.py
│   │   ├── telemetry_pb2.py
│   │   └── telemetry_pb2_grpc.py
│   └── plugins
│       ├── __init__.py
│       ├── __pycache__
│       │   ├── __init__.cpython-37.pyc
│       │   └── gimbal.cpython-37.pyc
│       ├── action.py
│       ├── calibration.py
│       ├── camera.py
│       ├── core.py
│       ├── discovery.py
│       ├── gimbal.py
│       ├── mission.py
│       └── telemetry.py
├── dronecode_sdk.egg-info
│   ├── PKG-INFO
│   ├── SOURCES.txt
│   ├── dependency_links.txt
│   ├── requires.txt
│   └── top_level.txt
├── examples
│   ├── takeoff_and_land.py
│   ├── telemetry_flight_mode.py
│   ├── telemetry_is_armed_is_in_air.py
│   └── telemetry_takeoff_and_land.py
├── other
│   ├── docker
│   │   └── testing
│   │       ├── Dockerfile
│   │       ├── build_python.sh
│   │       └── test.sh
│   ├── templates
│   │   ├── call.j2
│   │   ├── enum.j2
│   │   ├── file.j2
│   │   ├── request.j2
│   │   ├── stream.j2
│   │   └── struct.j2
│   └── tools
│       ├── run_protoc.sh
│       └── run_tests.sh
├── output.txt
├── proto
│   ├── README.md
│   ├── pb_plugins
│   │   ├── README.rst
│   │   ├── dcsdkgen
│   │   │   ├── __init__.py
│   │   │   ├── __main__.py
│   │   │   ├── autogen.py
│   │   │   ├── autogen_file.py
│   │   │   ├── enum.py
│   │   │   ├── methods.py
│   │   │   ├── name_parser.py
│   │   │   ├── struct.py
│   │   │   ├── type_info.py
│   │   │   └── utils.py
│   │   ├── requirements.txt
│   │   └── setup.py
│   └── protos
│       ├── action
│       │   └── action.proto
│       ├── calibration
│       │   └── calibration.proto
│       ├── camera
│       │   └── camera.proto
│       ├── core
│       │   └── core.proto
│       ├── discovery
│       │   └── discovery.proto
│       ├── gimbal
│       │   └── gimbal.proto
│       ├── mission
│       │   └── mission.proto
│       └── telemetry
│           └── telemetry.proto
├── requirements-dev.txt
├── requirements-test.txt
├── requirements.txt
├── setup.cfg
├── setup.py
├── tests
└── tox.ini

from mavsdk-python.

xvzf avatar xvzf commented on July 19, 2024

The files are there.. Can you reproduce it on ubuntu or just on OSX? I can't reproduce it on my local machine

from mavsdk-python.

xvzf avatar xvzf commented on July 19, 2024

Sure!

Make sure to include a pip freeze aswell!

from mavsdk-python.

xvzf avatar xvzf commented on July 19, 2024

@mrpollo got it working a couple of weeks ago, maybe he also has an idea!

from mavsdk-python.

Huibean avatar Huibean commented on July 19, 2024

I still got empty plugins dir in my mac, Any Idea?

➜  DronecodeSDK-Python git:(master) ✗ ./other/tools/run_protoc.sh
Successfully installed dcsdkgen-0.1a0
[+] Done
[+] Generating plugins from
 -> [+] Generated protobuf and gRPC bindings for gimbal
: program not found or is not executable
--custom_out: protoc-gen-custom: Plugin failed with status code 1.
mv: rename /Users/huibean/Work/DronecodeSDK-Python/other/tools/../../dronecode_sdk/plugins/Gimbal.py to /Users/huibean/Work/DronecodeSDK-Python/other/tools/../../dronecode_sdk/plugins/gimbal.py: No such file or directory
 -> [+] Generated plugin for gimbal
 -> [+] Generated protobuf and gRPC bindings for core
: program not found or is not executable
--custom_out: protoc-gen-custom: Plugin failed with status code 1
➜  DronecodeSDK-Python git:(master) ipython3 examples/takeoff_and_land.py
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
~/Work/DronecodeSDK-Python/examples/takeoff_and_land.py in <module>()
      3 import asyncio
      4
----> 5 from dronecode_sdk import connect as dronecode_sdk_connect
      6
      7 drone = dronecode_sdk_connect(host="127.0.0.1")

~/Work/DronecodeSDK-Python/dronecode_sdk/__init__.py in <module>()
     36 # Plugins rely on the eventloop
     37 from .async_plugin_manager import AsyncPluginManager
---> 38 from .plugins import *
     39
     40

~/Work/DronecodeSDK-Python/dronecode_sdk/plugins/__init__.py in <module>()
      1 # -*- coding: utf-8 -*-
      2
----> 3 from .gimbal import *
      4 from .core import *
      5 from .calibration import *

ModuleNotFoundError: No module named 'dronecode_sdk.plugins.gimbal'```

from mavsdk-python.

JonasVautherin avatar JonasVautherin commented on July 19, 2024

@Huibean: are you sure you cloned the git submodules?

And would you mind opening a new issue for your problem, since this one was closed already =)

from mavsdk-python.

Huibean avatar Huibean commented on July 19, 2024

@JonasVautherin yes, I have the submodule installed

from mavsdk-python.

julianoes avatar julianoes commented on July 19, 2024

@Huibean please open a new issue.

Sorry, you already did.

from mavsdk-python.

Huibean avatar Huibean commented on July 19, 2024

@julianoes yep,it is here

from mavsdk-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.