Comments (8)
That is actually an error raised by the SDK:
COMMAND_DENIED
when you calledarm()
. You couldtry... catch
aroundarm()
and do something when this error is raised.So it seems like it is working: the drone (here Gazebo) is just refusing to arm for some reason (not ready?) :-). What does the
telemetry.py
example say?
I actually don't know why, but it works fine today :)
@efischer91: Are you sure you installed it with
pip3.6
, by the way?
Definitely. Everything's working fine now. Thank you!
from mavsdk-python.
/home/eve/.local/lib/python3.5
You are on Ubuntu 16.04, I presume? You will need Python3.6+, and it seems to me that you have Python3.5.
from mavsdk-python.
You are on Ubuntu 16.04, I presume? You will need Python3.6+, and it seems to me that you have Python3.5.
I'm on Ubuntu 16.04 and have both Python 3.5.2 since it's the pre-installed version and 3.6.7
from mavsdk-python.
./other/tools/run_protoc.sh
is running python3
, which in your case defaults to 3.5. Can you try to edit all occurences of python3
and pip3
in proto.sh
?
python3 -> python3.6
pip3 -> pip3.6
from mavsdk-python.
This helped with running the shell script, thanks! Now, the next problem is that none of the examples seem to work:
eve@eve-ThinkPad-X1-Carbon-3rd:~/Downloads/DronecodeSDK-Python$ python3.6 examples/takeoff_and_land.py
-- Arming
Traceback (most recent call last):
File "examples/takeoff_and_land.py", line 25, in <module>
loop.run_until_complete(run())
File "/usr/lib/python3.6/asyncio/base_events.py", line 473, in run_until_complete
return future.result()
File "examples/takeoff_and_land.py", line 13, in run
await drone.action.arm()
File "/home/eve/Downloads/DronecodeSDK-Python/dronecode_sdk/plugins/action.py", line 167, in arm
raise ActionError(result, "arm()")
dronecode_sdk.plugins.action.ActionError: COMMAND_DENIED: 'Command denied'; origin: arm(); params: ()
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "examples/takeoff_and_land.py", line 25, in <module>
loop.run_until_complete(run())
File "/usr/lib/python3.6/asyncio/base_events.py", line 473, in run_until_complete
return future.result()
File "examples/takeoff_and_land.py", line 13, in run
await drone.action.arm()
File "/home/eve/Downloads/DronecodeSDK-Python/dronecode_sdk/plugins/action.py", line 167, in arm
raise ActionError(result, "arm()")
dronecode_sdk.plugins.action.ActionError: COMMAND_DENIED: 'Command denied'; origin: arm(); params: ()
Gazebo simulation is running, backend is running as well. Examples unfortunately don't, even though I did install python3-apt.
from mavsdk-python.
dronecode_sdk.plugins.action.ActionError: COMMAND_DENIED: 'Command denied'; origin: arm(); params: ()
That is actually an error raised by the SDK: COMMAND_DENIED
when you called arm()
. You could try... catch
around arm()
and do something when this error is raised.
So it seems like it is working: the drone (here Gazebo) is just refusing to arm for some reason (not ready?) :-). What does the telemetry.py
example say?
from mavsdk-python.
@JonasVautherin what's this about?
ModuleNotFoundError: No module named 'apt_pkg'
from mavsdk-python.
No clue 😅.
Examples unfortunately don't, even though I did install python3-apt.
@efischer91: Are you sure you installed it with pip3.6
, by the way?
from mavsdk-python.
Related Issues (20)
- `aiogrpc` RuntimeError HOT 35
- Running missions in ArduPilot HOT 12
- How to use mavsdk-python to takeoff without GPS HOT 4
- How do I use `telemetry_server` correctly? HOT 4
- Analyzing log files or Distance travelled data from mavsdk python HOT 5
- Geofence crashes with the only information being "Error" HOT 1
- connectivity HOT 5
- Support custom COMMAND_LONG listeners and be able to ACK HOT 6
- can't connect to QGC via UDP connection using mavsdk HOT 3
- Get HEARTBEAT message from MAVSDK HOT 5
- How to use Mavsdk to call Led_control to control LED lights? HOT 2
- MAVSDK server not connecting with JMAVSIM - Windows WSL HOT 2
- How can I set flight mode - manual mode? HOT 1
- Altitude error while doing swarming using mavsdk-python ? HOT 2
- RuntimeError: Task pending got Future attached to a different loop during Offboard control with FastAPI and MAVSDK HOT 2
- Manual control of RGB LED during flight using MAVSDK? HOT 5
- Mavsdk in Airflow run issue HOT 3
- Command Denied when trying to set imu rate HOT 6
- Log Download Speed
- PID Controller HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mavsdk-python.