Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 01 10:30
    Lingdajin closed #1180
  • Feb 01 10:30
    Lingdajin commented #1180
  • Feb 01 10:04
    Harish1192 commented #1180
  • Feb 01 06:52
    Casavantii commented #1092
  • Jan 26 12:30
    Lingdajin commented #1172
  • Jan 26 12:24
    Lingdajin opened #1180
  • Jan 21 21:26
    Xarbenence commented #1169
  • Jan 21 21:13
    Xarbenence commented #1041
  • Jan 21 13:56
    prithvi2k2 commented #1119
  • Jan 17 18:07
    kazmifactor edited #1179
  • Jan 17 18:06
    kazmifactor opened #1179
  • Jan 14 11:34
    hassaansidd opened #1178
  • Dec 28 2022 09:16
    Reksin-Aniez commented #1112
  • Dec 24 2022 14:44
    allenizac opened #1177
  • Dec 19 2022 19:50
    oppenheimer3 reopened #1176
  • Dec 19 2022 19:50
    oppenheimer3 commented #1176
  • Dec 19 2022 19:49
    oppenheimer3 closed #1176
  • Dec 19 2022 17:51
    oppenheimer3 opened #1176
  • Dec 16 2022 15:27
    metehanacikgoz commented #151
  • Dec 16 2022 14:29
    metehanacikgoz commented #151
kickfliph
@kickfliph:matrix.org
[m]
I really appreciate all your help.
UnPublishable
@UnPublishableco_twitter
Hi, So what do I buy and how much?
Dulhan Jayalath
@armytricks
Hi, would anyone know why setting RC overrides doesn't seem to work as expected? For example, setting channel 3 to 1600, makes the motors behave as if it's at 2000. I get the same behaviour overriding with MAVProxy directly.
I am aware RC overrides are not recommended, however I have a specific use case where I cannot use GPS.
viaEunji
@viaEunji
I want to check the messages sent by the drone in dronekit-python. Of course, I know the guide states that this is hard, and recommends coding defensively. However, the following message is being checked in the terminal when the dronekit-python code is executed.
ERROR:autopilot:ARMING MOTORS
CRITICAL:autopilot:Initialising APM...
I want to display this message on the Internet window through web socket communication.
How can I use this message?
sanjainn
@sanjainn
Hi, I am building an obstacle-avoiding drone in a GPS environment using dronekit and lidar.

I am currently working on building an autonomous drone in the simulation middleware of Gazebo using ROS and drone programming using dronekit API.

I have an Iris Copter model available in SDF format, which I am programming using the Dronekit API. I have integrated a Hokuyo Lidar sensor on the top of the drone from which I get the distances from all the 360 degrees respectively from the ROS topic the sensor generates. In all the values that I get from 360 degrees of direction, I get around 1024 values. I only had to get the values from 90, 180, 270, and 360(or 0). After getting them I fed those values into the script I made in python and somehow made it possible for the drone to avoid obstacles using the drone kit functions that are available.
Now, the problem I am facing is with the integration of the obstacle avoidance system in the waypoint navigation system that is done using Ardupilot (using the map in Ardupilot Plugin / Mission Planner).

How do I make such a project in which the drone tends to move autonomously using GPS whilst being able to avoid obstacles that come in its path?

I agree that the firmware of Ardupilot comes with a feature of something called the Bendy Ruler Algorithm. U I have no idea how to make use of it in the simulation environment of Gazebo. The details about this feature are also not available much.

Any help on this would be really awesome for me to continue with further development of the task!
Thanks,
Sanil Jain

