This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rudder calibration not working
#9
I spent some more time on this today and followed these steps:

1. calibrate the rudder using the android app. Seems to work.
2. sudo sv d pypilot
3. use nano to edit the config file to set the slew and max current settings.
4. use filetool to save the changes
5. reboot the pypilot
6. view the pypilot.conf file to check the new settings are still there. GREAT... It is still correct.
7. Try turning the wheel from side to side by hand. STRANGE... no MAX_RUDDER indication on the pypilot.
8. Look in the android app to see if there's a MAX_RUDDER indication there (that's where I saw it before and I wasn't sure if it would display on the tinypilot itself).
9. Look at the web app. No MAX_RUDDER indication there either.
9. Go back and check the pypilot.conf file. OH SH*&&T. All the settings have been messed up again. slew has been set to 98 and rudder.scale has been set to 0.0!

At no point did I edit the settings in any of the apps except clicking the Level, Centre, Port limit and Starboard Limit buttons on the android app. After doing that, the calibration was correctly set and I verified that the other settings were not corrupted. I never changed any settings after that but somehow the old broken settings came back. Considering that the pilot had been rebooted I can't see how it could have kept those settings, therefore one of the front ends must be saving the settings and writing them back to the pilot later. This is rather a major problem! Not only the rudder calibration issue but also the MAX_CURRENT overload issue (which i thought was separate) come back to the same thing I think - I set the settings to something sane, confirm they have been stored, then something else comes and puts crazy settings in!

