Posts: 28
Threads: 8
Joined: Dec 2019
Reputation:
0
So I had a working openplotter setup on a pi 4, Sean's hat, and a USB GPS so all devices are assumed to be operational as far as I know. I was feeling adventurous, so I wiped everything and started from scratch openplotter 4 beta. The install went great. Easiest I've ever had. I installed both the pypilot plugin and the route-plugin in Opencpn. However, when I start the pypilot client it seems to come up normal and shows a heading. When I engage autopilot, it says "IMU not initialized" briefly and then "IMU waiting on axes" and the AP button goes to red (disengaged). Any pointers?
Posts: 2,324
Threads: 21
Joined: Jun 2016
Reputation:
72
That is very odd, and indicates that one or more of the 9 sensors are not working. Is there any chance you could shake it around and see if there is any difference? Do you have a pi zero that you could test a tinypilot image?
Are you saying it was working before you wiped the sd card? Is it possible another application is trying to access the i2c bus?
Posts: 28
Threads: 8
Joined: Dec 2019
Reputation:
0
Sorry for the delay in responding. My boat had a serious mechanical issue that needed attention, so pypilot took a back seat. I was able to get back into it recently, and it turns out Sean had the right idea. I had another older hat with a failed display in my drawer and it did the same thing. In other words, two different hats on the same pi 4 had the "IMU not initialized" and "IMU waiting on axes" issue, even after reloading multiple times. As Sean suggested, I picked up a pi zero and everything worked perfectly. I put the pi 4 in my drawer and it will stay there until the winter when I can experiment and troubleshoot more. Not sure if I have a physical problem with the pi 4 or a configuration issue, but the mystery will remain unsolved until the snow flies.
By the way, this is my first experience with tinypilot and it is simple and brilliant. I installed OpenCPN on an android tablet and my android phone (the paid version of OpenCPN) and everything is working great. In fact, the simplicity of this setup for my small boat, coastal cruiser life, is probably the perfect solution for me right now. In reality, I still want to continue to understand and master openplotter and all its capabilities so I'll dig back into it in the winter.
Just wanted to provide an update to my issue in case others have a similar issue. Thanks for the pointer Sean, and as always, thanks for all your hard work on this amazing piece of technology.
Posts: 33
Threads: 3
Joined: Oct 2022
Reputation:
0
Hello everyone.
Excuse my bad English, but I use Google for translation.
I have exactly the same problem.
My configuration is:
Raspi 4 B 8 GB
IMU 9255
BME 280
GPS via USB/Serial adapter PL2023.
Arduino Nano.
OpenPlotter v4 Paisos Catalan
Pypilot works well and is stable on the ttyAMA0 connection as long as I do not activate the ttyUSB0 connection.
When I activate the ttyUSB0 connection, I receive the NMEA sentences perfectly on OpenCPN, but Pypilot drops out every 10 seconds or so. It is a regular cycle, the heading display goes to 00, the message “IMU waiting on axes” appears, Pypilot is disengaged, then the heading comes back and we can engage Pypilot again for 10 seconds, and so on. This is visible on the Nano LEDs, which miss a one-second exposure every 10 seconds or so.
I've been going around in circles on this problem for quite some time, I don't know what to do. Thanks for your help.
Lucien.
Posts: 33
Threads: 3
Joined: Oct 2022
Reputation:
0
One more clarification:
I discovered something this morning: Pypilot works fine, even with GPSD enabled as long as the GPS is not turned on. As soon as I turn it on, the stall cycle starts again. I will try to find another GPS to give it a try.
Posts: 28
Threads: 8
Joined: Dec 2019
Reputation:
0
(2024-08-09, 10:02 AM)Ebraball Wrote: One more clarification:
I discovered something this morning: Pypilot works fine, even with GPSD enabled as long as the GPS is not turned on. As soon as I turn it on, the stall cycle starts again. I will try to find another GPS to give it a try.
Interesting. I'm not sure if you've read through this thread, although nothing in that thread was related to reports of "IMU not initialized" and/or "IMU waiting on axes" like you and I have.
Posts: 33
Threads: 3
Joined: Oct 2022
Reputation:
0
It seems that in my case, the GPS works fine via GPSD on port 2947. But I can't display NMEA sentences via HTP on port 10110. When I turn on the GPS, it works fine, and is stable, but it makes Pypilot hang every 10 seconds. It seems that GPSD interrupts the IMU i2c every 10 seconds. I haven't noticed any anomalies on the BME280 i2c, but maybe it has a much slower refresh rate and is not penalized by interrupts.
Posts: 2,324
Threads: 21
Joined: Jun 2016
Reputation:
72
so if you stop gpsd, you no longer get hangs every 10 seconds?
What if you put the gps in nmea mode and dont use gpsd?
Posts: 33
Threads: 3
Joined: Oct 2022
Reputation:
0
Great! It seems to work by making a “serial” connection at 4800 baud in OpenCPN without going through GPSD. But I have some connectivity issues on the GPS, I need to secure that to be sure it works. But Pypilot does not hang up anymore. I will keep you informed of the rest.
Posts: 33
Threads: 3
Joined: Oct 2022
Reputation:
0
2024-08-09, 10:29 PM
(This post was last modified: 2024-08-09, 10:56 PM by Ebraball.)
After securing the installation, I have NMEA data coming into OpenCPN and Pypilot engaged for over an hour, without any problem.
It was probably a connection conflict that was not detected by OpenPlotter.
I edited the ttyUSB0 device in serial, gave it an alias (hub), but didn't create a connection for it.
I created the connection directly in OpenCPN: Serial / input / /dev/ttyUSB0 / 4800 / 2
It works fine.
But in Serial / Connections, I have two ttyUSB0 lines:
One line with the alias, but without a connection, and one line without an alias, but with the OpenCPN connection.
When I restart OpenPlotter, I get the warning message about a connection without an alias.
Won't this cause problems?
|