OSVR – Build and install osvr-core

Hi guys,

These are just development notes of me building osvr-core for Ubuntu 15.10. This method appeared to work reliably when I reinstalled an OSVR app development environment on my desktop at home.

Install dependencies

-cmake

sudo apt-get install cmake

-OpenCV

sudo apt-get install libopencv-dev

-Boost 1.58 (Did not encountered any issues at indicated in the build instructions)

sudo apt-get install libboost-all-dev

-libusb1

sudo apt-get install libusb-1.0.0-dev

Create a folder for the source downloads (for me):

~/Depot/OSVR

Download sources

Download all the necessary sources for the build of OSVR:

git clone --recursive https://github.com/OSVR/libfunctionality.git
git clone --recursive https://github.com/VRPN/jsoncpp
git clone --recursive https://github.com/OSVR/OSVR-Core.git --branch non-windows-workaround

Build sources

In the right order, first libfunctionality, then jsoncpp, and finally osvr-core :

In ~/Depot/OSVR/libfunctionality/:

mkdir ./build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/osvr -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON
make -j4
sudo make install

In ~/Depot/OSVR/jsoncpp/:

mkdir ./build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/osvr -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON -DJSONCPP_WITH_CMAKE_PACKAGE=ON
make -j4
sudo make install

In ~/Depot/OSVR/OSVR-Core/:

mkdir ./build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/osvr -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON
make -j8
sudo make install

Testing

Admitting that the build went without a hick-up,it is a good time to make sure that all the OSVR gear is connected, and reboot the computer to make sure that all the devices are properly recognised.

We can test the osvr-server as built:

In ~/osvr/bin/:

sudo ./osvr_server ../share/osvrcore/osvr_server_config.json 

The server should have started and should read something such as:

Screenshot from 2016-02-29 10-22-56

And that’s the server ready to go.

You can have a look in ~/osvr/bin/ , there are a couple of sample applications to do basic testing.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s