Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 04 09:09
    shubham9436 edited #1016
  • Apr 04 09:09
    shubham9436 opened #1016
  • Apr 02 13:35
    agising commented #1000
  • Apr 02 13:23
    agising commented #1013
  • Apr 01 19:59
    RotemShavit edited #1015
  • Apr 01 19:57
    RotemShavit opened #1015
  • Apr 01 01:48
    catokass edited #1005
  • Apr 01 01:45
    catokass closed #1005
  • Apr 01 01:45
    catokass commented #1005
  • Mar 31 16:13
    mohamadsaab commented #996
  • Mar 31 15:58
    Guohao91 commented #996
  • Mar 29 19:19
    wx4cb opened #1014
  • Mar 27 22:25
    mohamadsaab commented #996
  • Mar 27 22:21
    mohamadsaab commented #961
  • Mar 27 22:19
    mohamadsaab commented #1000
  • Mar 24 23:44
    reuvenabit opened #1013
  • Mar 24 15:06
    smiQi opened #1012
  • Mar 24 07:39
    eminakgun opened #1011
  • Mar 22 11:32
    avncalst commented #969
  • Mar 22 09:17
    avncalst commented #969
Guohao
@Guohao91
@andrew_t97_gitlab thanks for your opnion
so yes the drone can do a very limited motions with NoGPS mode
I am using Pixhawk 4 and Intel NUC
I have no idea about Navio2
Guohao
@Guohao91
so i think I'd better try to accomplish my code as good as possible
and I believe there would be someones working to improve Ardupilot's NOGPS mode
so that we can do more through NoGPS mode
Fabiano
@filereno
What do you think of this video https://www.youtube.com/watch?v=TFDWs_DG2QY&t=257s.
He claims that the dronekit-sitl is obsolete. I still use dronekit + dronekit-sitl + mavproxy.
auturgy
@auturgy
@tizianofiorenzani is in this chat, so can give you his reasoning :) I suspect he’s referring to the fact that the default version of arducopter in DK-Sitl hasn’t been updated for some time, and whilst DK itself is largely functional, it’s not actively developed or maintained at the moment (sadly).
Jaime Machuca
@jmachuca77
The version of Ardupilot installed with the dronekit-sitl package is really old and has not been updated since March 2019. Which in this project it’s an eternity. The AP versión installed is 3.3 for Copter, 2.5 for rover (that’s ancient), 3.3 for plane, and apparently 2.0.20 for solo.
Nilanga saluwadana
@vusaalab
hi guys new to dronkit-python, is dronekit python works for arduirover boat?
Guohao
@Guohao91
hi guys
I have a question,
how could I put my tkinter control panel into a web app in any way?
a4b5d552a80f00b1fa62759d4ec4af7.jpg
or say, put these backend logic definitions worked onto a web app
please help
Charles Todd
@Therkc

I am running pythong 2.7.14 with arducopter 3.6.11 on a navio2 RPi 3B + combo

The quadcopter is supposed to run python scripts and the RC is disabled. I got the script to work, but due to obvious safety concerns I would like to have an interrupt that forces the drone to land or turn off. Right now I am running an excpetion that forces the drone into LAND mode but the drone does not land. To further try to bring the vehicle down I go into a loop to force the drone to disarm. I am completely new to dronekit and I think it is cool, but could somebody give me a pointer on my code as to why this is not disarming?

from dronekit import connect, VehicleMode, LocationGlobalRelative
import time
import socket
import exceptions

from modules import *

try:

# Connect to drone through telmetry
vehicle = connectDrone()

# System status display and arm decision
systemBoot(vehicle)

# Arm and Takeoff at altitude in meters
armAndTakeoff(vehicle, 1)

# Have drone hover for a few seconds
vehicle.mode = VehicleMode("LOITER")
print "Drone is hovering....."
time.sleep(25)

except (KeyboardInterrupt):

# Force drone to land
while vehicle.mode != "LAND":
    vehicle.mode = VehicleMode("LAND")
print "Drone is making an emergency landing...."

while vehicle.armed == True:
    vehicle.disarm 

Make drone land

while vehicle.mode != "LAND":
vehicle.mode = VehicleMode("LAND")
print "Drone is landing...."

Put drone back into guided mode

vehicle.mode=VehicleMode("GUIDED")

print "End of mission..."
vehicle.close()

END OF PROGRAM

Charles Todd
@Therkc
I apologize for posting that in markup, I also tried vehicle.armed=False and the drone is sitting on my desk trying to make it into outer space still so it is bothersome that it will not disarm at an interrupt, it even shows it in Land mode but the motors are still burning away
Nilanga saluwadana
@vusaalab
Hi new to dronekit can i used dronekit for the boat
Berke Yavas
@berkeyvx_twitter
Hi, i want to use camera on drone. Can i run python scripts on drone. Connecting camera to drone and do image processing using dronekit, is that possible or am i have to use ROS?
Guohao
@Guohao91

def take_a_pic():

msg = vehicle.message_factory.gopro_set_request_encode(MAVLINK_GIMBAL_SYSTEM_ID, MAVLINK_GIMBAL_COMPONENT_ID, mavutil.mavlink.GOPRO_COMMAND_SHUTTER, (1, 0, 0, 0))

