Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 06-01-2016, 18:48   #151
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 1,077
Re: OpenCPN on Raspberry Pi2

OpenCPN is the base level software. It provides all the basics for planning and navigating. There are a range of Plug Ins that extend this functionality to, hopefully, increase its usability and utility. OCPN_DRAW_PI is one such Plug In. It allows the user to draw objects, other than Routes and Waypoints on the chart. It also allows, in conjunction with the Watchdog Plug In, to use some of these objects to set alarms, i.e. AIS targets coming close but not on a collision course, No Go areas (Exclusion Boundaries) and irregular shaped Anchor Watches (Inclusion Boundaries).

So, install OpenCPN first and make sure it works, then, if you feel like it install the OCPN_DRAW_PI Plug In. Currently both of these that I have provided are beta versions which are in the final test phase. They should work OK, but they are subject to changes as we try to finalise for a 'production' release, i.e. OpenCPN 4.2 and OCPN Draw 1.0.

I have not provided the Watchdog Plug In as it currently does not work on the PI, although it does work well on all the other supported platforms. The PI is rather new and 'experimental' (that's what it is for after all) and has not yet had the effort put into it to stabilise all the Plug Ins.

Jon

PS. On the PI to install a *.deb file you will need to issue 'dpkg -i /path/to/file' as super user. The final versions of the code will be in the PPA's which are installable through the normal methods, i.e. apt-get or update manager.
jongough is offline   Reply With Quote
Old 06-01-2016, 21:22   #152
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by jongough View Post
I have not provided the Watchdog Plug In as it currently does not work on the PI,
It should work, what is the problem?
seandepagnier is offline   Reply With Quote
Old 06-01-2016, 21:27   #153
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by jongough View Post
Hi,
I have built a working version of the latest beta of OpenCPN and OCPN_DRAW_PI which will install on a Raspberry PI2 running raspberian (standard OS which comes with NOOBS to install on new PI). You will find them here:
OpenCPN
https://www.dropbox.com/s/c3rcq9ca9w...armhf.deb?dl=0

OCPN_DRAW_PI
https://www.dropbox.com/s/q7qsojfy0r...armhf.deb?dl=0

Jon
Jon,

Did you try my rpi_fixes branch? It cannot be merged because the near 4.2 release, but it should unlock the hardware accelerated opengl for raspberry pi giving me mostly 15-20 frames per second on 1280x800 resolution. I would like some feedback... If it finds the mesa drivers it might not be faster, so possibly must add the location of the right libGLESv1_CM.so to LD_LIBRARY_PATH... Depending on distribution this can be in different places and may or may not be in the right place so I want to work this out.
seandepagnier is offline   Reply With Quote
Old 06-01-2016, 21:34   #154
Registered User

Join Date: Jun 2015
Posts: 379
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by NahanniV View Post
Thanks !

That seems to work.

But building OpenCPN with wx2.8 failed:
Code:
[  8%] Building CXX object CMakeFiles/S57ENC.dir/src/s52plib.cpp.o
/usr/bin/c++   -DARMHF -DLINUX_CRASHRPT -DOCPN_HAVE_X11 -DOCPN_USE_PORTAUDIO -DTIXML_USE_STL -DUSE_GARMINHOST -DUSE_GLU_TESS -DUSE_S57 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DocpnUSE_GL -DocpnUSE_GLES -pthread -O3 -DNDEBUG -isystem /usr/local/lib/wx/include/gtk2-ansi-release-2.8 -isystem /usr/local/include/wx-2.8 -I/home/aruntu/OpenCPN/include -I/home/aruntu/OpenCPN/src -I/home/aruntu/OpenCPN/src/wxcurl -I/home/aruntu/OpenCPN/src/nmea0183 -I/home/aruntu/OpenCPN/src/mygdal -I/home/aruntu/OpenCPN/src/garmin/jeeps -I/home/aruntu/OpenCPN/src/texcmp/lz4 -I/home/aruntu/OpenCPN/src/texcmp/squish -I/home/aruntu/OpenCPN/build/CMakeFiles/include    -Wall -Wno-unused -fexceptions -rdynamic  -g -fno-strict-aliasing  -DPREFIX=\"/usr/local\" -o CMakeFiles/S57ENC.dir/src/s52plib.cpp.o -c /home/aruntu/OpenCPN/src/s52plib.cpp
In file included from /home/aruntu/OpenCPN/src/s52plib.cpp:58:0:
/home/aruntu/OpenCPN/include/glChartCanvas.h:66:30: error: invalid use of incomplete type ‘class wxGLCanvas’
 class glChartCanvas : public wxGLCanvas
                              ^
I think you haven't compiled wx with opengl
In your wx 2.8 directory
rerun configure as before but with the parameter --with-opengl;
configure --with-opengl
make
make install

It seems you also need the latest OCPN from git for arm, update it
and recompile OCPN.
did-g is offline   Reply With Quote
Old 07-01-2016, 00:30   #155
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,146
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by boat_alexandra View Post
Jon,

Did you try my rpi_fixes branch?..........
Sean.
Please, which branch is that. "armlinuxfixes" or?
Would be fun to test.
Thanks
Håkan
Hakan is online now   Reply With Quote
Old 07-01-2016, 05:24   #156
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by Hakan View Post
Sean.
Please, which branch is that. "armlinuxfixes" or?
Would be fun to test.
Thanks
Håkan
From his private branch I think:

https://github.com/seandepagnier/OpenCPN/tree/rpi_fixes

Cheers,
JM.
NahanniV is offline   Reply With Quote
Old 07-01-2016, 06:26   #157
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 719
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by NahanniV View Post
From his private branch I think:

https://github.com/seandepagnier/OpenCPN/tree/rpi_fixes

Cheers,
JM.
I noted:

Code:
 CMakeLists.txt Upgrade glshim adding special bcmhost hack for raspberry pi 47 years ago
47 years ago,,,, :-)
petter5 is offline   Reply With Quote
Old 07-01-2016, 08:06   #158
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by petter5 View Post
I noted:

Code:
 CMakeLists.txt Upgrade glshim adding special bcmhost hack for raspberry pi 47 years ago
47 years ago,,,, :-)
Shows 8 days ago for me.
NahanniV is offline   Reply With Quote
Old 07-01-2016, 08:39   #159
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN on Raspberry Pi2

Maybe because the raspberry pi clock somehow is using the year 1970 by default.
seandepagnier is offline   Reply With Quote
Old 07-01-2016, 09:44   #160
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,146
Re: OpenCPN on Raspberry Pi2

all..
Thanks for the link. (Was not use to the need to scroll down in a branch list ) Sean you're a productive fellow.
It's building now,will use one hour or so. This was initially found:
Code:
-- Found OpenGL...
--     Lib: /usr/lib/arm-linux-gnueabihf/libGLU.so/usr/lib/arm-linux-gnueabihf/libGL.so/usr/lib/arm-linux-gnueabihf/libSM.so/usr/lib/arm-linux-gnueabihf/libICE.so/usr/lib/arm-linux-gnueabihf/libX11.so/usr/lib/arm-linux-gnueabihf/libXext.so
Comments on that??
Håkan
Hakan is online now   Reply With Quote
Old 07-01-2016, 14:31   #161
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,146
Re: OpenCPN on Raspberry Pi2

OK - I've built and it runs as usual. Log file says:
Code:
22:32:49 CET: Creating MyFrame...size(800, 460)  position(0, 49)
22:32:49 CET: Creating glChartCanvas
22:32:50 CET: Detected display size (horizontal): 212 mm
22:32:50 CET: Detected display size (horizontal): 212 mm
22:32:50 CET: OpenGL-> Renderer String: Software Rasterizer
22:32:50 CET: OpenGL-> Version reported:  2.1 Mesa 10.3.2
22:32:50 CET: OpenGL-> Texture rectangle format: de1
22:32:50 CET: OpenGL-> Using Vertexbuffer Objects
22:32:50 CET: OpenGL-> Using Framebuffer Objects
22:32:50 CET: OpenGL-> Using FBO Stencil buffer
22:32:50 CET: OpenGL-> Using Stencil buffer clipping
22:32:50 CET: OpenGL-> Using Scissor Clipping
22:32:50 CET: OpenGL-> Using s3tc dxt1 compression
22:32:50 CET: OpenGL-> Compressed tile size: 128kb (6:1)
22:32:50 CET: OpenGL-> Minimum cartographic line width:  1.0
22:32:50 CET: OpenGL-> Minimum symbol line width:  1.0
22:32:50 CET: ChartDB Cache policy:  Application target is 40 MBytes
22:32:50 CET: Loading chart db version: V018
Mesa was though found.
Sean said: "If it finds the mesa drivers it might not be faster, so possibly must add the location of the right libGLESv1_CM.so to LD_LIBRARY_PATH... "
I searched and found this:
pi@raspberrypi / $ sudo find / -name libGLESv1_CM.so
/opt/vc/lib/libGLESv1_CM.so
How do I know this is the right one and how and where do I point to that??
Thanks
Håkan
Hakan is online now   Reply With Quote
Old 07-01-2016, 19:05   #162
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by did-g View Post
I think you haven't compiled wx with opengl
In your wx 2.8 directory
rerun configure as before but with the parameter --with-opengl;
configure --with-opengl
make
make install

It seems you also need the latest OCPN from git for arm, update it
and recompile OCPN.
configure --with-opengl fails to find OpenGL

