Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I use this to test autopilot_route_pi? #10

Open
rgleason opened this issue Jan 12, 2023 · 95 comments
Open

Can I use this to test autopilot_route_pi? #10

rgleason opened this issue Jan 12, 2023 · 95 comments

Comments

@rgleason
Copy link

rgleason commented Jan 12, 2023

Marco, Is it reasonable to test autopilot_route_pi using this software?
How would you suggest proceeding when using Windows?

THE ANSWER IS YES!!! but below are good trials.

@marcobergman
Copy link
Owner

marcobergman commented Jan 12, 2023

Yeah I've tested the whole plugin this way; it runs very well under windows. Some more examples you can find in attached link.

https://github.com/pypilot/workbook/files/7745610/Autopilot.Route.OpenCPN.plugin.pdf

@rgleason
Copy link
Author

This morning I've been trying your tool with some success. I think autopilot_route is still bad, but perhaps you can confirm that. I can get your ais_simulator.exe running nicely. When I use the python command in powershell I get an error.

PS C:\Users\fcgle\source> cd ais_simulation
PS C:\Users\fcgle\source\ais_simulation> python --version
Python 3.10.0
PS C:\Users\fcgle\source\ais_simulation> python simulate_ais.py
Traceback (most recent call last):
  File "C:\Users\fcgle\source\ais_simulation\simulate_ais.py", line 2, in <module>
    import wx
ModuleNotFoundError: No module named 'wx'
PS C:\Users\fcgle\source\ais_simulation>

In the python script I don't find wxWidgets referenced. What is this error due to?
I have wxWidgets all set up with env variables and working for OpenCPN
C:\Users\fcgle\source\wxWidgets-3.1.2

Perhaps you know what is happening? I have pyton 3.10

@rgleason
Copy link
Author

rgleason commented Jan 13, 2023

Here are some screen shots I haven't figured out how to control the autopilot_route settings, but I am finding accessing from preferences to be a bit of a pain, but perhaps this is necessary due to the settings being needed at a lower level.

The round circle is behind the boat!!!! This isn't right I think. I did create my own goto here route and set it active.
Is that the right thing to do?
Autopilot_route-Test1

Zoomed

Autopilot_route-Preferences

@marcobergman
Copy link
Owner

The green circle is is what I have dubbed the guide point. The guide point is a fixed distance away from the boat, in your case 100 meters. The boat will steer towards the guide point. However, if the boat is too far from the track (more than the 100 metres) the boat would steer to the closest point on the track. This is what you see and it would not be practical. That's why, if the guide vector is more that MaxErrorAngle from the track's heading, it is capped at that. The result is the guide vector which is the red line. You see that in your pictures, the boat is trying to intersect the track at 30 degrees.

I have been using the github version of autopilotroute_pi for more than a year now, in conjunction with pypilot. I'm very happy with it; it works quite well. Something went wrong in the OpenCPN port; that version is not reliable.

@marcobergman
Copy link
Owner

ModuleNotFoundError: No module named 'wx'

I have no virgin windows machines anymore to test for you, but if I remember correctly on windows you can also install missing modules with pip, e.g. pip install -U wxPython

@marcobergman
Copy link
Owner

marcobergman commented Jan 13, 2023

You seem to be missing an OpenCPN data connection outputting to the ais_simulator's 20220/TCP socket; then the simulator will assume the headings from the autoroute_pi and you are full-circle. You might have to check windows built-in firewall to get this going - cannot remember.

@rgleason
Copy link
Author

rgleason commented Jan 13, 2023

Actually I do, I just didn't show a screenshot. I should have.
I am wondering if the version I built is fixed.

Screenshot (398)

For the AIS-simulator I have
Network input UDP protocol 0.0.0.0 Network Address and 10110 Network Port.

you seem to be missing a data connection outputting to the 20220/TCP socket <--- this makes me think I am missing something. Am I?

@rgleason
Copy link
Author

rgleason commented Jan 13, 2023

Ok I tried adding a
Network output TCP protocol 0.0.0.0 Network Address and 20220 Network Port
Screenshot (407)

Here are some screenshots. I had to slow it down as it moves fast.

Screenshot (412)
Screenshot (414)
Screenshot (416)