SohaibAJ
@SohaibAJ
@sanjainn Hi. I did a project similar to this and my setup worked like this. First someone would plan a path in mission planner and upload it. Now arducopter requires you to put the drone in auto mode and arm the drone to start the mission (you can use arm and takeoff command in dronekit to achieve the same). The drone would take off and start going towards the next waypoint, but when it saw an obstable using the onboard lidar, it would change the mode to Brake, then it would save the mission and the current location, it would then go into guided mode to either go left or right (where ever there was more distance) and once it was free from the obstacle (in my case it was a L shaped wall) it would reupload the mission and continue from there. It was a very roundabout way of doing it but it was 6 years ago and it worked. Hope this helps.
Ronny García Lorenzo
@ronnylorenzo1991
Hello everyone I recently started dronekit python and bought Hilldow Foldable Drone (https://www.amazon.com/dp/B09TZNBB9D?tag=keepersstaffing-20&linkCode=osi&th=1&psc=1&keywords=Programmable%20Drone) So far I have not been able to connect dronekit with the drone. Please HELP!!!
GreatSum
@oguzkaganaltas
Hello everyone, i am trying to write GeoFence using pymavlink python to px4 directly. but the following code doesn't write. what can be the issue?
from pymavlink import mavutil

master =  mavutil.mavlink_connection(device="tcp:127.0.0.1:5762")
master.wait_heartbeat()

poli = [(35.63604046,34.53116655), 
(35.63638925,34.53209996),
(35.63584863,34.53270078),
(35.63536032,34.53252912),
(35.63520337,34.53167081),
(35.63554344,34.53127384)]

#enable fence
master.mav.command_long_send(
            master.target_system,
            master.target_component,
            mavutil.mavlink.MAV_CMD_DO_FENCE_ENABLE, 0,
            1, 0, 0, 0, 0, 0, 0)


print(len(poli))
for i in range(len(poli)):
    master.mav.command_long_send(
                master.target_system,
                master.target_component,
                mavutil.mavlink.MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION, 0,
                len(poli), 
                1, 
                0, 
                0, 
                poli[i][0],
                poli[i][1], 
                0)
master.arducopter_arm()

print("Waiting for the vehicle to arm")
master.motors_armed_wait()
print('Armed!')
Bartimus03
@Bartimus03

This is the script I am running to connect to a drone with px4 autopilot with a USB cable in com4.

from dronekit import connect

vehicle = connect(‘com4’, wait_ready=True)
print(“connection command run”)

This is the error it continually throws:

Traceback (most recent call last):
File “C:/Users/ethan/project/DroneKit Test.py”, line 6, in
vehicle = connect(‘com4’, wait_ready=True)
File “C:\Python27\lib\site-packages\dronekitinit.py”, line 3159, in connect
handler = MAVConnection(ip, baud=baud, source_system=source_system, source_component=source_component, use_native=use_native)
File “C:\Python27\lib\site-packages\dronekit\mavlink.py”, line 130, in init
self.master = mavutil.mavlink_connection(ip, baud=baud, source_system=source_system, source_component=source_component)
File “C:\Python27\lib\site-packages\pymavlink\mavutil.py”, line 1777, in mavlink_connection
force_connected=force_connected)
File “C:\Python27\lib\site-packages\pymavlink\mavutil.py”, line 935, in init
import serial
ImportError: No module named serial

I would really appreciate your help with this. I have been stuck at trying to connect to my drone for over a month. Also, if you have an alternative to dronekit that could you point me in the right direction and maybe include sample code to connect to the drone? Thank you!

kaidobit
@kaidobit:matrix.org
[m]
Hey there what's up
I wanted to ask if dronekit is ever going to be published to pypi again?
Minhaj SixByte
@minhajsixbyte:matrix.org
[m]
what do you mean
Last released more then 3 years ago
Minhaj SixByte
@minhajsixbyte:matrix.org
[m]
ig maybe because there is nothing to update. project is pretty inactive
kaidobit
@kaidobit:matrix.org
[m]
What's up with the maintainer? Tons of open issues, plenty open PRs
kaidobit
@kaidobit:matrix.org
[m]

Also there are most likely updates in the libraries, eg pymavlink where the newest version is compatible with ardupilot

Not speaking of security related updates and so on

ABHIJIT BARUAH
@ABHIJITTT
Please give me solution of my problem it's very important for me....
Problem is what is the code for hovering the drone
Minhaj SixByte
@minhajsixbyte:matrix.org
[m]
set mode to guided, take off, set mode to loiter.
ABHIJIT BARUAH
@ABHIJITTT
I want make a module which detect crop disease and spray medicines automatically using an UAV..I have coded the CNN part and also I learnt about how Drone-kit python package is to be used. My problem is that I cannot find any good tutorial for my project. How can I fly my drone from one location to another and hold in a particular height when disease detect. please respected sir/madam help me. This is my final year project.
gianfrancodgm
@gianfrancodgm
Hi! I'm quite new to all the UAV world and I'm trying to perform a simple takeoff with dronekit-python using the code in https://dronekit-python.readthedocs.io/en/latest/guide/taking_off.html , but when I run the script I get stuck in a pre-arm check that says "yaw (rc4) not centered". Does anyone know how to solve that issue?
ABHIJIT BARUAH
@ABHIJITTT
i think you didn't collaborate the controller correctly
Asoka Sarath
@sasoka:matrix.org
[m]
Hi all,
I have been working on GUIDED_noGPS mode for sometime. I need some help.
I have completed SITL and now I'm trying to work with real drone. So I'm able takeoff, hover, move and all fine. But when I'm moving over an obstacle the drone is climbing.
From what I understood from my research is that GUIDED_noGPS is independent of height, it varies height only when we change thrust.
I might be wrong too.
Do you guys have any ideas on this.
Thanks in advance
tturkmen
@tturkmen
Hi all, can I use dronekit fixed wing uav
kaidobit
@kaidobit:matrix.org
[m]

Arducopter as well as arduplane both use mavlink

While some mavlink commands are the same for both others are not, I'm not sure which one are the same but you can look that up in the ardupilot documentation

I would expect that some features might work and others do not depending on the specific mavlink command

