Monday, August 19, 2013

Installing VRUI and LidarViewer

The following is a quick guide to getting the VRUI toolkit and LidarViewer up and running. These instructions assume you are running the Ubuntu operating system. Please post questions in the comments.


Step 1 

Download the Build-Ubuntu.sh script from http://idav.ucdavis.edu/~okreylos/ResDev/Vrui/Download.html and run it. You can use the following instructions to do this from a terminal. (You can open a terminal by pressing Ctrl+Alt+T).

    Click on script name above.
    Select "Save File" and press "OK" in the dialog that pops up.
    If a file selection dialog pops up:
    Select your home directory and press "Save."
    Open a terminal window.
    If no file selection dialog popped up in step 2:
    In the terminal window, type "cd Downloads" (without the quotes) and press Enter.
    In the terminal window, type "sha1sum Build-Ubuntu.sh" (without the quotes) and press Enter. Compare the displayed checksum to the one shown above, and do not proceed unless the checksums match.
    In the terminal window, type "sh Build-Ubuntu.sh" (without the quotes) and press Enter.
    Follow the prompts in the terminal window.
    If everything worked, a new window showing a spinning globe will pop up. That's it!

The default install directory for Vrui is ~/src/Vrui-2.8/ and the binaries are in ~/src/Vrui-2.8/ExamplePrograms/bin/

If everything works, you should be shown Vrui running a spinning globe in a black window.









Step 2

Next you should download and run LidarViewer. Go to http://idav.ucdavis.edu/~okreylos/ResDev/LiDAR/Download.html and get the most recent version.

Download the LidarViewer folder to your Downloads folder.

You will need to unzip it all to a folder, then run the "make" command from that folder.

The LidarViewer README file gives these detailed instructions to do this. Your <download path> will likely be "~/Downloads", and you can press the Tab key to fill in the <version> in the console.

1. Change into ~/src directory and unpack the LiDAR Viewer tarball:
   > cd ~/src
   > tar xfz <download path>/LidarViewer-<version>.tar.gz
   - or -
   > tar xf <download path>/LidarViewer-<version>.tar

2. Change into LiDAR Viewer base directory:
   > cd LidarViewer-<version>

3. If the Vrui version installed in step 0 was not 2.7, or Vrui's
   installation directory was changed from the default of ~/Vrui-2.7,
   adapt the makefile using a text editor. Change the value of
   VRUI_MAKEDIR close to the beginning of the file as follows:
   VRUI_MAKEDIR := <Vrui install dir>/share/make
   Where <Vrui install dir> is the installation directory chosen in
   step 0. Use $(HOME) to refer to the user's home directory instead
   of ~.

4. Optional: Adapt makefile if LiDAR Viewer is to be installed in a
   different location, for example /usr/local. Set INSTALLDIR to the
   desired target location. LiDAR Viewer will be then be installed in
   <INSTALLDIR>/bin, and its configuration file will be installed in
   <INSTALLDIR>/etc (where <INSTALLDIR> is the value of INSTALLDIR set
   in the makefile).

5. Build LiDAR Viewer:
   > make
   This creates the following executables in ./bin: The LAS file range
   calculation utility, CalcLasRange; the LiDAR data preprocessor,
   LidarPreprocessor; the point cloud subtraction filter,
   LidarSubtractor; the processor to calculate lighting information,
   LidarIlluminator; the LiDAR data viewer itself, LidarViewer; and a
   utility to print saved primitives in human-readable form,
   PrintPrimitiveFile.

6. Optional: Install LiDAR Viewer in the selected target location.
   This is only necessary if the INSTALLDIR variable in the makefile
   was changed. By default, LiDAR Viewer can be run from its base
   directory. To install:
   > make install
   - or, if the target location is a system directory -
   > sudo make install
   This will copy all executables into <INSTALLDIR>/bin, and the
   LidarViewer.cfg configuration file into <INSTALLDIR>/etc.

7. Optional: Add directory containing the LiDAR Viewer executables
   (~/src/LidarViewer-<version>/bin in the default installation,
   <INSTALLDIR>/bin otherwise) to the user's search path. This allows
   running LiDAR Viewer from any directory. Using csh or tcsh:
   > setenv PATH ${PATH}:~/src/LidarViewer-<version>/bin
   - or -
   > setenv PATH ${PATH}:<INSTALLDIR>/bin
   where <INSTALLDIR> is the target location set in the makefile.
   Using bash:
   > export PATH=${PATH}:~/src/LidarViewer-<version>/bin
   - or -
   > export PATH=${PATH}:<INSTALLDIR>/bin
   These lines can also be added to the user's .cshrc or .bashrc files
   to make the additions persist between logins.

Further instructions on using LidarViewer can be found in the LidarViewer manual. We will be adding instructions on obtaining, importing, and viewing LIDAR data sets in a later blog post.

No comments:

Post a Comment