LibrePilot Forum

Users => Applications - Autonomous Flight => Topic started by: xrxpercy on June 21, 2018, 01:42:40 am

Title: GCS Circle Waypoint
Post by: xrxpercy on June 21, 2018, 01:42:40 am
I have used the Path Planner and loaded and flew a path with multiple waypoints.  It works well, however when I set a circle waypoint with Yaw control pointing to center POI, The quad makes multiple circles and never goes to the next waypoint.  Anybody know why.
Title: Re: GCS Circle Waypoint
Post by: TheOtherCliff on June 21, 2018, 03:22:29 am
That may not be well tested in releases since it was coded.

You might try a larger circle.  It would work better if your PathFollower is not particularly well tuned.

Do any other yaw options work better?
Title: Re: GCS Circle Waypoint
Post by: xrxpercy on June 21, 2018, 11:51:58 am
I'll check and report back.
Title: Re: GCS Circle Waypoint
Post by: f5soh on June 21, 2018, 06:39:07 pm
Did you setup a End condition ? Without this the vehicle stay in circle mode.
EndCondition will be set to "PointingTowardsNext" or simply "Timeout" and condition set to "On Condition Next Wp"

(https://forum.librepilot.org/index.php?action=dlattach;topic=4333.0;attach=7576)

(https://forum.librepilot.org/index.php?action=dlattach;topic=4333.0;attach=7570)

(https://forum.librepilot.org/index.php?action=dlattach;topic=4333.0;attach=7572)

(https://forum.librepilot.org/index.php?action=dlattach;topic=4333.0;attach=7574)

Title: Re: GCS Circle Waypoint
Post by: xrxpercy on June 30, 2018, 01:33:42 am
Ok,  Thanks for the great tips on circle waypoint.  I tried setting the end condition pointing toward next, but it still wants to make multiple circles. I've attached my waypoint editor file.  Am I doing something wrong?  Also, my waypoint editor does not look like yours, even when I click the star at top right which opens details box.  How did you get verbose details?
Title: Re: GCS Circle Waypoint
Post by: f5soh on June 30, 2018, 10:29:09 am
Seems you did not set the value for the angular margin for the "pointing toward next" end condition.
Same for last Wp and his timeout value in seconds.

Verbose editor is implemented while using the next branch.
Title: Re: GCS Circle Waypoint
Post by: xrxpercy on July 05, 2018, 12:09:47 pm
I installed "Next" and now have the verbose details on Path Planner, which I'm sure will be very helpful.  Thanks for the info.  Since I changed to "NEXT" I redid the entire setup wizard, with a full erase, and now I notice 2 problems that I didn't have before.
1. I get a double initialization tone when plugging in the battery.
2. I seem to get a slow loss of altitude in Position Hold.
These 2 have precluded me from further testing of Path Planner Circle waypoints as I don't want to risk doing that until the quad is flying as good as before.  Problem 1 may not be a problem at all, but 2 concerns me.
Title: Re: GCS Circle Waypoint
Post by: TheOtherCliff on July 05, 2018, 04:15:41 pm
#1 are you running the same ESC protocol as before?
#2 you need to run Thermal Calibration so that baro does not drift as it warms up.
Title: Re: GCS Circle Waypoint
Post by: xrxpercy on July 05, 2018, 06:52:33 pm
1. I think the 13.09 firmware only gave me a "Rapid" ESC option.  Now I've selected "oneshot 125", so that's a different ESC protocol.
2. No I didn't do the thermal calibration.  I've also discovered that I have a China Revo clone and it has a counterfeit barometer.  It's easy to see the difference.  The Swedish one has good quality stainless steel and good engraving.  When brought near a magnet the Chinese one jumps to the magnet.  The Chinese one works but shows about 1.5 meter fluctuations on the scope. I'm thinking about trying to swap it without damaging the Revo.  If I do, I'll run a thermal calibration and report how a genuine barometer works.
Title: Re: GCS Circle Waypoint
Post by: TheOtherCliff on July 05, 2018, 10:02:28 pm
New ESC protocol may be source of two beeps on startup.

If you have altitude drift you really need to run thermal calibration.  I would not replace "bad baro" FC until I had tested it after calibration.  Bad baro drifts up and down slightly.  Yours only drifts down.
Title: Re: GCS Circle Waypoint
Post by: xrxpercy on July 19, 2018, 02:00:15 am
Sorry for the delay in replying.  I did replace my barometer with a new one from Digikey.  It seems to be a little tighter in resolution, about a third of a meter better.  I then did a thermal calibration and ran the path planner plan with the circle and the correct end conditions.  It ran correctly, however higher than I had planned.  Now I have 2 new problems, one of which I caused when changing the barometer.  The scope display scale of my altitude is no where near my home location altitude.  Much, much higher. 5400 meters higher.  I accidentally removed solder pad 5 from the Revo FC board while cleaning it.  So my pin 5 is floating but I closely examined the board and it looks like pin 5 is supposed to be floating. Sould I connect Pin 5 to VCC or GND, or leave it float?
The other problem is that I get occasional Event alarms which the description of which says "UAV Object Events or Callbacks"  Didn't seem to mess up the flight though.

Title: Re: GCS Circle Waypoint
Post by: TheOtherCliff on July 19, 2018, 05:46:52 am
Generally the baro noise is actually a power (voltage regulator) problem.  They use a substitute regulator without changing a capacitor that needs to be a different value for the substitute.

Also, the baro must be an exact part match.

Also, I recall reading that you must wait a couple days (!) even after correct temperature soldering for the baro calibration to come back to spec.  Read up on this as it is the least expensive problem.

Also, I suspect that soldering heat is an issue.

Thermal calibration and shielding the baro from light should be considered requirements, and if the GCS baro scope (altitude in m) shows say more than +- 0.75m noise you should remove the capacitor in question.

+- 0.5m baro noise doesn't hurt as much as you would think because there is effectively some averaging of the data.  It really will lock in with very little vertical motion.
Title: Re: GCS Circle Waypoint
Post by: xrxpercy on July 19, 2018, 05:02:22 pm
Yes, The baro I installed is a exact part match, but you may have something concerning the heat from soldering.  I may easily have used too much heat.  I heated up the board itself directly below the baro with a high wattage iron until it soldered itself.  I already have removed that capacitor from the voltage regulator circuit.  Any thought as to what causes Event alarms?
Title: Re: GCS Circle Waypoint
Post by: TheOtherCliff on July 20, 2018, 06:13:55 am
It depends on which alarm it is.
System -> DataObjects -> SystemAlarms -> *

Do you have an OpGpsV9 or an I2C mag?
Title: Re: GCS Circle Waypoint
Post by: f5soh on July 23, 2018, 07:01:24 am
Quote
Any thought as to what causes Event alarms?
Event alarm comes from Throttled UAVOs.
As a workaround you can fix this alarm moving some critical (fast) uavos from Throttled :
(https://forum.librepilot.org/index.php?action=dlattach;topic=4333.0;attach=7663)

to Periodic :
(https://forum.librepilot.org/index.php?action=dlattach;topic=4333.0;attach=7661)

setting the [FlightUpdateOnChange] to 0
Title: Re: GCS Circle Waypoint
Post by: xrxpercy on July 29, 2018, 02:21:15 am
Thanks you f5soh for the fix for event alarms.  It did work and stopped the alarms however I was still unable to resolve my BARO issues, which I caused by replacing it.  I must have damaged the FC board with too much heat.  I'll never do that again.  I have bought a new FC and set it up including thermo calibration and it's flying great.  The circle waypoints are working as well.  The verbose descriptions are a great help with the waypoint editor.  The only little thing I see that doesn't seem quite right is that my BARO altitude reading on the scope are low.  When I first received the FC and before setting it up I looked at the BARO scope reading and it was almost exactly the same as my location, 330 Meters.  Now after a complete setup it shows 266 Meters.  The GPS is reporting 333 Meters altitude.  It didn't seem to affect any flight characteristics but why are they no longer the same?
Title: Re: GCS Circle Waypoint
Post by: TheOtherCliff on July 29, 2018, 05:42:39 am
Two things about baro altitiude:
- It is all relative, it only really matters how much the altitude changes.  It doesn't matter if it changes from 330 to 340 or from 560 to 570.  They are both up 10 meters.  Any absolute altitude is basically based on GPS altitude (also inaccurate).
- It changes with the weather.  That is why you can't use absolute baro altitude from one day to fly the next day.

Baro altitude is better for short term, during a flight and to hold current altitude.  GPS altitude is more accurate from one day to another day, but can still vary 3 to 4 meters, so you best not use absolute altitudes that require better accuracy/precision than 4 meters.
Title: Re: GCS Circle Waypoint
Post by: xrxpercy on July 31, 2018, 02:40:48 am
I just discovered my new FC is reporting EVENT errors, but now I know for sure what is causing them.  When they were gone I had done f5soh's Throttled to Periodic fix but I had done them with the Telemetry connected via USB.  When I switch to OPLINK operation, then I get the EVENT errors.  So I set the Flight Mode settings back to default and the EVENT errors are gone when using USB Telemetry and come back as soon as OPLINK is used. I have the Revo set for 1.6 power level and the Coordinator set for 50.  I have tried setting the data link rate down to 57600 for both. No change. 
Title: Re: GCS Circle Waypoint
Post by: TheOtherCliff on July 31, 2018, 02:55:07 am
You need to increase the data rate at all points on both sides to get rid of those events.  For instance if using OpLink with CC3D, you need to increase air data rate on both OpLinks and also increase the FC to OpLink baud rate.  In this case in next (not 16.09), it is a good idea to keep air data rate about twice as high as baud rate.  In 16.09 this is done automatically since the air data rate is listed as baud rate and is automatically "doubled".

I would also run the same RF power on both ends.

You can also go through and disable a lot of unused telemetry data, but that is an advanced topic.
Title: Re: GCS Circle Waypoint
Post by: xrxpercy on July 31, 2018, 01:50:45 pm
SUCCESS.....Problem Solved...I set OPLINK and REVO FC air data rate to 128000 and both the EVENT alarms and Master Caution are gone when Telemetry is connected via OPLINK.
Thank you for the fix.