I'm not sure if there's any lib similar to dronekit but for arduplanes (I suppose you're using arduplane?), However you can write it yourself with pymavlink which is a generated (based on a c lib) mavlink wrapper in python

This is also what dronekit uses internally, it's just not as human readable as dronekit is

Be warned it's quite tedious but completely possible

Amit Maurya
@AmitJT
Hi all, I'm working on gcs software in which i want to give command to change the altitude of fixed wing plane . Is there any specific command for do that
2 replies
Alex
@a-j-russell

Hello! I am trying to send a command to change the state of my hardware safety switch. I have found this definition:

self.master.mav.set_mode_send(self.target_system,
                                  mavutil.mavlink.MAV_MODE_FLAG_DECODE_POSITION_SAFETY,
                                  1)

But I need to construct the message using dronekit, how would I do this

jakobjackson2016
@jakobjackson2016
Raspberry Pi Cannot Obtain GPS Information from Pixhawk 6C + DroneKit + ArduRover stable-4.2.3

Issue details

Unable to pull (obtain) GPS lat/long info on Raspberry Pi (RPi) using DroneKit SDK's API: vehicle.location.global_relative_frame from HolyBro Pixhawk 6C. Exact same .py script to pull this GPS info on RPi with same firmware version, GPS and other related setup parameters work with HolyBro Pixhawk 4 + RPi but it DOES NOT work with Pixhawk 6C + RPi. I can obtain vehicle.mode info from Pixhawk 6C on RPi but not vehicle.location.global_relative_frame info which provides GPS lat/long information on RPi from Pixhawk 6C; the output for lat/long remains blank. There seems to be a bug preventing this API to pull lat/long info from Pix6C with rover-stable-4.2.3 firmware. Just FYI: I'm upgrading my rover from HolyBro Pix4 to Pix6C. RPi <-> Pix6C connection setup: USB to micro-USB.

Version
ArduRover stable-4.2.3

Platform
[ ] All
[ ] AntennaTracker
[ ] Copter
[ ] Plane
[X] Rover
[ ] Submarine

Airframe type
X

Hardware type
Pixhawk 6C

Any idea what might the issue here? Thank you for your time and help in advance!

rnjbdya
@rnjbdya
Hi, Is it possible to use dronekit-sitl in Nvidia Jetson Xavier NX?
Amit Maurya
@AmitJT
Hello ! there is an calibration function to calibrate accelerometer but on running this there is no any kind of acknowledge by dronekit. Also its run for one time but I have to calibrate like mission planner do ( in mission plane when we calibrate it says do level then do left then do right , etc ) so I m totally confused that how i can do the same using dronekit. Please help me out.
1 reply
brunocrocha99
@brunocrocha99
Hey. Is it possible to run dronekit on Unity and deploy it for iOS?
Ronald Pandolfi
@rspandolfi_gitlab
Using DroneKit, we need to tag video frames with meta data from telemetry including position, altitude, pitch, roll, and yaw. We would much appreciate a pointer or example how best to proceed.
oorhunn
@oorhunn
Hi. Is there any support for getting wind vector data using dronekit API. Or is there any other way to add this message as a custom message ?
kabdallokesh
@kabdallokesh
can we connect esp8266 to mission planner and send commands from it (without any companion computer)??
Amit Maurya
@AmitJT
how can i do accel callibration using dronekit ?
allenizac
@allenizac
I want to read the vehicle state after caculate EKF, how should i do. Moreover, is the obsever, listener and callback is relative with EKF?
Yasho Bapat
@Yasho-Bapat

hi, i'm writing a simple script for a drone to take off 20m into the air, and i'm simulating on dronekit-sitl
but for some reason, it is lifting it up only by less than or equal to 3cm
i don't know what i can do to fix this, can someone please help?
```import dronekit
from dronekit import connect, VehicleMode
import time

vehicle = connect('tcp:127.0.0.1:5760', wait_ready=True)

def goSomewhere(target_altitude):
print("pre arming checks")
while not vehicle.is_armable:
print("waiting for vehicle to initialise")
time.sleep(1)

print("arming motors")
vehicle.mode = VehicleMode("GUIDED")
while not vehicle.armed:
    vehicle.armed = True  # commands to change a value are NOT GUARANTEED TO SUCCEED therefore put in a loop
    print("arming...")
    time.sleep(1)
    if (vehicle.armed):
        print("armed")

vehicle.simple_takeoff(target_altitude)
while True:
    print(" Altitude: ", vehicle.location.global_relative_frame.alt)

    # Break and return from function just below target altitude.
    if vehicle.location.global_relative_frame.alt >= target_altitude * 0.95:
        print("Reached target altitude")
        break
    time.sleep(1)

goSomewhere(30)
```

image.png
this is the output
tugay ozgirgin
@girginsoft
Hi all, I am new here. I would like to get your suggestion. Which drone is good for the beginner to develop something with dronekit.
Amit Maurya
@AmitJT
Hello everyone ! Im trying to get realtime arm/disarm status of drone using dronekit ( stream via herelink ) but don't know why after arming dronekit starts fluctuating like after some sec it start showing TRUE and again after few second it start showing FALSE but in herelink my drone is armed .
Vardan
@saghavart
Hi all. I wonder if it is possible to fly a Bezier path using ardupilot and dronekit.
D Srikhar Shashi
@srikharshashi
Hey! has anyone here used gopro unofficial python api within drone kit to take images?
I'm trying to hold the drone at a waypoint in my mission and take a picture at that given waypoint
the holding part of the work is done via setting param1 in Command object of the waypoint
I need to trigger the goPro once the way point is reached any help or clues?