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.
GrSim depends on:
- CMake version 3.5+
- pkg-config
- OpenGL
- Qt5 Development Libraries
- Open Dynamics Engine (ODE)
- VarTypes Library forked from Szi's Vartypes
- Google Protobuf
- Boost development libraries (needed by VarTypes)
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
.
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
You can get latest grSim from Docker Hub with:
docker pull robocupssl/grsim:latest
The container can be run in two flavors:
- Headless:
docker run robocupssl/grsim
- With VNC:
docker run --net=host -eVNC_PASSWORD=vnc -eVNC_GEOMETRY=1920x1080 robocupssl/grsim vnc
- Then launch your VNC client app (e.g. Remmina).
- Connect to
localhot:5900
. - Enter a password (default:
vnc
) to login.
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
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
For Mac OS X, you will need to have installed:
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
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++
andC++ 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
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
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.
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.
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.
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.
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.