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
LIRC not connecting with pypilot_hat
#31
It should be 'sudo systemctl stop pypilot_hat' not 'sudo systemctl pypilot_hat stop'
Reply
#32
A quick update on this subject: I have abandoned using LIRC and now have an Adafruit LoRa RF remote control system with the outputs wired direct to the Pi GPIO pins. This works well and the LoRa modules have a range of 2Km which opens up the possibility of getting my boat to return to me if I fall overboard. However, I am still having compatabvility issues with the latest version of OpenCPN (5.6.0) and the latest version of Pypilot (0.34). I keep getting loss of connection between the OpenCPN plugin and Pypilot. I am also having problems getting the IMU to calibrate properly. To try and find what the problem is I stopped Pypilot and ran it from the command prompt. This is the result:

pi@openplotter:~ $ sudo systemctl stop pypilot
pi@openplotter:~ $ pypilot
autopilot start 6633.173812211
world magnetic model not available
ERROR loading wind.py cannot import name 'HeadingOffset' from 'pypilot.autopilot' (/usr/local/lib/python3.7/dist-packages/pypilot/autopilot.py) cannot import name 'HeadingOffset' from 'pypilot.autopilot' (/usr/local/lib/python3.7/dist-packages/pypilot/autopilot.py)
imu process 16539
nmea process 16543
listening on port 20220 for nmea connections
loading servo calibration /home/pi/.pypilot/servocalibration
WARNING: using default servo calibration!!
gps process 16547
Available Pilots: ['absolute', 'simple', 'basic', 'basic2', 'basic3']
warning: failed to open special file /dev/watchdog0 for writing
cannot stroke the watchdog
made imu process realtime
Using settings file RTIMULib.ini
Settings file RTIMULib.ini loaded
Detected MPU9250/MPU9255 at standard address
Using fusion algorithm Kalman STATE4
IMU Name: MPU-925x
min/max compass calibration not in use
Using ellipsoid compass calibration
Using accel calibration
pypilotServer process 16550
server setup has 5 pipes
autopilot init complete 6633.604685507
servo probe ('/dev/ttyAMA0', 38400) 6633.610964544
too long write pipe 0.028944730758666992 pypilotServer pipe4[1] 22
autopilot iteration running too slow 0.0897322399996483
autopilot iteration running too slow 0.0743541109995931
server add socket ('127.0.0.1', 53156)
arduino servo found ['/dev/ttyAMA0', 38400]
serialprobe success: /home/pi/.pypilot/servodevice ['/dev/ttyAMA0', 38400]
sensor found rudder servo /dev/ttyAMA0
MPU-925x init complete
autopilot iteration running too slow 0.10797744399951625
autopilot iteration running too slow 0.08055068500016205
server add socket ('127.0.0.1', 53158)
imu rate set to rate 20
setting initial gyro bias [-0.218, -2.053, 0.884]
sensor found gps tcp GNsocket0
EEPROM SIGNATURE ok
sensor found wind tcp WIsocket0
server add socket ('127.0.0.1', 53160)
gpsd connected
GPSD devices []
Traceback (most recent call last):
File "/usr/local/bin/pypilot", line 11, in <module>
load_entry_point('pypilot==0.34', 'console_scripts', 'pypilot')()
File "/usr/local/lib/python3.7/dist-packages/pypilot/autopilot.py", line 467, in main
ap.iteration()
File "/usr/local/lib/python3.7/dist-packages/pypilot/autopilot.py", line 349, in iteration
self.sensors.poll()
File "/usr/local/lib/python3.7/dist-packages/pypilot/sensors.py", line 357, in poll
self.nmea.poll()
File "/usr/local/lib/python3.7/dist-packages/pypilot/nmea.py", line 420, in poll
self.read_process_pipe()
File "/usr/local/lib/python3.7/dist-packages/pypilot/nmea.py", line 348, in read_process_pipe
self.sensors.write(name, msgs[name], 'tcp')
File "/usr/local/lib/python3.7/dist-packages/pypilot/sensors.py", line 385, in write
self.sensors[sensor].write(data, source)
File "/usr/local/lib/python3.7/dist-packages/pypilot/sensors.py", line 44, in write
self.update(data)
File "/usr/local/lib/python3.7/dist-packages/pypilot/sensors.py", line 201, in update
self.filtered.update(data)
File "/usr/local/lib/python3.7/dist-packages/pypilot/gps_filter.py", line 251, in update
s = vd / wd
NameError: name 'vd' is not defined
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python3.7/multiprocessing/popen_fork.py", line 28, in poll
pid, sts = os.waitpid(self.pid, flag)
File "/usr/local/lib/python3.7/dist-packages/pypilot/autopilot.py", line 205, in cleanup
raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
closing autopilot
pi@openplotter:~ $

Could this just be a problem with the pypilot configuration files?
Reply
#33
I am sorry there was an error in the code you managed to hit.

I have corrected the problem if you can pull with git.
Reply
#34
Hi Sean, many thanks for such a quick response. Do I need to do a full re-install of Pypilot? ie:

git clone https://github.com/pypilot/pypilot
git clone --depth 1 https://github.com/pypilot/pypilot_data
cp -rv pypilot_data/* pypilot
cd pypilot
python setup.py build
sudo python setup.py install
Reply
#35
cd pypilot
then you can just use "git pull"

From there
sudo python3 setup.py install
Reply
#36
(2022-04-13, 04:05 AM)esm Wrote:
(2022-04-13, 01:35 AM)seandepagnier Wrote: nothing is shown if you press keys on the remote?

Yes that is correct, nothing shows up

Hi Sean, I tried your suggestion to no avail.  I installed tinypilot on another sd card and put the hat on a pi2, and tried the remote there, and the blue light comes on but nothing is read in the software.  I am not sure what is going on whether it is a bad hat, or a software bug.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)