2021-03-05, 08:22 AM (This post was last modified: 2021-03-05, 08:39 AM by richarddaneel.)
(2021-03-04, 08:04 PM)ironman Wrote:
(2021-03-03, 07:27 PM)richarddaneel Wrote: Please help me as I have done this but can not get pypilot to detect the gps.
(2021-03-03, 10:28 PM)seandepagnier Wrote: I'm not sure why pypilot is unable to directly receive the gps data from signalk though.
The zeroconf mechanism, through which pypilot (almost) automatically connects to a signalk database, only works when signalk's server setting 'mdns' is switched 'on', which it does not seem to be by default. If that is switched on, you will find an Access Request under the signalk Security menu, which you have to approve. Mind you, many setting changes in signalk require a restart to become effective.
Hi Ironman
Thanks for the reply. The 'mdns' was off and changed it but there is no Access Request under Security menu even after restart. Ironman, if I go to signalk-server:events:nmea0183 debug window I can see the gps sentences are there but somehow pypilot does not see them, any help appreciated
Richard
(2021-03-05, 03:51 AM)seandepagnier Wrote:
(2021-03-04, 09:25 AM)richarddaneel Wrote: Hi Sean
Thanks for the reply. One problem could be the data transfer. As you can see in the picture the OUT sentences (port 20220) are all in red. Not sure why but I have tried various versions and they are all the same so I think they are not valid. This is a fresh install of Raspbian on a RPi4 with only OpenCPN installed so no Openplotter and no SignalK to mix things up. However, the Pypilot plugin still does not receive the data, any ideas will be appreciated.
Richard
I am not completely sure, but is pypilot actually running on 127.0.0.1?
What if you try to connect with "telnet localhost 20220" ?
Hi Sean, Thanks for the reply. As you can see in the picture if I follow your previous suggestion and "output this data as a nmea repeater or autopilot route" checkbox in opencpn then I get the sentences sent in blue. However, if I change the host to localhost on TCP port 20220 there is still no recognition by pypilot and the output messages are still in red and, thus, not valid.
2021-03-05, 05:18 PM (This post was last modified: 2021-03-05, 05:52 PM by ironman.)
Ah, reading back I see a problem. You expect to get a heading in the pypilot plugin because there is a gps heading in signalk? That won't happen, I'm afraid. Pypilot can only steer on its own heading - it needs the IMU. Without an IMU, I believe there is not much use for pypilot. With an IMU, Pypilot also produces heading, pitch and roll, and it consumes externally delivered gps tracks (route data), wind angle, to steer by apparent wind, and gps speed, to calculate true wind to steer by. That data is either exchanged to and from pypilot through nmea/20220 or signalk/3000. An IMU won't cost you the world, and I would suggest you buy them from the pypilot store, because these are tested before they are shipped. I don't have shares, btw ;-) https://pypilot.org/store/index.php?rt=p...uct_id=129
Having said that, it seems your pypilot is not even running to start with. If you have openplotter, you would need to start pypilot with the Raspberry->Openplotter->Pypilot facility, switch to Autopilot. Then, when you open the pypilot plugin, it should no longer show 'disconnected', what I see in your screen dumps, but 'Connected to <hostname>'.
(2021-03-05, 05:18 PM)ironman Wrote: Ah, reading back I see a problem. You expect to get a heading in the pypilot plugin because there is a gps heading in signalk? That won't happen, I'm afraid. Pypilot can only steer on its own heading - it needs the IMU. Without an IMU, I believe there is not much use for pypilot. With an IMU, Pypilot also produces heading, pitch and roll, and it consumes externally delivered gps tracks (route data), wind angle, to steer by apparent wind, and gps speed, to calculate true wind to steer by. That data is either exchanged to and from pypilot through nmea/20220 or signalk/3000. An IMU won't cost you the world, and I would suggest you buy them from the pypilot store, because these are tested before they are shipped. I don't have shares, btw ;-) https://pypilot.org/store/index.php?rt=p...uct_id=129
Having said that, it seems your pypilot is not even running to start with. If you have openplotter, you would need to start pypilot with the Raspberry->Openplotter->Pypilot facility, switch to Autopilot. Then, when you open the pypilot plugin, it should no longer show 'disconnected', what I see in your screen dumps, but 'Connected to <hostname>'.
Hi ironman
Thank you for your reply. Yes, I sort of assumed that the pypilot plugin had all the necessary software to run pypilot. I have, despite my age and stupidity, made some progress and can semi run the programme from the OpenCPN plugin as shown in the picture. However, if you have some time could you help me a bit. As I am static in my room the COG does not change is this the reason the status for pypilot is "idle" as in the picture? Secondly, why do I still get the SYNC OVERCURRENT_FAULT even though I have corrected the motor.ino code and deleted the "//" before the define the sensors lines.
As regards running Pypilot from Openplotter I am having all kinds of trouble and think I am just too old and stupid for this so will give it up for a day or two.
Best wishes
Richard
Well this is already impressive! You seem to have made a successful UI connection to a tinypilot (connected to...) , and if I'm not mistaking, your tinypilot has a successful connection with an Arduino controller ('idle'). Am I right? Furthermore, you have provided your tinypilot successfully with gps messages (blue lines in the nmea debug) and pypilot on the tinypilot responds positively by showing 'gps' as autopilot mode in the dropdown. This is probably because there is also an RMC message, but I cannot see that in your output.
The overcurrent_fault you get because the arduino measures the current that goes through your motor. It does this by measuring a voltage on one of its pins (A1), which pin is supposed to be tied to a shunt resistor, that is tied on one end to ground, on the other end to the motor driver. If you don't tie up that pin, its voltage will float around and could trigger that error. I don't know exactly what line you have commented out, but the overcurrent error I believe cannot be disabled. I't try to tie A1 to ground and see if that gets rid of the message. Over all, I see no reason to throw your towel into the ring at this point. Next step would be to get hold of one of those IMU's.
(2021-03-06, 11:25 PM)ironman Wrote: Well this is already impressive! You seem to have made a successful UI connection to a tinypilot (connected to...) , and if I'm not mistaking, your tinypilot has a successful connection with an Arduino controller ('idle'). Am I right? Furthermore, you have provided your tinypilot successfully with gps messages (blue lines in the nmea debug) and pypilot on the tinypilot responds positively by showing 'gps' as autopilot mode in the dropdown. This is probably because there is also an RMC message, but I cannot see that in your output.
The overcurrent_fault you get because the arduino measures the current that goes through your motor. It does this by measuring a voltage on one of its pins (A1), which pin is supposed to be tied to a shunt resistor, that is tied on one end to ground, on the other end to the motor driver. If you don't tie up that pin, its voltage will float around and could trigger that error. I don't know exactly what line you have commented out, but the overcurrent error I believe cannot be disabled. I't try to tie A1 to ground and see if that gets rid of the message. Over all, I see no reason to throw your towel into the ring at this point. Next step would be to get hold of one of those IMU's.
Hi Ironman
Every time I try and set-up Pypilot on Openplotter I get an error message saying I must create a connection between SignalK and Pypilot (Picture 1) and so I tried to configure a connection under SignalK server using the TCP server as in picture 2 but that is not what the programme wants and the error keeps coming up, any ideas.
Secondly, before I make a complete fool of myself can I ask you the hardware set-up for Openplotter. As I understand it you only need the IMU/GPS and the motor controller. Thus, do you still need the pi zero, and arduino (motor.ino)?
I have been working on a Pypilot for Dummies document. No offense, but I think this might help you. It's work in progress and not ratified by anyone yet, so there is a risk I might miseducate you on some points. My intention is to share it somewhere here if that appears to be appropriate. Rather than answering some questions and people needing to search this forum to get answers to the same questions, it seems handy to bundle them all in this somewhat popularized, low-entry format. I'll make a separate thread to publish it at this point to keep the publication (preview) centralized and searchable.
(2021-03-07, 08:01 PM)ironman Wrote: I have been working on a Pypilot for Dummies document. No offense, but I think this might help you. It's work in progress and not ratified by anyone yet, so there is a risk I might miseducate you on some points. My intention is to share it somewhere here if that appears to be appropriate. Rather than answering some questions and people needing to search this forum to get answers to the same questions, it seems handy to bundle them all in this somewhat popularized, low-entry format. I'll make a separate thread to publish it at this point to keep the publication (preview) centralized and searchable.
Yes, that would be fantastic, well done and I think very called for.
Regards
Richard
Hi ironman
I have just read your pypilot for dummiies, well done it looks great. You do realize that when you are finished it will be a 300 page document and then they will change the code in some way. When you have a moment could you have a look at the photo. I am trying to calibrate the IMU (Yes, I will buy my next one from Sean) and I can get the compass calibration to work no problem. However, the accelerometer will not calibrate. I turn the unit around on all 3 axis for a while and get lots of solid green points but no yellow ones and the calibration age does not reset. How should I be doing it?
Many thanks
Richard