vehicle.send_mavlink(msg)

vehicle.flush()

to take pics, use above code

def nadir_point():

vehicle.flush()

msg = vehicle.message_factory.mount_configure_encode(

       0, 1,    # target system, target component

       mavutil.mavlink.MAV_MOUNT_MODE_MAVLINK_TARGETING,  #mount_mode

       1,  # stabilize roll

       1,  # stabilize pitch

       1,  # stabilize yaw

       )

vehicle.send_mavlink(msg)

vehicle.flush()

msg = vehicle.message_factory.mount_control_encode(

       0, 1,    # target system, target component

       -90*100, # pitch is in centidegrees

       0.0, # roll

       0, # yaw is in centidegrees

       0 # save position

       )

vehicle.send_mavlink(msg)

vehicle.flush()

to control gimbal
Charles Todd
@Therkc
I found a resolve to a SHTF scenario where I would just want to turn the drone off by using vehicle.capabilities.flight_termination = true but it makes the drone turn off completely. Is there any method that cancels the current flight commands and forces the drone to actually land? I don't want this thing to drop out of the air
so during simple_takeoff(5) I would abort the takeoff to 5 meters and go straight into landing mode.
Guohao
@Guohao91
hi, guys
How could I detect the throttle parameter by dronekit code?
like I can get pitch, yaw, and roll parameters by vehicle.attitude, but how to get throttle% ?
Samuel Salomao
@samucs
@Guohao91 have a look at rc overrides, there you can read the pwm value from channel 3 (throttle). Then you will have to map the pwm min~max to 0%~100%
Harun BAYDOĞAN
@hrnbydgn_twitter

Hi,
İ develop on python with dronekit. But i doesnt a issues. I want to sytem messages that:
CRITICAL:autopilot:APM:Copter V3.3 (d6053245)
CRITICAL:autopilot:Frame: QUAD

On python a dictionaty type veriable must include this messages.

is it impossible

emnakgn
@emnakgn
@Therkc put time sleep inside disarming while loop
@hrnbydgn_twitter I guess you have to listen for that specific messages using vehicle.on_message decorator or vehicle.add_attribute_listener
emnakgn
@emnakgn

I wanted to observe MISSION_ITEM_REACHED message using add_attribute_listener() but does not seem to work:

self.vehicle.add_attribute_listener('MISSION_ITEM_REACHED', self.wp_observer)

def wp_observer(self, vehicle_obj, attr_name, value):
    print vehicle_obj, attr_name, value

Any ideas?

emnakgn
@emnakgn
OK. Solution is not add_attribute_listener, instead, add_message_listener.
Guohao
@Guohao91
@samucs thanks friend
but i mean how to show up thr parameter instantaneously
image.png
like this Thr parameter shown in Mavproxy
rockstar221123
@rockstar221123
Hi, can I use dronekit python codes with PX4 flight stack? I have been using dronekit python with ardupilot so far and now I am migrating to PX4 on a pixhawk cube and would like to know whether dronekit python would work as before?
mohamadsaab
@mohamadsaab
Hi , i'm using navio2 with raspberry pi as a flight controller . When i try to run a python script in this way : python myscript --connect 127.0.0.1:14550 i get the following : dronekit:link timeout , no heartbeat in last 5 seconds . The raspbian image emlid use is preconfigured by them and comes with preinstalled dronekit so i didn't have to download anything before using dronekit .Does anyone know how to solve the problem . I shared my problem in emlid community forums but no one replied .
mohamadsaab
@mohamadsaab
https://community.emlid.com/t/dronekit-doesnt-connect/18929 .This is the link for more detail of dronekit connection timeout problem on navio2 .
Ethan Lee
@LordHandLee
@mohamadsaab dronekit no longer works with the current version of Navio 2/Ardupilot.
mohamadsaab
@mohamadsaab
@LordHandLee Yes that what i thought . Even when i tried to work around the problem using mavproxy and running the script on my laptop ,i found another problem in their raspbian image . I don't know what's the point of buying navio2 if they don't fix these problems .
Ethan Lee
@LordHandLee
I ran into the exact same issue you have and even made a post on the Navio 2 forums. They never could resolve the issue and so I ended up returning my Navio 2 and getting refunded. The problem with Navio 2 is that it is closed source hardware packaged in a proprietary business model while using open source software. The open source is changes are too fast paced for Navio 2, they can't keep up and so we run into problems. If you are going to sell a closed source hardware flight controller, you need to develop your own personal in house software that can be actively maintained and tested.
mohamadsaab
@mohamadsaab
@LordHandLee totally agree , or at least hire more people as they have several products now .
Fabiano
@filereno
I am developing an application with dronekit, ardupilot, and simulating in the ardupilot sitl and gazebo. My application uses opencv, everything is working but I need to capture the simulation image of the "gimbal small 2d" gazebo. Does anyone know how I get the image from the gazebo camera using a python code?
Alfredo Bencomo
@IeiuniumLux
Pretty neat that you can now simulate a parachute ☂ flight termination in Gazebo: flight_termination_parachute.mp4