2020-07-21, 05:19 PM
Okay thanks, I’m on the same version of OpenCPN but I believe I am running pypilot plug-in version .9. I need to downgrade. Can you help with that?
Route second waypoint issue
|
2020-07-21, 05:19 PM
Okay thanks, I’m on the same version of OpenCPN but I believe I am running pypilot plug-in version .9. I need to downgrade. Can you help with that?
2020-07-22, 08:56 AM
(2020-07-21, 05:19 PM)rastam4n Wrote: Okay thanks, I’m on the same version of OpenCPN but I believe I am running pypilot plug-in version .9. I need to downgrade. Can you help with that? Are you running on OP1 or OP2? Or just another OS When opening OpenCPN settings and then the plugin tab, do you see the version? I am running OP2 and version 0.5 is the "newest" that is offered from the OpenCPN installer tool of Openplotter. I think that this version might be the newest for OP2, but I am not sure, maybe Sean can clarify (or maybe it is on his Github). Also, you mentioned that the plugin doesn't work at the moment, just curious what it is that is not working? I guess, if you need to downgrade you have to uninstall the current plugin first through above screenshot (if OP2) and if OP1 you uninstall it through OpenCPN. Then, if there is another version somewhere on Sean's Github, you clone and build from there: Code: $ git clone https://github.com/pypilot/pypilot_pi I think this installs the newest version, if you are running OP2 I would recommend to just use the OpenCPN installer tool from the screenshot. I think then it gives you 0.5.
I am running OP2 on a RPi 4.
But I never installed OpenCPN using the OP2 Settings I compiled it from source because at the time of building my system there was a problem with OP2 and Opencpn... it was back in the fall so I don't exactly remember why. I also installed all my plugins from git. Which always installs the latest. I have another build installed from the latest img. that I could swap over to, but I found with that build, that pypilot plugin would deactivate AP every few hours, basically AP would be activated, and keeping a heading, and the boat would suddenly loose course and the screen would indicate AP was no longer activated..... really need an audible alert when that happens! Do you find any problems like that with your current setup? The current issue I am having with pypilot plugin, is simply that it does not see or use the GPS stream, I can only use autopilot with compass mode enabled. The current issue with autopilot route plugin is similar to what you have experienced as soon as I activate a route openCPN freezes and I have to force quite and restart. If I disable the auto pilot route plugin I can activate a route but it does not change my heading, just keeps on the heading it was set to previously. I am going reinstall OP2 from scratch on another card and see if I can replicate your setup. What kernel version are you running?
2020-07-22, 03:57 PM
(2020-07-22, 02:13 PM)rastam4n Wrote: I am running OP2 on a RPi 4. I was just out sailing, testing the route with the built in OpenCPN route capabilities. I had to avoid some AIS objects and other traffic, and fix a lost GPS signal before I could steer to the nearest waypoint. It seemed to work at first, see image (left-below yellow line): You can see it curving gently to the waypoint, but then it made a sharp turn all of the sudden! First I thought, what the hell! But then I saw that the tiller was off of it's pin and not connected to the rudder anymore. My mistake, but then something really strange happened: At that moment the tiller was retracting to the point that it couldn't retract any further and stopped moving, and on that exact moment BAM... no more AP connection??? At this point I just didn't know what the trouble was, power was properly hooked up so it couldn't be a power failure. Also when looking back at Grafana that records my voltage, amps and watts, I could see it was a little bit unstable. Also have a UPS built in, that says to Node-Red to power down the pi when there is a power loss, in order to avoid a corrupted SD. The trouble was a little bit of an instable power on the Pi and the motor controller. So maybe at the moment that the tiller had to do more work and the power cables were not connected sturdy, the Pi just went dead (or "safely shutdown" and so did the AP and Autopilot. So, I rebooted the Pi with a better power connection this time and tried activating the route again. But this time the tiller just went crazy, also the magnetic compass just does not do what I want in OpenCPN although there doesn't seem to be any interference. It was my understanding that OpenCPN just uses the magnetic compass for the ownship direction pointing the front at the ship in line with the compass position on the ship, and the gps heading will be a red line pointing in the direction it actually goes. Together with an activated autopilot this was really complicated for me to interpret, at the same time trying to think of a possible cause that the Autopilot just steered into directions I didn't want. In between I tested the Autopilot in magnetic mode without a route, this seemed to work at the time however was way to nervous in correcting routes, think I'll need to adjust the gain. Any way, GPS mode is not really working for me, also without an active route it just steers to another direction that I am really heading at. All in all I think I need to do a few things: - A sturdy power connection, that will not get loose. Will probably use bolts screws directly on the batteries power terminal - Switch off my node-red UPS auto shutdown function, just in case - Somehow test if my magnetic compass works OK on the boat - More WiFi signal, need to set the external dongle as AP but OP2 does not allow me to do this? (sharing internet connection device settings don't make any difference) - Adjust the gains so Pypilot isn't that nervous (oversteers) Sorry for the long post... just wanted to share my experience. To answer your questions: I use the image of OP2 headless, most recent one, this will have OpenCPN by default and the Pypilot plugin that comes with it works. Didn't do any major changes to the settings, or SignalK. Most important one was the Pypilot connections. When you say that your GPS stream does not come through to Pypilot, what OpenCPN connection do you use? TCP port 20220 with output filters APB and all the EC@@@@? And, what settings do you have in the Pypilot plugin? Forward NMEA off ? I think it would be worth it to test the headless image, and go from there...
2020-07-24, 01:16 AM
I suggest also trying the tinypilot image. This is most reliable and tested for pypilot, so if this works but you have issues with openplotter that would help determine the issue.
I'm not entirely sure of your setup, which motor/controller you are using etc. It is important to optically isolate the controller from the raspberry, otherwise a ground loop could cause voltage transients to the pi, and you don't want current carrying wires (like the ones to the motor) going too close to the magnetic sensors.
2020-07-24, 10:49 AM
Question about the tinypilot image, what does the user interface look like, does it include openplotter or signalk? I can build a separate autopilot enclosure that only runs tinypilot as a test and then connect it to openplotter if needed.
Indeed I am aware of possible magnetic interferences. The sensors are as far away from motor controllers and power supplies as possible, and the magnetic sensors are stable. Also the USB cable that I have for the arduino is opto-isolated. I have read the wiki about the gain settings now, so I'll also do that. And, get a proper understanding of how OpenCPN graphically depicts headings (magnetic, gps) and how Pypilot "listens" to either of these.
2020-07-30, 09:00 AM
I've gotten it to work yesterday, following the built in route capabilities of OpenCPN to test the basic functionality. Calibration of magnetic compass could be better (my fault, some interference), but following a GPS route worked. It followed the route "on the spot" and did not wonder off of it's track. I am very happy it finally worked. The configuration I posted earlier is working.
When testing on land it is honestly very hard to say if it will work in real life. Interpreting the GUI and how course is handled by the autopilot, when it chooses it's waypoints is a bit tricky. Sometimes it will point directly to the first waypoint, but I have found out that in real life when the waypoint is a bit far, it will first steer for the track rather than directly to the waypoint. Also, a GPS simulator does not take into account a magnetic compass, so this will be another factor when testing on the water. Probably common knowledge for others, but I think for people who are trying to set this up for the first time need to know this: - Test on land, or with a gps simulator if the autopilot at least will react when activating the autopilot (look at the blinking waypoints and if using GUI overlay of pypilot, look if the green line goes to the "general direction" of the heading it should go, does not need to be the waypoint directly. - If using pypilot, see if automatically switches to GPS This should be enough for you to know that it will probably will try and follow the route and that it will work. Then, if the following issues are there: - Pypilot is holding magnetic heading correctly, but does not react to course changes when pressing button: change the opencpn connection priority - If the tiller is reacting to quick and oversteers all the time, just decrease the P and D gains bit by bit until you hit the sweet spot. Only if you get it working, you get a general idea of how opencpn communicates heading changes so it will follow a route and how direct / aggressive this is. Next step, test Sean's autopilot route plugin.
2020-07-30, 01:59 PM
I am jealous you can use the GPS mode in the Pypilot Plugin... I still have not got passed that challenge...
2020-07-30, 04:28 PM
(2020-07-30, 01:59 PM)rastam4n Wrote: I am jealous you can use the GPS mode in the Pypilot Plugin... I still have not got passed that challenge... Hope that Sean is able to help looking at the log you posted before. Maybe you can try other filters in the pypilot connection, to only use the EC@@@ sentences in stead of the APB and see what happens if you activate the route. And, uncheck the checkbox for nmea forwarding in the Pypilot OpenCPN plugin. I really feel that Pypilot in your case does not work because it doesn't receive valid sentences. Also, does it work without activating a route? So, just GPS mode?
2020-07-30, 04:40 PM
No, that is all I am doing, is selecting GPS mode. The route will not work till that is fixed
|
« Next Oldest | Next Newest »
|