Code:
checking for OpenGL headers... found in /usr/include
checking for GL/gl.h... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for -lGL... no
checking for -lMesaGL... no
configure: error: OpenGL libraries not available
aruntu@aruntu:~/wxGTK-2.8.12/build$
NahanniV is offline   Reply With Quote
Old 07-01-2016, 23:00   #163
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by Hakan View Post
OK - I've built and it runs as usual. Log file says:
Code:
22:32:49 CET: Creating MyFrame...size(800, 460)  position(0, 49)
22:32:49 CET: Creating glChartCanvas
22:32:50 CET: Detected display size (horizontal): 212 mm
22:32:50 CET: Detected display size (horizontal): 212 mm
22:32:50 CET: OpenGL-> Renderer String: Software Rasterizer
22:32:50 CET: OpenGL-> Version reported:  2.1 Mesa 10.3.2
22:32:50 CET: OpenGL-> Texture rectangle format: de1
22:32:50 CET: OpenGL-> Using Vertexbuffer Objects
22:32:50 CET: OpenGL-> Using Framebuffer Objects
22:32:50 CET: OpenGL-> Using FBO Stencil buffer
22:32:50 CET: OpenGL-> Using Stencil buffer clipping
22:32:50 CET: OpenGL-> Using Scissor Clipping
22:32:50 CET: OpenGL-> Using s3tc dxt1 compression
22:32:50 CET: OpenGL-> Compressed tile size: 128kb (6:1)
22:32:50 CET: OpenGL-> Minimum cartographic line width:  1.0
22:32:50 CET: OpenGL-> Minimum symbol line width:  1.0
22:32:50 CET: ChartDB Cache policy:  Application target is 40 MBytes
22:32:50 CET: Loading chart db version: V018
Mesa was though found.
Sean said: "If it finds the mesa drivers it might not be faster, so possibly must add the location of the right libGLESv1_CM.so to LD_LIBRARY_PATH... "
I searched and found this:
pi@raspberrypi / $ sudo find / -name libGLESv1_CM.so
/opt/vc/lib/libGLESv1_CM.so
How do I know this is the right one and how and where do I point to that??
Thanks
Håkan
Code:
export LD_LIBRARY_PATH=/opt/vc/lib/
./opencpn
You should get different stuff in the log file as well, if not, maybe post the output of cmake from a clean build directory.

I think on some distributions the standard path is /opt/vc/lib so maybe I should also search there to avoid the LD_LIBRARY_PATH issue
seandepagnier is offline   Reply With Quote
Old 08-01-2016, 08:37   #164
Registered User

Join Date: Jun 2015
Posts: 379
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by NahanniV View Post
configure --with-opengl fails to find OpenGL

Code:
checking for OpenGL headers... found in /usr/include
checking for GL/gl.h... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for -lGL... no
checking for -lMesaGL... no
configure: error: OpenGL libraries not available
aruntu@aruntu:~/wxGTK-2.8.12/build$
I'm not sure, you have OpenGL dev files but not the libraries or it can't find them.
what's the output of:
Code:
dpkg --get-selections | grep -i mesa
ie list all installed packages with name containing mesa

Hope you have nothing important on this box, seems all this stuff may not end well, kind of mess only a full install will recover, just saying.
did-g is offline   Reply With Quote
Old 08-01-2016, 11:48   #165
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by did-g View Post
I'm not sure, you have OpenGL dev files but not the libraries or it can't find them.
what's the output of:
Code:
dpkg --get-selections | grep -i mesa
ie list all installed packages with name containing mesa
Code:
aruntu@aruntu:~$ dpkg --get-selections |grep -i mesa
libegl1-mesa:armhf                install
libegl1-mesa-drivers:armhf            install
libgl1-mesa-dev                    install
libgl1-mesa-dri:armhf                install
libgl1-mesa-glx:armhf                install
libglapi-mesa:armhf                install
libgles2-mesa:armhf                install
libglu1-mesa:armhf                install
libglu1-mesa-dev                install
libopenvg1-mesa:armhf                install
libwayland-egl1-mesa:armhf            install
mesa-common-dev                    install
mesa-utils-extra                install
aruntu@aruntu:~$
Quote:
Originally Posted by did-g View Post
Hope you have nothing important on this box, seems all this stuff may not end well, kind of mess only a full install will recover, just saying.
No problem, easy to back up when everything is on a 16GSD Card.

Sorry I am struggling with this,
Thanks for your help.

JM.
NahanniV is offline   Reply With Quote
Reply

Tags
enc, opencpn


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN on Raspberry PI2 starnakel OpenCPN 284 16-03-2017 13:58
Has anyone gotten any Plugins working on Raspberry Pi2 Uncle Augie OpenCPN 5 27-06-2015 06:19
Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work? Gunnar1 OpenCPN 53 16-06-2015 02:10
Raspberry Pi2 ratsea OpenCPN 5 26-02-2015 08:41
The Perfect Platform for OpenCPN ? Raspberry Pi night0wl OpenCPN 10 08-09-2011 19:09

Advertise Here


All times are GMT -7. The time now is 12:50.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.