Skip to content

Latest commit

 

History

History
170 lines (115 loc) · 5.55 KB

INSTALL.md

File metadata and controls

170 lines (115 loc) · 5.55 KB

GrSim - INSTALL

Overview

We developed grSim on Ubuntu OS. (Ubuntu 14.04+ tested and is recommended). It is important that the graphics card driver is installed properly (the official Ubuntu packages for nVidia and AMD(ATI) graphics cards are available). grSim will compile and run in both 32 and 64 bits Linux and Mac OS, and in 64 bit Windows.

GrSim is written in C++, in order to compile it, you will need a working toolchain and a c++ compiler.

Dependencies

GrSim depends on:

Note: It's necessary to compile ODE in double precision. This is default when installing the ODE binaries in Ubuntu. However, if you are compiling ODE from source (e.g on Mac OS), please make sure to enable the double precision during the configuration step: ./configure --enable-double-precision.

Run from pre-build packages

Installing from Arch Linux package manager

A package of grSim is avaliable on the Arch User Repository, you can install it with your preferred AUR manager. Using yay it can be done with:

yay -S grsim-git

Using docker image

You can get latest grSim from Docker Hub with:

docker pull robocupssl/grsim:latest

The container can be run in two flavors:

  1. Headless: docker run robocupssl/grsim
  2. With VNC: docker run --net=host -eVNC_PASSWORD=vnc -eVNC_GEOMETRY=1920x1080 robocupssl/grsim vnc
    1. Then launch your VNC client app (e.g. Remmina).
    2. Connect to localhot:5900.
    3. Enter a password (default:vnc) to login.

Building and installing from the source code

Installing Dependencies

Arch Linux

If you are running Arch Linux or an Arch Linux based distribution, install the dependencies with:

$ sudo pacman -S base-devel boost hicolor-icon-theme \
                 mesa ode protobuf qt5-base cmake git

Ubuntu / Debian

For Debian, or derivative

sudo apt install git build-essential cmake pkg-config qtbase5-dev \
                   libqt5opengl5-dev libgl1-mesa-dev libglu1-mesa-dev \
                   libprotobuf-dev protobuf-compiler libode-dev libboost-dev

Mac OS X

For Mac OS X, you will need to have installed:

  • Xcode or Xcode Command Line Tools 8.0 or newer;
  • Homebrew package manager.

Than install the dependencies needed:

brew install cmake
brew install pkg-config
brew tap robotology/formulae         
brew install robotology/formulae/ode
brew install qt@5
brew install protobuf@21

If you run into build issues, you may need to run this first:

brew update
brew doctor

Windows (64 bits)

For Windows, you will need to have installed:

  • CMake (tested with version 3.17.2 ). Download and install cmake for windows.
  • Visual Studio (tested with version 16.7.0). During installation make sure to include workload Desktop development with C++ and C++ MFC for latest v142 build tools (x86 x64)
  • vcpkg package manager. Follow installation instructions on their github website.

To install the dependencies, open a terminal in vcpkg installation folder and run the following command (it will take very long to run):

$ ./vcpkg install qt5:x64-windows ode:x64-windows protobuf:x64-windows

Building

First clone grSim into your preferred location.

$ cd /path/to/grsim_ws
$ git clone https://github.com/RoboCup-SSL/grSim.git
$ cd grSim

Create a build directory within the project (this is ignored by .gitignore):

$ mkdir build
$ cd build

Linux and Mac OS X

Run CMake to generate the makefile (note: if you proceed with the installation, grSim will be installed into directory chosen, by default /usr/local):

$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..

Then compile the program:

$ make

The executable will be located on the bin directory.

Windows

Run CMake to generate a solution in visual studio and the build the solution (note: modify the command below to reflect your vcpkg installation folder).

$ cmake -DCMAKE_TOOLCHAIN_FILE=${PATH_TO_VCPKG}\\scripts\\buildsystems\\vcpkg.cmake ..
$ cmake --build . --config Release

The executable will be located on the bin directory.

Installing (Linux and Mac OS X)

At least, if you want to install grSim on your system, run the follow:

$ sudo make install

grSim will be — by default — installed on the /usr/local directory.

Troubleshooting

If you face any problem regarding of updating the grsim version, you can try removing the grsim.xml. If grSim crashes almost instantly with some ODE error the issue might by your ODE version. Try adding -DBUILD_ODE=TRUE to build ODE from source instead of using the system dependency.

Notes on the performance

When running grSim, check the FPS in the status bar. If it is running at 60 FPS or higher, everything is ok. Otherwise check the graphics card's driver installation and OpenGL settings.