2021-04-02, 04:05 PM
(2021-04-02, 01:42 AM)seandepagnier Wrote: I don't think using a remote imu is a good idea or intended because of the lag between reading the sensors and reacting with the motor.
Still, it's what I want to try; if the IMU refresh rate is 100ms I don't mind losing a few millisecs on wifi pingtime. I think I can get boatimu connect to a remote pypilot through configuration of pypilot_client.conf and similar changes (below), but I can't test it now yet. I'll let you know the results, positive or negative.
Code:
pi@openplotter:/usr/local/lib/python3.7/dist-packages/pypilot-0.23-py3.7-linux-armv7l.egg/pypilot $ diff ~/pypilot/pypilot boatimu.py
37,39c38,42
< self.client = pypilotClient(server)
< self.multiprocessing = server.multiprocessing
< if self.multiprocessing:
---
> self.client = pypilotClient()
> #self.multiprocessing = server.multiprocessing
> if False:
310c313
< if True:
---
> if False:
316c319,320
< self.client = pypilotClient(server)
---
> self.client = pypilotClient()
342c346,347
< self.auto_cal = AutomaticCalibrationProcess(client.server)
---
> self.auto_cal = AutomaticCalibrationProcess(client)
365c370
< self.imu = IMU(client.server)
---
> self.imu = IMU(client)
386c391,392
< if self.imu.multiprocessing:
---
> if False:
396c402,403
< if not self.imu.multiprocessing:
---
> if False:
516c523,524
< client = pypilotClient(server)
---
> client = pypilotClient()