Pypilot - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1) +--- Forum: Feature Requests (https://forum.openmarine.net/forumdisplay.php?fid=5) +--- Thread: Pypilot (/showthread.php?tid=611) |
RE: Pypilot - seandepagnier - 2017-07-11 (2017-07-10, 06:23 PM)Sailoog Wrote: It is important for us that we could use more than one IMU model. Despite being optimized for MPU-9255, it seems to me that I am getting good result with LSM9DS0.I have no way of judging just from the calibration. If you get good compass readings maybe it's good? Quote:I have already an idea to implement pypilot to openplotter. The plan is to fully implement pypilot in 2 steps. You can look at the source code to any script that uses the SignalkClient class... You can watch certain values. It will then receive updates when they change. Alternately you can poll the values if you don't need as fast a rate, it can save some bandwidth. The autopilot runs at 10hz by default, but could run faster. Quote:Seconf I will add a tool "Autopilot" for the rest of scripts. I will do this when I get the hardware. What deviations? You can certainly reajust the autopilot gains from a client. This is what the autogain client does. Eventually I might implement all kinds of autofiltering etc, but for now, manually tuning the P and D gains isn't that hard and gives good results. RE: Pypilot - Sailoog - 2017-08-06 The first implementation of pypilot is in the wild on OP 0.14.3!!!! I have just implemented the compass part and it is working right, waiting for users feedback. Thanks a lot. When Compass is enabled, processing is 26% on Raspberry 3, do you think that could be optimized? RE: Pypilot - Sailoog - 2017-08-06 This is the documentation for pypilot compass https://sailoog.gitbooks.io/openplotter-documentation/content/en/compass.html RE: Pypilot - Sailoog - 2017-08-08 Do you have plans to internationalize code? RE: Pypilot - seandepagnier - 2017-08-10 (2017-08-08, 07:04 PM)Sailoog Wrote: Do you have plans to internationalize code? Yes. The lcd interface already is. As for processing power at 25%... Is this with the calibration locked? Otherwise the calibration process runs periodically, every few minutes and uses a lot of cpu. Good to see OP has pypilot supported, I will try to test it. I have tested the autopilot with success on other boats now, it is working well. RE: Pypilot - Sailoog - 2017-08-11 (2017-08-10, 08:38 PM)seandepagnier Wrote:(2017-08-08, 07:04 PM)Sailoog Wrote: Do you have plans to internationalize code? Yes, it is locked but still at 25% I use: Code: while True: RE: Pypilot - waterman480 - 2017-08-11 read_sensors_d.py is killing me. Even if I remove all the sensors and restart, it is still ties up one proc at 100%. (Not to mention turning the Pi into a small heater) ;-) RE: Pypilot - lordzahl - 2017-08-12 Code: while True: 25% usage sounds like one of the four raspberry pi cores is completely blocked. And looking at the code, this makes sense. The while does not sleep at all, if IMURead and HandleRequests are faster than 0.1 second. I guess the other way around was meant? if dt < .1: time.sleep(dt) Still i find the variable sleep time amount weird. Maybe time.sleep(.1-dt) makes more sense? Therefore IMURead() and HandleRequest are only called at most every .1 seconds. Sorry, but i am not able to test this at the moment. RE: Pypilot - waterman480 - 2017-08-12 25% usage sounds like one of the four raspberry pi cores is completely blocked. And looking at the code, this makes sense. The while does not sleep at all, if IMURead and HandleRequests are faster than 0.1 second. I guess the other way around was meant? if dt < .1: time.sleep(dt) Still i find the variable sleep time amount weird. Maybe time.sleep(.1-dt) makes more sense? Therefore IMURead() and HandleRequest are only called at most every .1 seconds. ______________________________ Testing the first change, read_sensors_d goes from 100% of one core to ~35%, adding in the second change brings it down to ~1%. No adverse effects on the visible sensor response. Sean, any adverse effects on pypilot calculations? RE: Pypilot - seandepagnier - 2017-08-14 (2017-08-12, 03:54 PM)waterman480 Wrote: 25% usage sounds like one of the four raspberry pi cores is completely blocked. And looking at the code, this makes sense. The while does not sleep at all, if IMURead and HandleRequests are faster than 0.1 second. Sorry, you fixed it the correct way. This is a demo script that tests only the imu, not the complete autopilot. The autopilot implementation doesn't have the bug. openplotter should either run the complete autopilot, or have an option to select either boatimu, or autopilot. |