chromvis

  • *
  • 117
Re: Port Tau Labs Autotune to LP
« Reply #75 on: June 29, 2016, 09:48:36 pm »

- In my experience, "falling" is usually caused by a bad motor wire or connector.  Randomly the vibration will make the connection be open some times and then it falls because it can't stabilize, because the disabled motor goes to 100% and the other motors go to zero.


Brilliant analysis. That is exactly what happened. I suspected something like that and yesterday checked power assembly. I was using 2mm bullet connectors (should have just solder) and they are notorious to be loose although I tested each pair before soldering, one pair appears to to have some axial freedom. I replaced it and use 50x40x3 props instead of 60x40x2. Autotune went through OK, but 5 inch props are to small for 280 frame and 700 g. Quad feels slow, if hovers at about 50% throttle but even at most agile setup not too responsive.
In Basic tab on Bank 2 already at 50% SmoothQuick slider position Pitch and Yaw sliders show red warnings on P and I, so it is definitely to weak with these props.
I will do some more testing today. I want to set Loging for actual and desired pitch, Roll and Yaw using OPLink. Would appreciate recommendations which parameters to include in log set. As I understand, I have to create set in Tools>Options>scopes and mark "log data to csv file" box. It seems like system start loging instantly. Is it possible to trigger log by arming command?

Re: Port Tau Labs Autotune to LP
« Reply #76 on: June 30, 2016, 07:24:56 am »
Quote
Quad feels slow, if hovers at about 50% throttle but even at most agile setup not too responsive.
In Basic tab on Bank 2 already at 50% SmoothQuick slider position Pitch and Yaw sliders show red warnings on P and I, so it is definitely to weak with these props.
You need to use the advanced page.  You will see that the MaxRateLimit is 300 degrees per second and that must be increased if you want to flip faster than that.  AutoTune sometimes makes PIDs that previously were considered radical.  If you decide to try them and they fly fine, you could consider keeping them.

Quote
I will do some more testing today. I want to set Loging for actual and desired pitch, Roll and Yaw using OPLink. Would appreciate recommendations which parameters to include in log set. As I understand, I have to create set in Tools>Options>scopes and mark "log data to csv file" box. It seems like system start loging instantly.
If you have telemetry, I would recommend that you log the telemetry as receive by the GCS (laptop).  Tools -> StartLogging.
Assuming you are wanting to debug Rate mode flight:
RateDesired is what you have commanded it to do.
GyroState is what is actually happening.
These are both in degrees per second, so they are easily comparable.

chromvis

  • *
  • 117
Re: Port Tau Labs Autotune to LP
« Reply #77 on: July 03, 2016, 05:12:21 am »
OK. I fix motor-to-ESC connections, but got another problem with magnetometers. It seems like they got completely crazy. I calibrated them using OPLink far from any interference, system shows "calibration successful" and there seems to be no way to synchronize them with Roll/pitch/yaw rotation bars. With some time magnetometer error increases and I had to recalibrate them again, I gave up and reflush firmware and using no GPS settings - everything is OK (although on-board mag still fluctuates around 10% error).
Run autotune - no problem. At aggressive SmoothQuick slider position quad jerking a bit and Yaw get into red warning zone.
I tried to visualize tuning by setting RateDesired and GyroState to 100 ms logging, It seems to be working, at least I got 74Kb .opl file, but I could not fine the way to read it. I searched in manual, forum, Google and there are no info on how to work with GCS log file.
So, two questions: 1. how to check if magnetometer is OK? any software allowing mag verification?
                            2. How to replay and analyse GCS .opl files?

 

