dronekit

Dronekit-python running in docker connecting to MAVProxy on host

好久不见. 提交于 2021-01-29 13:51:07
问题 I am using dronekit-python in a docker container and am attempting to connect to an instance of MAVProxy running on my host machine (Mac OSX) using the following command: vehicle = connect('udp:host.docker.internal:14551', wait_ready=True) but am getting the following error: File "/usr/local/lib/python3.7/site-packages/pymavlink/mavutil.py", line 1015, in __init__ self.port.bind((a[0], int(a[1]))) OSError: [Errno 99] Cannot assign requested address Does anyone know what the issue is here? I

Example to connect from container to host service

浪子不回头ぞ 提交于 2020-05-30 08:14:58
问题 I am new to Docker and Drone Programming. I was able to deploy a python script (that contains dronekit code) to docker container on my Windows 10. To run the script, I need to connect to a service on my host. I have provided a snippet below, Windows has a program running(Mavproxy SITL) which has exposed 127.0.0.1:14550 which is UDP. My image should connect to this address. mydronectrlscript.py: from dronekit import connect # Connect to UDP endpoint. vehicle = connect(‘udp:127.0.0.1:14550’,

Example to connect from container to host service

左心房为你撑大大i 提交于 2020-05-30 08:13:06
问题 I am new to Docker and Drone Programming. I was able to deploy a python script (that contains dronekit code) to docker container on my Windows 10. To run the script, I need to connect to a service on my host. I have provided a snippet below, Windows has a program running(Mavproxy SITL) which has exposed 127.0.0.1:14550 which is UDP. My image should connect to this address. mydronectrlscript.py: from dronekit import connect # Connect to UDP endpoint. vehicle = connect(‘udp:127.0.0.1:14550’,

DroneKit mission not sent to drone

早过忘川 提交于 2020-01-07 04:37:05
问题 I'm trying to create simple mission using Drone-Kit android. Mission myMission = new Mission(); myMission.clear(); Takeoff to = new Takeoff(); ReturnToLaunch rtl = new ReturnToLaunch(); //set Altitude in meters rtl.setReturnAltitude(2); to.setTakeoffAltitude(2); myMission.addMissionItem(to); myMission.addMissionItem(rtl); MissionApi.getApi(this.drone).setMission(myMission,true); The problem is that sometimes it works, and sometimes it's doesn't... I don't know why it not working... I'm not

How to connect between Simulated Vehicle and Companion Computers at the same time?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 03:34:14
问题 I was wondering if it was possible to connect to a virtual drone and physical drone at the same time, UDP and USB. This is to test ground station like functionality to be able to control multiple drones. I only have 1 physical and want to test between both. Or to at least prove my suspicion that api = local_connect() # Get an APIConnection all_vehicle = api.get_vehicles() Does in fact give me all possible connected vehicles. And just play with it from there. Edit: What my process was is

DroneKit: Failed to connect to /dev/tty.usbmodem1411 : 'Serial' object has no attribute 'setBaudrate'

喜欢而已 提交于 2019-12-01 10:09:48
问题 Following the DroneKit instructions, I was able to run the hello.py code from their QuickStart guide: http://python.dronekit.io/guide/quick_start.html. However, when I try to run their basic mission example, I get the setBaudrate error in the title: $ python mission_basic.py --connect=/dev/tty.usbmodem1411 Connecting to vehicle on: /dev/tty.usbmodem1411 Traceback (most recent call last): File "mission_basic.py", line 23, in <module> vehicle = connect(args.connect, wait_ready=True) File "