[Ves] VES on the Raspberry Pi

Pat Marion pat.marion at kitware.com
Sat Jul 6 21:21:58 EDT 2013


See the CMakeLists.txt example in Apps/Android/Kiwi/jni that I mentioned in
my last email.  That project does a find_package() for VES and VTK.  For
vtk-host, no, it isn't installed because it's not normally used, but you
can run make install in the CMakeExternals/Build/vtk-host directory.  But,
you can just as easily use VTK directory from it's build directory.  When
you configure your project, just set
VTK_DIR=/path/to/build/CMakeExternals/Build/vtk-host.  Then use
find_package(VTK) in your project's CMakeLists.txt.

The kiwi tests don't use ves-config.cmake because they are not meant to be
built as a separate project... they are compiled as part of VES.  Have you
copied them elsewhere?  In that case, again, see the Android/Kiwi example
as a standalone project that uses VES and VTK.

Pat


On Sat, Jul 6, 2013 at 7:05 AM, John Donovan <mersey.viking at gmail.com>wrote:

> OK, I had assumed that there would be a standard install target that
> could be run from the main makefile, but no matter, I've softlinked
> the Install directory to a convenient place. But here's another thing
> I'm not getting is that the CMakeLists.txt for the test don't appear
> to use the ves-config.cmake, so for now I've just added the paths to
> the CPLUS_INCLUDE_PATH env var. What's happening now is that it can't
> find the VTK headers - again, another assumption is that the
> superbuild would put the relevant files into the
> CMakeExternals/Install/vtk-host directory, but that's empty - is there
> an install step for VTK that I missed? The superbuild seems to build
> VTK fine and the header it can't find is in
> /home/pi/bin/VES/CMakeExternals/Source/vtk/Common/Core/vtkSmartPointer.h
>
> -JD
>
> On 5 July 2013 17:19, Pat Marion <pat.marion at kitware.com> wrote:
> > There is an install target.  The superbuild installs VES locally in
> > CMakeExternals/Install/ves-host.  Only headers and libs are installed,
> not
> > the test programs.  The install tree is relocatable, you can copy the
> > directories to someplace else.  Also a ves-config.cmake file is
> installed so
> > that you can find and use VES using cmake from an external project.  For
> an
> > example, see the CMakeLists.txt in Apps/Android/Kiwi/jni
> >
> > Pat
> >
> >
> >
> > On Fri, Jul 5, 2013 at 12:14 PM, John Donovan <mersey.viking at gmail.com>
> > wrote:
> >>
> >> OK, that makes sense. Yes, I've made sure VES_USE_DESKTOP_GL was set
> >> to OFF but I found BUILD_TESTING was set to ON in one macro. I had
> >> assumed that the no desktop/build test combo build non-GLUT tests,
> >> which was where my confusion lay, so I changed the macro and I've just
> >> built the libraries successfully - it looks like there is no "install"
> >> target though, so presumably I'll have to set up paths manually. I'll
> >> have a go at the TestKiwiViewer in a while.
> >>
> >> Thanks for the hand-holding!
> >>
> >> -JD
> >>
> >> On 5 July 2013 14:52, Aashish Chaudhary <aashish.chaudhary at kitware.com>
> >> wrote:
> >> > On Fri, Jul 5, 2013 at 6:33 AM, John Donovan <mersey.viking at gmail.com
> >
> >> > wrote:
> >> >>
> >> >> OK, the issue I seem to be getting is a conflict between the function
> >> >> declarations in gl.h and those in GLES/gl2.h while compiling
> >> >> TestDrawPlane.cpp because (free)GLUT is including the standard OpenGL
> >> >> headers. I'm surprised GLUT is needed at all on mobile platforms, but
> >> >> vesTestHelper.h uses it.
> >> >
> >> >
> >> > No GLUT is not required on mobile platforms. We use it on desktop for
> >> > testing.  Did you set VES_USE_DESKTOP_GL to OFF?  Another thing to try
> >> > is
> >> > set BUILD_TESTING to OFF (just to make sure you can compile core
> >> > libraries
> >> > on the system).
> >> >>
> >> >>
> >> >> As GLUT includes GL/gl.h, I can't even put the GLES include
> >> >> directories first, and surely I don't have to overwrite GL/gl.h with
> >> >> the GLES version. Maybe my configuration is messed up, I'll carry on
> >> >> poking around.
> >> >>
> >> >> -John
> >> >>
> >> >> On 5 July 2013 01:04, Aashish Chaudhary <
> aashish.chaudhary at kitware.com>
> >> >> wrote:
> >> >> > +1 It would be awesome to completely support Raspberry Pi
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Thu, Jul 4, 2013 at 4:43 PM, John Donovan
> >> >> > <mersey.viking at gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> Hi Pat,
> >> >> >> Thanks for the quick reply. I'll get those files in and compiling
> >> >> >> later. The project I am involved in is in its early stages, but I
> am
> >> >> >> happy to hack on the VES source code to improve support for the Pi
> >> >> >> and
> >> >> >> submit pull requests or patches if that would be of help.
> >> >> >>
> >> >> >> Regards,
> >> >> >> John
> >> >> >>
> >> >> >> On 4 July 2013 21:33, Pat Marion <pat.marion at kitware.com> wrote:
> >> >> >> > Hi John,
> >> >> >> >
> >> >> >> > Luis and I got VES to run on raspberry pi without X11, but the
> >> >> >> > work
> >> >> >> > didn't
> >> >> >> > get far enough to get full support added to the VES repository.
> >> >> >> > Attached
> >> >> >> > are two files that are work in progress, this is as far as I
> got.
> >> >> >> > It
> >> >> >> > works
> >> >> >> > with basic mouse input, but it doesn't support keyboard input.
>  My
> >> >> >> > next
> >> >> >> > plan
> >> >> >> > was going to look at SDL to see if I could get key and mouse
> >> >> >> > events
> >> >> >> > that
> >> >> >> > way.
> >> >> >> >
> >> >> >> > To use the attached files, replace src/kiwi/vesKiwiTestHelper.h
> >> >> >> > with
> >> >> >> > the
> >> >> >> > attached file.  Copy vesTestHelperRaspi.h into src/kiwi.
>  Compile,
> >> >> >> > and
> >> >> >> > hopefully if there are compile issues it's easy to fix.  Then
> >> >> >> > launch
> >> >> >> > TestKiwiViewer from the terminal before starting the graphical
> >> >> >> > desktop
> >> >> >> > environment with X11.  You should get a fullscreen render window
> >> >> >> > that
> >> >> >> > shows
> >> >> >> > the spaceship dataset.  Clicking the mouse should exit.  I think
> >> >> >> > everything
> >> >> >> > should work once the keyboard/mouse input is implemented.
> >> >> >> >
> >> >> >> > Luis and I also ran VES using X11, but I don't remember if that
> >> >> >> > was
> >> >> >> > using
> >> >> >> > GLUT or if it used the old VES tests that used only EGL and ES
> 2.0
> >> >> >> > and
> >> >> >> > got
> >> >> >> > keyboard/mouse events directly from X11 apis instead of using
> >> >> >> > GLUT.
> >> >> >> > If
> >> >> >> > you
> >> >> >> > look at the git history of TestKiwiViewer.cpp, you'll find an
> >> >> >> > older
> >> >> >> > version
> >> >> >> > before GLUT was used.
> >> >> >> >
> >> >> >> > Pat
> >> >> >> >
> >> >> >> >
> >> >> >> > On Thu, Jul 4, 2013 at 4:09 PM, John Donovan
> >> >> >> > <mersey.viking at gmail.com>
> >> >> >> > wrote:
> >> >> >> >>
> >> >> >> >> Having just watched the webinar on ITK and VTK on the Pi, I
> >> >> >> >> thought
> >> >> >> >> I
> >> >> >> >> would have a go at compiling VES on my Pi under the latest
> >> >> >> >> Raspbian
> >> >> >> >> using the Superbuild. It compiled fine, but I'm having problems
> >> >> >> >> running the examples.
> >> >> >> >>
> >> >> >> >> the video says that VES bypasses X completely which is great,
> but
> >> >> >> >> if
> >> >> >> >> I
> >> >> >> >> run TestKiwiViewer from the terminal (directly from the Pi, not
> >> >> >> >> via
> >> >> >> >> SSH), I get:
> >> >> >> >> freeglut (./TestKiwiViewer): failed to open display ''
> >> >> >> >>
> >> >> >> >> Running from within X gives me:
> >> >> >> >> freeglut (./TestKiwiViewer): OpenGL GLX extension not supported
> >> >> >> >> by
> >> >> >> >> display
> >> >> >> >> ':0'
> >> >> >> >>
> >> >> >> >> When I was compiling VES it couldn't find GLUT, so I
> >> >> >> >> apt-installed
> >> >> >> >> freeglut3-dev, which I presume is the right dependency. Also
> I'm
> >> >> >> >> using
> >> >> >> >> the version of cmake from the repo - 2.8.9 rather than the very
> >> >> >> >> latest
> >> >> >> >> one as suggested in the ITK on the Raspberry Pi video.
> >> >> >> >>
> >> >> >> >> Is there a step I have missed?
> >> >> >> >>
> >> >> >> >> Regards,
> >> >> >> >> John
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> One of the advantages of being disorderly is that one is
> >> >> >> >> constantly
> >> >> >> >> making exciting discoveries. - AA Milne
> >> >> >> >> _______________________________________________
> >> >> >> >> Ves mailing list
> >> >> >> >> Ves at public.kitware.com
> >> >> >> >> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> One of the advantages of being disorderly is that one is
> constantly
> >> >> >> making exciting discoveries. - AA Milne
> >> >> >> _______________________________________________
> >> >> >> Ves mailing list
> >> >> >> Ves at public.kitware.com
> >> >> >> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > | Aashish Chaudhary
> >> >> > | R&D Engineer
> >> >> > | Kitware Inc.
> >> >> > | www.kitware.com
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> One of the advantages of being disorderly is that one is constantly
> >> >> making exciting discoveries. - AA Milne
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > | Aashish Chaudhary
> >> > | R&D Engineer
> >> > | Kitware Inc.
> >> > | www.kitware.com
> >>
> >>
> >>
> >> --
> >> One of the advantages of being disorderly is that one is constantly
> >> making exciting discoveries. - AA Milne
> >
> >
>
>
>
> --
> One of the advantages of being disorderly is that one is constantly
> making exciting discoveries. - AA Milne
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20130706/e63ec80b/attachment-0002.html>


More information about the Ves mailing list