Re: Port Tau Labs Autotune to LP
« Reply #78 on: July 03, 2016, 08:23:21 pm »
OK. I fix motor-to-ESC connections, but got another problem with magnetometers. It seems like they got completely crazy. I calibrated them using OPLink far from any interference, system shows "calibration successful" and there seems to be no way to synchronize them with Roll/pitch/yaw rotation bars. With some time magnetometer error increases and I had to recalibrate them again, I gave up and reflush firmware and using no GPS settings - everything is OK (although on-board mag still fluctuates around 10% error).
Run autotune - no problem. At aggressive SmoothQuick slider position quad jerking a bit and Yaw get into red warning zone.
I tried to visualize tuning by setting RateDesired and GyroState to 100 ms logging, It seems to be working, at least I got 74Kb .opl file, but I could not fine the way to read it. I searched in manual, forum, Google and there are no info on how to work with GCS log file.
So, two questions: 1. how to check if magnetometer is OK? any software allowing mag verification?
                            2. How to replay and analyse GCS .opl files?

I don't recall you saying what kind of mag you are using.  If you are using an aux mag then:
- Both GPS/mag and FC must be mounted in the vehicle (or at least mounted to each other in the correct orientation).  If not, then the GPS/mag says it is pointing one direction and the FC says another (even just from motion and gyros) and it gets confused.
- It must be mounted with the correct direction forward.
- If it is an I2C aux mag like on a cheap PixHawk GPS/mag, you must set AuxMagSettings.BoardRotation like the wiki tells you to do.

Crazy Attitude (as seen on GCS Flight : PFD / HUD) with an aux mag is usually one of these.

https://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration

chromvis

  • *
  • 117
Re: Port Tau Labs Autotune to LP
« Reply #79 on: July 03, 2016, 09:29:53 pm »
AuxMag is that "cheap" PixHawk" (although it works on PixFalcon), sturdy mount in correct orientation (Pitch 180).
Mag and GPS is not a big deal - I set them off (complimentary basic mode), I could not find the way to read or replay or anyhow visualize log files (.opl). Gould you give any clues?
« Last Edit: July 04, 2016, 05:52:08 am by chromvis »

Re: Port Tau Labs Autotune to LP
« Reply #80 on: July 06, 2016, 12:44:14 am »
Then you must adjust AuxMagSettings.BoardRotation as described in the wiki.

You play back the OPL file by using the "Connections" drop down (lower left) to select logfile replay and then pressing Connect and it will bring up a file selection dialog.

chromvis

  • *
  • 117
Re: Port Tau Labs Autotune to LP
« Reply #81 on: July 06, 2016, 07:37:11 am »
BoardRotation is OK. I think, I solve this problem, seems to be a combination of neo M8N + mag sensor - I replaced it with old M7N - and calibration. I was using OPLink for calibration (as you recommended somewhere else) but 3 sec stop in each position was not enough. There seems to be significant delay in transmission when using OpLink (e.g. bars on calibration tabs are moving much slower. I had to delay for 10 sec in each position. Copter seems to respond correct in INS13 mode in VelocityRoam, even varying PID with SmoothQuick are OK, although I tested it briefly, just to make sure it fly fine.
Going through this GPS and mag trouble I feel I lost confidence in GPS assisted mode (I similarly lost it for APM before), but today I happen to find "https://forum.librepilot.org/index.php?topic=15.msg38#msg38" - very good text, you should add it into Manual. So I want to make sure copter fly perfectly stable with solid feel and I need to check vibrations, response delay times etc. before going to use GPS and mag.
Hwh already gave me this clue on playback .OPL files, but he mention that there is a bug, not sute what type.
Is it pissible to pause playback? are there any additional controls?

Re: Port Tau Labs Autotune to LP
« Reply #82 on: July 18, 2016, 06:13:18 am »
AutoTune on Nano: Has anyone successfully tuned a Nano with any version of LP AutoTune?  I am having problems with my Nano 330 but not my Sparky2 500.

NANs (not a number) were being generated and making it out to the PIDs.  If that happens, the PIDs in that bank all show as 99.9999.  (The latest code avoids writing the PIDs in that case, but earlier code did write them.)