Does this look right? This is helpful.
The green circle is is what I have dubbed the guide point. The guide point is a fixed distance away from the boat, in your case 100 meters. The boat will steer towards the guide point. However, if the boat is too far from the track (more than the 100 metres) the boat would steer to the closest point on the track. This is what you see and it would not be practical. That's why, if the guide vector is more that MaxErrorAngle from the track's heading, it is capped at that. The result is the guide vector which is the red line. You see that in your pictures, the boat is trying to intersect the track at 30 degrees.

  1. I created my own "navigate to here" and set that route active. Is that the correct thing to do?
  2. I used your ais_simulator to "aim" the boat. It does not seem to be going anywhere on its own.
  3. So I must have not set up something correctly. Maybe it is the autopilot EC commands...

I have been using the github version of autopilotroute_pi for more than a year now, in conjunction with pypilot. I'm very happy with it; it works quite well. Something went wrong in the OpenCPN port; that version is not reliable.
I am trying to get the OpenCPN version working in the same way. Somehow Sean's and mine diverged.

(I also tried for about the 6th time to merge sean's watchdog and mine so that we have the pypilot alarm too, but mine has depth and rudder angle and he deleted files and changed the pypilot alarm considerably and now I am getting screwed by the fpb file changes.) I wish Sean would help a little by accepting PR's

@rgleason
Copy link
Author

rgleason commented Jan 13, 2023

Perhaps you could try Autopilot_route 0.4.8.0 in the Opencpn PIM Plugin Manager's Beta Catalog?
What are you using Linux? There are builds for all supported OS except Android.
opencpn.conf or opencpn.ini has to have under [plugins] catalogexpert=1 to get to the Beta Catalog.

@marcobergman
Copy link
Owner

marcobergman commented Jan 13, 2023 via email

@rgleason
Copy link
Author

Ok, got it. It is the IP assigned by the router.

@marcobergman
Copy link
Owner

it looks allright in the sense that the sent sentences are blue and I see that the heading in the APB matches the heading in the simulator (244.0) so I think you are all set. If yuou set a curly route the little boat must start following it, and then you can investigate how the autoroute_pi parameters affect performance. Mind you that the default speed-up ratio is 60x.

@rgleason
Copy link
Author

rgleason commented Jan 13, 2023

--- Broadcasting NMEA messges to UDP:10110   <----Using 0.0.0.0
--- Listening to NMEA messages at TCP:20220     <--- Using my ip  192.168.120.1
--- Loading boats from ais_simulation.gpx
name=AIS-1, mmsi=1, lat=52.577615042, lon=3.062908344, heading=028, speed=10.3, status=1
name=AIS-2, mmsi=2, lat=52.560516681, lon=3.018649757, heading=28, speed=10.3, status=0
name=AIS-3, mmsi=3, lat=52.780918302, lon=3.132218962, heading=208, speed=10.3, status=1
name=AIS-4, mmsi=4, lat=52.477138333, lon=2.952928333, heading=028, speed=10.3, status=1
name=AIS-OWN, mmsi=6, lat=52.626518333, lon=3.199091667, heading=260, speed=6, status=1
Awaiting connection...
--- Initial positioning of boats
!AIVDM,1,1,,A,100000A01WP>1ERN5LjA60p00000,0*22
!AIVDM,1,1,,A,100000P01WP=lGbN4leQ60p00000,0*61
!AIVDM,1,1,,A,100000i01WP>Ea6N<qA`86P00000,0*28

Here are some screenshots. I still have to "guide" the boat by using ais_simulator.... It doesn't seem to want to align automatically to the route when it arrives on the route. Shouldn't it be doing that? Also when I turn the boat 30 degrees from the route, why doesn't it start to turn back to get on the route? It should be quite persistant about that.

Screenshot (418)
Screenshot (416)
Screenshot (420)
Screenshot (421)

@marcobergman
Copy link
Owner

Yeah it should align. I compile straight from sean's github, both on raspbian and ubuntu. Can't find it now where I had summed the issues I had found with the PIM-provided version, but that might be one of them. Going AFK for now.

@rgleason
Copy link
Author

Screenshot (422)

@rgleason
Copy link
Author

Thanks you've been a help.

@marcobergman
Copy link
Owner

Does it align now?

@rgleason
Copy link
Author

Not that I can determine. I am now looking at sean's version.
Can you tell me if this is the version that you built?
https://github.com/seandepagnier/autopilot_route_pi/commits/master
Merge pull request seandepagnier/autopilot_route_pi#20 from rgleason/master

Update to TP FE2 1.0.213 based on seandepagnier
June 28 2022?

@rgleason
Copy link
Author

rgleason commented Jan 13, 2023

I think I am going to wait and see if what I have done is OK. It will stay in the PIM beta catalog until we get some confirmation. Too much thrashing to just do it all over again.

Your Issue is here rgleason/autopilot_route_pi#6

Is this what you are using?

The version 0.5 straight out of the master github shows the right headings.

Do you suppose this is missing? - It does not seem like that is the problem.
seandepagnier/autopilot_route_pi@098226d

@marcobergman
Copy link
Owner

Not that I can determine. I am now looking at sean's version. Can you tell me if this is the version that you built?

I think the last time I compiled it, it was the Dec 5, 2021 commit from sean's github, as per https://www.cruisersforum.com/forums/f134/autopilot-route-plugin-197566-8.html#post3661033. With my systems on the boat, I'll rig up a new openplotter raspberry so I can test github compiles. I cannot compile on windows.

For now, got the 0.4.8.0 version from PIM on Windows and it looks promising; the issue I reported earlier seems to have been resolved.

@rgleason
Copy link
Author

rgleason commented Jan 14, 2023

After looking at the commits in Sean's repository

This is still [version 0.5.0](https://github.com/rgleason/autopilot_route_pi blob/098226d8c5779b491800eca8ba6e233e3ec9582c/VERSION.cmake)

[attempt to](https://github.com/rgleason/autopilot_route_pi/commit 098226d8c5779b491800eca8ba6e233e3ec9582c)fix seandepagnier/autopilot_route_pi#6

seandepagnier/autopilot_route_pi@098226d in Dec 5, 2021

@rgleason
Copy link
Author

rgleason commented Jan 14, 2023

With my systems on the boat, I'll rig up a new openplotter raspberry so I can test github compiles

That would be very helpful. I think there is a Opencpn 5.7.1 RPI version, but I believe it uses Flatpak. Don't know if that is an issue, but that is how the OpenCPN builds have changed.

There is a fair amount of commits from me after this one of sean's "[Attempt to fix](attempt to fix seandepagnier/autopilot_route_pi#6)" from Dec 5

but I will go back to that point and compile it. Then I have to figure out how to move that forward as there is a lot of documentation that was added.

@marcobergman
Copy link
Owner

Ok just tell what commit needs testing

@rgleason
Copy link
Author

Marco,
I cloned and git checkout 098226d8c5779 seandepagnier/autopilot_route_pi@098226d in Dec 5, 2021 and made a new branch locally "attempt-to-fix"

Then I used a windows tool Winmerge to compare the attempt-to-fix branch with the src/ files in my current version 0.4.8.0 . In checking each of the files I did not find much that was different I did make one small change.

at line 200-201 of autopilot_route_pi.cpp to add

    wxAuiManager *pauimgr = GetFrameAuiManager();
    pauimgr->DetachPane(m_ConsoleCanvas);

Other than that it all appears to be the same, with the exception of minor changes that were necessary for the OpenCPN 5.7.1 plugin to build, etc.

@marcobergman
Copy link
Owner

marcobergman commented Jan 14, 2023

Just a quick test on a raspberry, OpenCPN 5.6.2, installed the 0.4.8.0 plugin from the beta channel, looking quite good. The problem I have here is that at the end of the track, the simulation veers off. This might be due to the simulation mechanism or the speedup factor. But this is one of the things I don't want my boat to do, and I'd rather not see it in the simulation either.

image

@marcobergman
Copy link
Owner

The same with speedup factor=1:

image

@rgleason
Copy link
Author

This is certainly an encouraging result. Thank you for testing. I am puzzled why a plugin built using wxWidgets 3.2.1 and intended for RPI OpenCPN 5.7.1 would work with RPI OpenCPN 5.6.2 and I wonder if that is what is causing the veer at the end of simulation? If it is not, then I need to find out why.

@marcobergman
Copy link
Owner

marcobergman commented Jan 14, 2023

All right I'll update OpenCPN then

Edit: that was easier said than done

pi@openplotter:~ $ sudo add-apt-repository ppa:bdbcat/opencpn
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/bullseye

pi@openplotter:~ $ flatpak install --user https://flathub.org/beta-repo/appstream/org.opencpn.OpenCPN.flatpakref
error: No such ref 'app/org.opencpn.OpenCPN/arm/beta' in remote flathub-beta

@rgleason
Copy link
Author

Good Morning Marco,
I was going to ask about this question in the Opencpn/Opencpn Issues as well. Maybe Dave and Leamas have some thoughts about it.

Seeing your examples, where the boat just follows the active route without user intervention using your ais-simulation tool, convinces me that I have not set up the testing environment properly. Procedure:

  1. Set Options > Connections
  2. Network Directon: Input Protocol: UDP Address: 0.0.0.0 Port: 10110
  3. Network Directon: Output Protocol: TCP Address: (your computer's IP address) 192.168.1.120 Port: 20220 Check "Output on this port (as autopilot or nmea repeater) Talker ID "EC" APB bearing precision x.xxxx Input precision: Accept only sentences. Output precison: Output only sentences.
  4. Open the Options > Connections Nmea0183 Debug window.
  5. Route import Gpx "test-route.gpx" and set it as an active route?
  6. Start ais-simulation.exe or execute python ais_simulation.py which uses/runs ais_simulation.gpx
  7. Then how do I get the boat to follow the route? Something appears to be missing still.

Screenshot (423)
Screenshot (425)

@rgleason
Copy link
Author

Maybe I need to do this in a debug environment with VS2022?

@marcobergman
Copy link
Owner

Verdict at this point:

Unless Sean or others can make this plugin much more reliable, my recommendation would be to eliminate it from the Master Catalog for Plugins.

Unless there is some serious work done to make this plugin usable it will be a major aggravation for users and should not be added to the master catalog. Sorry but we need to have some limits. So I will not be adding it to the master catalog at this time. It will remain in the Beta catalog for awhile so users can test it and make their own opinion.

I see where you come from, however the Route Position Bearing algorithm in the autopilot_route plugin is vastly superior to the standard XTE-based track following algorithm. It allows an accuracy of about 10m, whereas with the XTE based tracking this was at least 5 times as bad. It can safely be used in the narrow creeks in the tidal flats we have here, which was never possible with the stock mechanism. You might not see this in the simlation, but with waves, drift and current this algorithm holds so much better in narrow waters.

image

On Linux the display already looks a lot better. The core stuff is really good and that's what I use it for; but I agree there's some rough edges. What you have now in the beta channel is already more usable than before, when the only option was to compile from source. With your beta plugin I can now engage with sailors in the Netherlands, where there are now more than a hundred pypilot implementations active which might benefit from this plugin.

@rgleason
Copy link
Author

Marco, that is good news indeed. Perhaps you can get some sailing programmers to fix all the rough edges. This morning I could not resist testing the plugin further. I find that the "Standard XTE" and and "Waypoint Bearing" options are totally flawed. On the first leg the boat turns 180 degrees back and forth and doesn't get out of that loop sometimes. Also the Waypoint Bearing has moments when the boat turns away from the route and makes a jog. Then when it gets to the end of the route it just stops and Bombs Opencpn. There are a number of glitches that make OpenCPN unstable and I had to totally reboot sometimes and when I did I found a lot of extra tracks that were never shown. Also your ais_simulation window shows "Message unknown" a lot. Also the "Arrived at waypoint" message is flawed and bombs Opencpn. Here are some additional screenshots to show what I mean.

These are not just little problems that I can perhaps fix, these are more structural issues that require a good programmer who understands how these features all work. Therefore the plugin is just a Beta Plugin. I will willingly accept Pull Requests to fix these issues from Sean or anyone capable. I am sorry, I had expected a better plugin result, and that is why I spent some time on it. We can't have miscellaneous features in a master catalog plugin that fail and bomb OpenCPN.

Screenshot (495)

Screenshot (496)

Screenshot (497)

Screenshot (498)

Screenshot (504)

Screenshot (506)

Screenshot (507)

@rgleason
Copy link
Author

Also see this about deleting tracks. The crashes may be due to the Autopilot_Route plugin.
OpenCPN/OpenCPN#2930

@marcobergman
Copy link
Owner

marcobergman commented Jan 15, 2023

Marco, that is good news indeed. Perhaps you can get some sailing programmers to fix all the rough edges.

I'll do what I can, but I'm not a capable programmer. I was able to replicate the 'veering off at the end' issue in the december 5th, 2021 commit from sean. That one I can compile, and that issue seems to be solved by the following modification to autopilot_route_pi.cpp:

     m_ConsoleCanvas->UpdateRouteData();
-    SendNMEA();
+    if (m_Timer.IsRunning())
+       SendNMEA();
 }

This morning I could not resist testing the plugin further. I find that the "Standard XTE" and and "Waypoint Bearing" options are totally flawed. On the first leg the boat turns 180 degrees back and forth and doesn't get out of that loop sometimes.

Yes this is a known issue: seandepagnier/autopilot_route_pi#8

Also the Waypoint Bearing has moments when the boat turns away from the route and makes a jog. Then when it gets to the end of the route it just stops and Bombs Opencpn.

Also known: seandepagnier/autopilot_route_pi#5

There are a number of glitches that make OpenCPN unstable and I had to totally reboot sometimes and when I did I found a lot of extra tracks that were never shown.
...
These are not just little problems that I can perhaps fix, these are more structural issues that require a good programmer who understands how these features all work. Therefore the plugin is just a Beta Plugin. I will willingly accept Pull Requests to fix these issues from Sean or anyone capable. I am sorry, I had expected a better plugin result, and that is why I spent some time on it. We can't have miscellaneous features in a master catalog plugin that fail and bomb OpenCPN.

Fully agree with you. There is probably only a very small population of (pypilot) sailors who would benefit from this specific plugin, so the drive to fix these issues has always been very small. Thanks for all your effort so far.

@marcobergman
Copy link
Owner

Also your ais_simulation window shows "Message unknown" a lot.

This happens when you forward sentences other than APB to the 20220 socket.

@rgleason
Copy link
Author

Bernd, you've been a great help and I totally understand.

I do hope this plugin improves enough so that we can include it in the Master Catalog, but it is going to take some work and skill.

I have removed the old 0.4.70 version from the master catalog too, as it was a liability.

@rgleason
Copy link
Author

If these features are so good #10 (comment)
It seems to me that they should be polished up to be presentable and useful to everyone!

Are you using Pypilot_pi? or just Pypilot? in this screenshot.
Can Pypilot_pi be tested with your ais_simulator or does that require something else? I am not clear about how this works and would like to make sure that there aren't problems with the pypilot_pi that we have in both the master catalog and the beta catalog!

Thanks.

@marcobergman
Copy link
Owner

No the pypilot_pi is fine *), never issues with that one, and there is no overlap with the autopilot_route plugin AFAIK. You can view the pypilot plugin as a remote control for the pypilot, plus a few things more.

*) although I do faintly recall recompiling it this summer from source under sail, but those hardships are normally quickly forgotten. That, however, is a different subject ;-)

@rgleason
Copy link
Author

marco do you ever use the versions in PIM?

PIM master catalog has pypilot_pi 0.34.4.0 for OpenCPN 5.6.2
PIM Beta catalog has pypilot_pi 0.36.3.0 for OpenCPN 5.7.1

Which ones have you used and are they OK?
Thanks!!!
If pypilot_pi 0.36.3.0 is OK I will move it into the master catalog.

@marcobergman
Copy link
Owner

Sure I'll give it a go.

@marcobergman
Copy link
Owner

marcobergman commented Jan 15, 2023

Platform opencpn pypilot_pi test
ubuntu 22.10 5.7.1 cannot update beta catalog, not in github compiled version, nor in flatpak version
raspbian 11 5.6.2 0.36.3 OK
raspbian 11 5.7.1 0.36.3 pending opencpn beta install
windows 10 5.6.2 0.36.3 OK
windows 10 5.7.1 0.36.3 OK

OK means that I hooked it up to a up-to-date version of pypilot, straight from github, and that all screens show all right.

On Ubuntu, Update Catalog only shows me the plugins in the local directories; it does not seem to pull anything from the web.

On raspbian, I see this when I update Catalog:

20:21:54.277 MESSAGE OCPNPlatform.cpp:1101 ERROR Loading translation catalog for:  opencpn-pypilot_pi
ccc

@seandepagnier
Copy link

Hi.. i read some of this.

Keep in mind I never simulated so only did development of the autopilot route plugin while underway and.. this means I did not catch every problem it seems because of limited use. A lot of the time when sailing i was not in the mood to debug this.

I agree to keep it as beta for now until the issues are fixed. Making the canvas colors green or a bigger font?

Anyway.. I will try to look into the issues #5 and #8. If you do find a fix like mentioned here I would find it in the future easier if it is a pull request or issue of autopilot_route_pi

@rgleason
Copy link
Author

Marco, thank you for your trials. This is very helpful. I think I will push all of the builds for Pypilot_pi up to the master branch, and we will have to watch the reports back for installation. Perhaps there is some config issue we don't know about.

Sean, thank you for reading. It would be wonderful if we could call autopilot_route_pi "the better alternative".

@marcobergman
Copy link
Owner

marcobergman commented Jan 16, 2023

Anyway.. I will try to look into the issues #5 and #8. If you do find a fix like mentioned here I would find it in the future easier if it is a pull request or issue of autopilot_route_pi

Thx Sean. The movie clip where you boat into the harbor was the prime reason for me to build a pypilot in the first place.

The 5 and 8 are actually already issues of autopilot_route_pi.

For me, I could do without the Standard XTE and Waypoint Bearing options altogether, but that might preclude the ultimate vision of this plugin being an advanced replacement for the stock route following mechanism. For now, the options could be disabled to reduce the liability, to return to them in a later stage.

I think I could give a stab myself at getting the console canvas fonts to line up with the Console Legend and Console Value fonts as defined in OpenCPN User Interface option.

Sean and Rick: which repository should I then fork?

@rgleason
Copy link
Author

Marco

Are you using the Beta Catalog?

You wrote:

On Ubuntu, Update Catalog only shows me the plugins in the local directories; it does not seem to pull anything from the web.

On raspbian, I see this when I update Catalog:

20:21:54.277 MESSAGE OCPNPlatform.cpp:1101 ERROR Loading translation catalog for: opencpn-pypilot_pi
ccc

@marcobergman
Copy link
Owner

marcobergman commented Jan 17, 2023

Yes, this is raspbian, opencpn 5.6.2, using the beta catalog. I don't get the plugin to translate here on any platform or version, master or beta, though, but I tend to think that not many people would bother.

@rgleason
Copy link
Author

rgleason commented Jan 17, 2023

I don't know why you don't have Pypilot, Weatherfax, Weather_routing, Celestial_Nav, Squiddio, etc. available in PIM Master Catalog for Opencpn 5.6.2,

but there is a serious "target" issue with OpenCPN 5.7.1 TestPlugin FE2 Templated plugins (which you helped to identify) which needs to be fixed and then all the plugins rebuilt. See jongough/testplugin_pi#283

@marcobergman
Copy link
Owner

Rick, Sean has fixed the issues 5, 8 and the veering off at the end. All 3 modes seems to work without any issues now in my first test. Would you be able to incorporate these commits into a new PIM release?

@rgleason
Copy link
Author

Marco. thats good. I am finding a few things still. Also we need to get the CI metadata sorted out for TestPlugin so I have all the OS tarballs and metadata built, so the everyone can test. I am working on that too.

It would not be a release it would be beta pushed up to PIM Beta Catalog. Then depending on what we find out, I will push to master.

@marcobergman
Copy link
Owner

I can build for windows locally, but all of these are built in the cloud by appveyor and circleci using the "ci" scripts. You need wxWidgets and most of the time it is wxWidgets 3.2.1 but for RPI it may be using something else... lets take a look at the scripts... in my repos https://github.com/rgleason/autopilot_route_pi https://github.com/rgleason/autopilot_route_pi/tree/master/ci Is it circleci-build-raspbian-armhf.sh or one of the other ones?

Perhaps seeing the right script will help?

Finally figured it out (actually, @RooieDirk did): had to disable the 8 (!) lines at around line 198 of PluginConfigure.cmake. With this, it compiled on raspbian and ubuntu 22.10:

if(NOT WIN32 AND NOT APPLE AND NOT QT_ANDROID)
    find_package(GTK2)

    #if(GTK2_FOUND AND NOT "$ENV{BUILD_GTK3}" STREQUAL "TRUE")
        #set(wxWidgets_CONFIG_OPTIONS ${wxWidgets_CONFIG_OPTIONS} --toolkit=gtk2)
        #include_directories(${GTK2_INCLUDE_DIRS})
        #set(GTK_LIBRARIES ${GTK2_LIBRARIES})
        #set(PKG_BUILT_WITH_GTK "gtk2")
        #message(STATUS "${CMLOC}Building against GTK2...")
    #else(GTK2_FOUND AND NOT "$ENV{BUILD_GTK3}" STREQUAL "TRUE")
        find_package(GTK3)
        if(GTK3_FOUND)
            include_directories(${GTK3_INCLUDE_DIRS})
            set(GTK_LIBRARIES ${GTK3_LIBRARIES})
            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__WXGTK3__")
            set(wxWidgets_CONFIG_OPTIONS ${wxWidgets_CONFIG_OPTIONS} --toolkit=gtk3)
            set(PKG_BUILT_WITH_GTK "gtk3")
            message(STATUS "${CMLOC}Building against GTK3...")
        else(GTK3_FOUND)
            message(STATUS "${CMLOC} Unix: Neither FATAL_ERROR GTK2 nor GTK3")
            set(PKG_BUILT_WITH_GTK "")
        endif(GTK3_FOUND)
    #endif(GTK2_FOUND AND NOT "$ENV{BUILD_GTK3}" STREQUAL "TRUE")
    set(EXTRA_LIBS ${EXTRA_LIBS} ${GTK_LIBRARIES})
else()
    set(PKG_BUILT_WITH_GTK "${PKG_TARGET_GTK}")
endif(NOT WIN32 AND NOT APPLE AND NOT QT_ANDROID)

@rgleason
Copy link
Author

rgleason commented Jan 19, 2023

marco
It is best to look at TestPlugin 1.0.222 metadata which is the current template.
That would be found in the master branch https://github.com/OpenCPN/plugins/tree/master/metadata
Scroll down and look at the Testplugin 1.0.222 metadata. One for each OS build.
We have way too many of them right now and we are building some of the ones that are used correctly.

You ask

Is it circleci-build-raspbian-armhf.sh or one of the other ones?

It should be debian-armhf.sh, we should not have any raspian anymore. This has to be changed now and the
should be debian-armhf in the metadata

See this in-process Table OpenCPN/OpenCPN#2797 (comment)

@marcobergman
Copy link
Owner

marcobergman commented Jul 3, 2023

Hey Rick! Hope you are fine. People are getting enthousiastic here for the Autopilot Route plugin!

Ran into a small nuisance with it. Not a biggie, but if you are wiggling your thumb you might want to have a look seandepagnier/autopilot_route_pi#36.

All the best!

@rgleason
Copy link
Author

rgleason commented Jul 3, 2023

Marco, it is weird, I was just perusing pypilot and was just on your git repos and wanted to ask you a question about the use of the IMU 3 axis accelerometer, gyroscope, and compass.

  1. Is this accurate enough to use it for radar overlay and ais?
  2. Is there any way to get the signal onto the nmea0183 and/or nmea2000 bus?

I have looked at the link you provided above. Does this apply to this version 0.4.13.0 + TP1.0.238
If so It must be some small code problem and I will try to figure it out. It may require some serious help from Bdbcat.

I see you are using 0.4.9. Why? Please try 0.4.13 in PIM master catalog

@rgleason
Copy link
Author

rgleason commented Jul 3, 2023

BTW I believe we have improved the Testplugin Frontend template so that all the necessary OS builds that OpenCPN supports, are now built and deployed.

@marcobergman
Copy link
Owner

WRT radar usage of the pypilot IMU I would say no; the exact value of the heading that comes out of pypilot has never been very accurate. There is some manual calibration option and correction mechanism based on COG, but it seems it was primarily designed to be stable for course steering purposes. You might want to ask Sean for his thoughts. Pypilot does output its heading in the form of APHDM messages.

@rgleason
Copy link
Author

rgleason commented Jul 4, 2023

Thanks, just an idea. If there is a more accurate 9 axis heading compass on the boat will pypilot use that?

@marcobergman
Copy link
Owner

No pypilot can only use it's own IMU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants