maj-personal-repos / dji-sdk-python Goto Github PK
View Code? Open in Web Editor NEWDJI SDK python interface
License: GNU General Public License v3.0
DJI SDK python interface
License: GNU General Public License v3.0
Hello,
I am using M600 (with A3) DJI Drone. I have been able to control the drone using the Onboad DJI ROS packages. Now, I am interested to develop python codes using the Onboard SDK (C++ Wrapper).
For that, I have installed these packages, as per the instruction given. But I do not know which launch files are to be run for a demo flight. Could someone help, please?
Thanks in advance.
i treied to djisdk_sample.py serial and all connected ,able to arm,disarm but take off is not working.
Error message:-The flight controller has return unknown error,please try again or reboot entire system.
Cloned the repo on 15 Oct 2020. The Github webpage lists the most recent changes as 3 years ago; however, gitk
shows that development continues almost daily. That's a good sign.
I followed the instructions in the README for installing dependencies; however, I installed the Python3 versions of the packages instead. Python2 is dead; long live Python3.
Here's where I started having problems.
Trying to run the command python3 setup.py build_ext -i
resulted in the expected issues with the Python2 print
statement. I edited the print statements in djisdk-sample.py
and setup.py
and tried it again.
Trying to run the command python3 setup.py build_ext -i
a second time got this far:
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c /tmp/tmp3xlafavu.cpp -o tmp/tmp3xlafavu.o -fvisibility=hidden
building 'djisdkpy' extension
Traceback (most recent call last):
File "setup.py", line 123, in <module>
setup(
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 87, in run
_build_ext.run(self)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "setup.py", line 121, in build_extensions
build_ext.build_extensions(self)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 208, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/usr/lib/python3.8/distutils/ccompiler.py", line 565, in compile
self._setup_compile(output_dir, macros, include_dirs, sources,
File "/usr/lib/python3.8/distutils/ccompiler.py", line 341, in _setup_compile
pp_opts = gen_preprocess_options(macros, incdirs)
File "/usr/lib/python3.8/distutils/ccompiler.py", line 1076, in gen_preprocess_options
pp_opts.append("-I%s" % dir)
File "setup.py", line 23, in __str__
return pybind11.get_include(self.user)
AttributeError: module 'pybind11' has no attribute 'get_include'
I grepped the pybind11
directory and found get_include
in the file pybind11\pybind11\__init__.py
. I don't know why setup.py can't find it.
According to gitk, I'm using the master branch. I tried to checkout branch v2.5, and it wouldn't let me:
$ git checkout v2.5
error: pathspec 'v2.5' did not match any file(s) known to git.
$ git fetch
$ git checkout v2.5
error: pathspec 'v2.5' did not match any file(s) known to git.
$ git checkout stable
error: pathspec 'stable' did not match any file(s) known to git.
I'm doing something wrong, but I don't know what it is. Does it all stem from trying to use Python3 instead of Python2?
Hello,
I'm using a phantom 4. I have been trying to connect with your SDK but it throws the error "ValidateSerialDevice, line 125: Failed to read from serial device. The onboard device is not communicating with your drone"
The RC does not have the mode F, it only have "P", "S" and "A". Could someone help, please?
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.