Code:
tc@box:/mnt/mmcblk0p2/.pypilot$ sudo sv d pypilot
tc@box:/mnt/mmcblk0p2/.pypilot$ nano pypilot.conf
tc@box:/mnt/mmcblk0p2/.pypilot$ cd ..
tc@box:~$ more .pypilot/pypilot.conf
{"ap.mode":"compass","ap.DD":0.057,"ap.D":0.122,"servo.position.i":0.01,"ap.I":0.0026,"servo.current.offset":-0.04,"ap.FF":0.315,"ap.pilot.basic.D2":0,"servo.min_speed":1.0,"ap.pilot.basic.PR":0.00845,"ap.P":0.002,"servo.rudder.offset":14.5,"ap.pilot.simple.D":0.15,"rudder.scale":-5.33546,"imu.compass.calibration.locked":false,"imu.rate":10,"wind.offset":0,"servo.voltage.factor":1.0,"servo.rudder.nonlinearity":0.01208,"servo.gain":1.0,"imu.accel.calibration.locked":true,"ap.pilot.simple.I":0,"servo.max_slew_slow":15,"ap.PR":0.01865,"servo.max_slew_speed":2,"servo.voltage.offset":-0.01,"ap.pilot.basic.D":0.095,"ap.pilot.basic.DD":0.087,"ap.pilot.basic.I":0,"ap.pilot.learning.P":0.001,"ap.pilot.simple.P":0.005,"imu.accel.calibration":[[0.01013,0.0084,0.09832,1.00002],[0.01125,0.0]],"servo.max_speed":0.5,"rudder.offset":-15.14039,"servo.disengauge_on_timeout":true,"imu.compass.calibration":[[41.34512,4.05293,-25.79864,44.26564,63.15503],[0.01934,0.5999],3],"servo.max_motor_temp":73,"servo.position.p":0.27334,"rudder.nonlinearity":0.0,"servo.max_current":18,"servo.compensate_current":false,"servo.speed_gain":0,"ap.pilot.basic.R":0,"imu.heading_offset":180.0,"servo.position.d":0.082,"servo.current.factor":1.0,"servo.rudder.range":23,"servo.amp_hours":8.46651,"ap.tack.count":0,"ap.pilot.learning.D":0.03,"ap.pilot.basic.FF":0.5,"imu.accel.calibration.age":1528747420.86532,"imu.compass.calibration.age":1528747526.23479,"ap.pilot.basic.P":0.00342,"servo.compensate_voltage":false,"servo.period":0.4,"imu.gyrobias":[0.579,1.42336,0.09655],"ap.D2":0.0,"imu.alignmentQ":[0.0,0.0098,0.70557,0.70857],"servo.max_controller_temp":73,"rudder.range":31.0}
c@box:~$ filetool.sh -b
Backing up files to /mnt/mmcblk0p2/tce/mydata.tgz|
Done.
tc@box:~$ sudo reboot
tc@box:~$ Connection to 192.168.14.1 closed by remote host.
Connection to 192.168.14.1 closed.
chrismp:~ chris$ ssh tc@192.168.14.1
tc@192.168.14.1's password: 
tinypilot is a Sailboat Autopilot Distribution for raspberry pi

   ( '>')
  /) TC (\   Core is distributed with ABSOLUTELY NO WARRANTY.
 (/-_--_-\)           www.tinycorelinux.net

tc@box:~$ more .pypilot/pypilot.conf
{"ap.mode":"compass","ap.DD":0.057,"ap.D":0.122,"servo.position.i":0.01,"ap.I":0.0026,"servo.current.offset":-0.04,"ap.FF":0.315,"ap.pilot.basic.D2":0,"servo.min_speed":1.0,"ap.pilot.basic.PR":0.00845,"ap.P":0.002,"servo.rudder.offset":14.5,"ap.pilot.simple.D":0.15,"rudder.scale":-5.33546,"imu.compass.calibration.locked":false,"imu.rate":10,"wind.offset":0,"servo.voltage.factor":1.0,"servo.rudder.nonlinearity":0.01208,"servo.gain":1.0,"imu.accel.calibration.locked":true,"ap.pilot.simple.I":0,"servo.max_slew_slow":15,"ap.PR":0.01865,"servo.max_slew_speed":2,"servo.voltage.offset":-0.01,"ap.pilot.basic.D":0.095,"ap.pilot.basic.DD":0.087,"ap.pilot.basic.I":0,"ap.pilot.learning.P":0.001,"ap.pilot.simple.P":0.005,"imu.accel.calibration":[[0.01013,0.0084,0.09832,1.00002],[0.01125,0.0]],"servo.max_speed":0.5,"rudder.offset":-15.14039,"servo.disengauge_on_timeout":true,"imu.compass.calibration":[[41.34512,4.05293,-25.79864,44.26564,63.15503],[0.01934,0.5999],3],"servo.max_motor_temp":73,"servo.position.p":0.27334,"rudder.nonlinearity":0.0,"servo.max_current":18,"servo.compensate_current":false,"servo.speed_gain":0,"ap.pilot.basic.R":0,"imu.heading_offset":180.0,"servo.position.d":0.082,"servo.current.factor":1.0,"servo.rudder.range":23,"servo.amp_hours":8.46651,"ap.tack.count":0,"ap.pilot.learning.D":0.03,"ap.pilot.basic.FF":0.5,"imu.accel.calibration.age":1528747420.86532,"imu.compass.calibration.age":1528747526.23479,"ap.pilot.basic.P":0.00342,"servo.compensate_voltage":false,"servo.period":0.4,"imu.gyrobias":[0.579,1.42336,0.09655],"ap.D2":0.0,"imu.alignmentQ":[0.0,0.0098,0.70557,0.70857],"servo.max_controller_temp":73,"rudder.range":31.0}
tc@box:~$ more .pypilot/pypilot.conf
{"ap.mode":"compass","ap.DD":0.057,"ap.D":0.122,"ap.I":0.0026,"servo.current.offset":-0.04,"ap.FF":0.315,"ap.pilot.basic.D2":0,"servo.min_speed":1.0,"ap.pilot.basic.PR":0.00845,"ap.P":0.002,"servo.rudder.offset":14.5,"servo.voltage.offset":-0.01,"rudder.scale":0.0,"imu.compass.calibration.locked":false,"imu.rate":10,"wind.offset":0,"servo.rudder.range":23,"servo.rudder.nonlinearity":0.01208,"servo.gain":1.0,"imu.accel.calibration.locked":true,"ap.pilot.simple.I":0,"servo.max_slew_slow":98.82353,"imu.gyrobias":[0.60723,1.39194,0.10669],"ap.PR":0.01865,"rudder.offset":0.0,"ap.pilot.simple.D":0.15,"ap.pilot.basic.D":0.095,"ap.pilot.basic.I":0,"ap.D2":0.0,"ap.pilot.simple.P":0.005,"imu.accel.calibration":[[0.01013,0.0084,0.09832,1.00002],[0.01125,0.0]],"servo.max_slew_speed":98.82353,"servo.disengauge_on_timeout":true,"servo.position.p":0.27334,"servo.max_motor_temp":73,"imu.compass.calibration":[[41.34512,4.05293,-25.79864,44.26564,63.15503],[0.01934,0.5999],3],"rudder.nonlinearity":0.0,"servo.max_controller_temp":73,"servo.max_current":20.52,"servo.compensate_current":false,"servo.speed_gain":0,"ap.pilot.basic.R":0,"servo.position.i":0.01,"servo.position.d":0.082,"servo.current.factor":1.0,"servo.voltage.factor":1.0,"servo.amp_hours":8.46651,"ap.tack.count":0,"ap.pilot.learning.D":0.03,"ap.pilot.basic.FF":0.5,"imu.accel.calibration.age":1528747420.86532,"imu.compass.calibration.age":1528747526.23479,"ap.pilot.basic.P":0.00342,"servo.compensate_voltage":false,"servo.period":0.4,"servo.max_speed":1.0,"ap.pilot.learning.P":0.001,"imu.alignmentQ":[0.0,0.0098,0.70557,0.70857],"ap.pilot.basic.DD":0.087,"rudder.range":31.0,"imu.heading_offset":180.0}
Reply


Messages In This Thread
Rudder calibration not working - by syohana - 2019-07-20, 10:16 PM
RE: Rudder calibration not working - by syohana - 2019-07-21, 11:04 PM
RE: Rudder calibration not working - by syohana - 2019-07-22, 08:50 PM
RE: Rudder calibration not working - by syohana - 2019-07-22, 10:15 PM
RE: Rudder calibration not working - by syohana - 2019-07-23, 12:16 AM
RE: Rudder calibration not working - by syohana - 2019-07-24, 08:23 PM
RE: Rudder calibration not working - by syohana - 2019-07-24, 10:12 PM
RE: Rudder calibration not working - by syohana - 2019-07-29, 11:27 PM
RE: Rudder calibration not working - by syohana - 2019-08-01, 12:12 AM
RE: Rudder calibration not working - by syohana - 2019-08-10, 10:44 AM
RE: Rudder calibration not working - by syohana - 2019-08-10, 11:11 PM
RE: Rudder calibration not working - by syohana - 2019-09-14, 09:26 PM
RE: Rudder calibration not working - by syohana - 2019-09-15, 12:17 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)