dronekit / dronekit-python

DroneKit-Python library for communicating with Drones via MAVLink.
https://readthedocs.org/projects/dronekit-python/
Apache License 2.0
1.62k stars 1.45k forks source link

Autonomous Indoor Flight with Computer Vision (Channel Override?) #685

Open GitWyd opened 7 years ago

GitWyd commented 7 years ago

We read that we should consult you first to figure out if there is a better solution than Channel Overrides for our problem.

We are a research team working on autonomous UAV flight in GPS deprived environments.

In order to do that, we need to

  1. Arm the drone without GPS (is the "GUIDED_NOGPS" mode the right one for this?)
  2. Send receiver commands to the drone: throttle, roll, pitch, yaw (Preferably with a magnitude) or other commands that allow us to directly control the drone i.e. change direction, ascend/descend, forwards/backwards

Eventually we will want to program aggressive flight maneuvers, but initially we simply need to have basic controls.

Does DroneKit provide some of those functions already? Which functions should we consider? Which functions do we need to code ourselves?

We are happy to contribute to the DroneKit project, if this is necessary to achieve the above described functionality.

Our Setup: Navio2 with PI3 on custom build 330 size quadcopter

peterbarker commented 7 years ago

On Fri, 25 Nov 2016, GitWyd wrote:

  1. Arm the drone without GPS (is the "GUIDED_NOGPS" mode the right one for this?)

Probably.

  1. Send receiver commands to the drone: throttle, roll, pitch, yaw (Preferably with a magnitude) or other commands that allow us to directly control the drone i.e. change direction, ascend/descend, forwards/backwards

You probably don't want to do this; you probably want to send guided velocity mavlink messages instead: https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/common.xml#L2962

Eventually we will want to program aggressive flight maneuvers, but initially we simply need to have basic controls.

Does DroneKit provide some of those functions already? Which functions should we consider? Which functions do we need to code ourselves?

People have used dronekit to push their vehicles around using the guided velocity commands; 3DR's Solo vehicle's smartshots, for example.

squilter commented 7 years ago

Guided-NoGPS only allows you to send angle commands. You can send SET_ATTITUDE_TARGET messages, and you can listen to ATTITUDE messages.

If you attach an optical flow module and a rangefinder, then you can use normal guided mode. This will allow you to send velocity commands or even position commands.

dollop80 commented 7 years ago

@squilter

If you attach an optical flow module and a rangefinder, then you can use normal guided mode. This will allow you to send velocity commands or even position commands.

I've added the OF and lidar. It works indoors without GPS only when arming in Loiter mode. No way to use OF in Guided mode. I've tried AC_3.4.5 and AC_3.5RC3

prasanna12510 commented 6 years ago

is there any simple code like arm and takeoff that demonstrates guided_nogps flight mode using dronekit api

hamishwillee commented 6 years ago

@prasanna12510 Yes. See https://github.com/dronekit/dronekit-python/pull/712 - not merged, but some great work there.

borhanreo commented 5 years ago

@squilter

If you attach an optical flow module and a rangefinder, then you can use normal guided mode. This will allow you to send velocity commands or even position commands.

I've added the OF and lidar. It works indoors without GPS only when arming in Loiter mode. No way to use OF in Guided mode. I've tried AC_3.4.5 and AC_3.5RC3

@dollop80 I have used maxbotix rangefinder sensor. So may i arm and takeoff in LOITER mode in indoor (GPS denied area).??

borhanreo commented 5 years ago

Hi @peterbarker. I am developing a quad-copter. My copter will be always fly in indoor (hall room). I'm using pixhawk for indoor mission. i am familiar with the controlling with gps signal available area. My copter work good in gps signal available area. But i want to flying in GPS denied area. I have successfully install maxbotix range finder and get altitude value. I’ve got a very basic script that puts the drone to GUIDED_NOGPS mode, arms it and forces it to takeoff for the altitude say 1m, then it wains for a while and lands. When i armed then it takeoff then drone going straight up. Did not stay in 1m altitude. Anyone help me.

I am share video https://youtu.be/1-g1NVOj9mk Could you help me please??

kumarrt commented 4 years ago

This is a very informative thread and I would really appreciate it if we can get some guidance on a similar project.

We are also trying to fly a NAVIO2 and Rpi based drone in GPS deprived environment using keyboard commands. I understood that we can only send set_atttiude_target commands in Guided_NoGPS mode. However, we also want to achieve altitude hold using optical flow or Open MV cam.

Please provide guidance, any help is greatly appreciated. Thank you.

rajivrawat982 commented 4 years ago

I'm just looking to find out how flight controller deciding the actual altitude in "GUIDED_NOGPS" mode as while i was arming it without a props and using [vehicle.location.global_relative_frame.alt] to find out current altitude it changing continuously, it should not change as my drone is not moving only arming. @peterbarker @hamishwillee can you suggest something.