paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Drone Flying Erratically help?


From: Nathan Speidel
Subject: Re: [Paparazzi-devel] Drone Flying Erratically help?
Date: Sat, 27 Feb 2016 23:11:11 -0800

Thanks for the response... 

Have you found a drone that seems to fly consistently very well with the GPS? 

On Sat, Feb 27, 2016 at 6:16 PM, Nathan Speidel <address@hidden> wrote:
Hello again!

So we flew our AR Drone 2.0 autonomously with the paparazzi software just briefly a couple days ago.   We executed the block that flew the drone back and forth between p1 and p2 and it seemed to be working well. 

Today we tried to execute our own flight plan.  

We edited the default flight plan in a pretty simple way, but today the drone was not behaving well. 

We tried to send it to a waypoint we defined called "p1", but it kept veering far away from what seems would be the most logical path. 

The last time we tried to launch the block it circled the waypoint 3 or 4 times while gaining speed, and wasn't getting any closer to the waypoint.   Finally it crashed. 

So we have a couple questions:

1)  Has anyone had a problem like this and been able to fix it?   Does anyone know what might be going wrong or what we could do to fix the problem? 

2)  We also noticed that it doesn't seem to be using the distance sensor on the bottom to calculate its height.   Maybe it's just using GPS.   Does anyone know if the software is capable of using the sonar distance sensor on the bottom?  or does it just use GPS to calculate the altitude? 

...I wall attach the code of our flight plan below.   We ran "start engine" and "stay_p1".   We never got confidant enough to run "visit_all_waypoints".

Any help or suggestions anyone has would be much appreciated!!!  

Thanks!

-------- Code of flight plan below -------

<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">


<flight_plan alt="152" ground_alt="147" lat0="43 33 50.83" lon0="1 28 52.61" max_dist_from_home="150" name="Rotorcraft Basic (Enac)" security_height="2">

  <header>

#include "autopilot.h"

  </header>

  <waypoints>

    <waypoint name="HOME" x="0.0" y="0.0" height="7."/>

    <waypoint name="CLIMB" x="0.0" y="5.0" height="15."/>

    <waypoint name="STDBY" x="-2.0" y="-5.0" height="7."/>

<!--

    <waypoint name="p1" x="3.6" y="-13.9"/>

    <waypoint name="p2" x="27.5" y="-48.2"/>

    <waypoint name="p3" x="16.7" y="-19.6"/>

    <waypoint name="p4" x="13.7" y="-40.7"/>

-->

    <waypoint name="p1" x="0" y="5" height="7."/>

    <waypoint name="p2" x="4.3" y="2.5" height="7."/>

    <waypoint name="p3" x="4.3" y="-2.5" height="7."/>

    <waypoint name="p4" x="0" y="-5" height="7."/>

    <waypoint name="p5" x="-4.3" y="-2.5" height="7."/>

    <waypoint name="p6" x="-4.3" y="2.5" height="7."/>


    <waypoint name="CAM" x="-20" y="-50" height="2."/>

    <waypoint name="TD" x="5.6" y="-10.9"/>

  </waypoints>

  <blocks>

    <block name="Wait GPS">

      <call fun="NavKillThrottle()"/>

      <while cond="!GpsFixValid()"/>

    </block>

    <block name="Geo init">

      <while cond="LessThan(NavBlockTime(), 10)"/>

      <call fun="NavSetGroundReferenceHere()"/>

      <call fun="NavSetAltitudeReferenceHere()"/>

    </block>

    <block name="Holding point">

      <call fun="NavKillThrottle()"/>

      <attitude pitch="0" roll="0" throttle="0" vmode="throttle" until="FALSE"/>

    </block>

    <block name="Start Engine">

      <call fun="NavResurrect()"/>

      <attitude pitch="0" roll="0" throttle="0" vmode="throttle" until="FALSE"/>

    </block>

    <block name="stay_p1">

      <stay wp="p1"/>

    </block>

    <block name="visit_all_waypoints" strip_button="Takeoff" strip_icon="takeoff.png">

      <go from="p1" hmode="route" wp="p2"/>

      <stay wp="p2" until="stage_time>10"/>

      <go from="p2" hmode="route" wp="p3"/>

      <stay wp="p3" until="stage_time>10"/>

      <go from="p3" hmode="route" wp="p4"/>

      <stay wp="p4" until="stage_time>10"/>

      <go from="p4" hmode="route" wp="p5"/>

      <stay wp="p5" until="stage_time>10"/>

      <go from="p5" hmode="route" wp="p6"/>

      <stay wp="p6" until="stage_time>10"/>

      <go from="p6" hmode="route" wp="p1"/>

      <stay wp="p1" until="stage_time>10"/>

      <deroute block="stay_p1"/>

    </block>

    <block name="Standby" strip_button="Standby" strip_icon="home.png">

      <stay wp="STDBY"/>

    </block>


<!--

Try this too:

  <for var="i" from="1" to="5">

    <circle wp="HOME" radius="5*$i" alt="ground_alt+10" until="stage_time>100" />

  </for>

-->



<!--

    <block name="Takeoff" strip_button="Takeoff" strip_icon="takeoff.png">

      <exception cond="stateGetPositionEnu_f()->z > 2.0" deroute="Standby"/>

      <call fun="NavSetWaypointHere(WP_CLIMB)"/>

      <stay vmode="climb" climb="nav_climb_vspeed" wp="CLIMB"/>

    </block>

    <block name="Standby" strip_button="Standby" strip_icon="home.png">

      <stay wp="STDBY"/>

    </block>

    <block name="go_p2">

      <call fun="nav_set_heading_deg(90)"/>

      <go wp="p2"/>

      <deroute block="stay_p1"/>

    </block>

    <block name="line_p1_p2">

      <go from="p1" hmode="route" wp="p2"/>

      <stay wp="p2" until="stage_time>10"/>

      <go from="p2" hmode="route" wp="p1"/>

      <deroute block="stay_p1"/>

    </block>

    <block name="route">

      <go from="p1" hmode="route" wp="p3"/>

      <go from="p3" hmode="route" wp="p4"/>

      <go from="p4" hmode="route" wp="p1"/>

      <deroute block="stay_p1"/>

    </block>

    <block name="test yaw">

      <go wp="p1"/>

      <for var="i" from="1" to="16">

        <heading alt="WaypointAlt(WP_p1)" course="90 * $i" until="stage_time > 3"/>

      </for>

      <deroute block="Standby"/>

    </block>

    <block name="circle CAM" pre_call="nav_set_heading_towards_waypoint(WP_CAM)">

      <circle radius="nav_radius" wp="CAM"/>

    </block>

-->

    <block name="land here" strip_button="Land Here" strip_icon="land-right.png">

      <call fun="NavSetWaypointHere(WP_TD)"/>

    </block>

    <block name="land">

      <go wp="TD"/>

    </block>

    <block name="flare">

      <exception cond="NavDetectGround()" deroute="Holding point"/>

      <exception cond="!nav_is_in_flight()" deroute="landed"/>

      <call fun="NavStartDetectGround()"/>

      <stay climb="nav_descend_vspeed" vmode="climb" wp="TD"/>

    </block>

    <block name="landed">

      <attitude pitch="0" roll="0" throttle="0" vmode="throttle" until="FALSE"/>

    </block>

  </blocks>

</flight_plan>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]