|
1 | 1 | # GrSim - INSTALL
|
| 2 | + |
2 | 3 | ## Overview
|
3 | 4 |
|
4 |
| -We developed grSim on Ubuntu 9.10+ OS. (Ubuntu 14.04+ tested and is recommended). It is very important that the Graphics Card Driver is installed. (Ubuntu packages of nVidia and AMD(ATI) graphics cards are available). grSim will compile and run in both 32 and 64 bits Linux and Mac-osx. |
| 5 | +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. |
5 | 6 |
|
6 | 7 | GrSim is written in C++, in order to compile it, you will need a working toolchain and a c++ compiler.
|
7 | 8 |
|
8 | 9 | ## Dependencies
|
9 | 10 |
|
10 | 11 | GrSim depends on:
|
11 | 12 |
|
12 |
| -- OpenGL <https://www.opengl.org> |
13 |
| -- Qt4 Development Libraries <https://www.qt.io> |
14 |
| -- Open Dynamics Engine (ODE) <http://www.ode.org> |
15 |
| -- VarTypes Library <https://github.com/szi/vartypes> |
16 |
| -- Google Protobuf <https://github.com/google/protobuf> |
17 |
| - |
18 |
| -We use CMake <http://www.cmake.org/> to build and install GrSim. |
| 13 | +- [CMake](https://cmake.org/) version 2.8+ |
| 14 | +- [OpenGL](https://www.opengl.org) |
| 15 | +- [Qt4 Development Libraries](https://www.qt.io) version 4.8+ |
| 16 | +- [Open Dynamics Engine (ODE)](http://www.ode.org) |
| 17 | +- [VarTypes Library](https://github.com/szi/vartypes) |
| 18 | +- [Google Protobuf](https://github.com/google/protobuf) |
| 19 | +- [Boost development libraries](http://www.boost.org/) (needed by VarTypes) |
19 | 20 |
|
| 21 | +**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`. |
20 | 22 |
|
21 |
| -> It's neccessery to use ode double percision so if you'r using source code, please attention to use `./configure --enable-double-precision` for configuration. |
22 |
| -
|
23 |
| -## Linux/Unix Installation |
| 23 | +### Linux/Unix Installation |
24 | 24 |
|
25 | 25 | If you run a Debian system, or derivative, first ensure that these dependencies are there:
|
26 | 26 |
|
27 | 27 | ```bash
|
28 |
| -sudo apt-get install build-essential cmake libqt4-dev libgl1-mesa-dev libglu1-mesa-dev libprotobuf-dev protobuf-compiler libode-dev |
| 28 | +$ sudo apt-get install git build-essential cmake libqt4-dev libgl1-mesa-dev libglu1-mesa-dev libprotobuf-dev protobuf-compiler libode-dev libboost-dev |
29 | 29 | ```
|
30 | 30 |
|
31 |
| -Next we need to install VarTypes manually, which itself depends on Qt4 so please make sure that you installed Qt4 first : |
| 31 | +Next compile and install VarTypes from source. In the following we install VarTypes from source using `git`. |
32 | 32 |
|
33 |
| - $ (Get VarTypes) |
34 |
| - $ cd ./vartypes |
35 |
| - $ mkdir build |
36 |
| - $ cd build |
37 |
| - $ cmake .. |
38 |
| - $ make |
39 |
| - $ sudo make install |
| 33 | +```bash |
| 34 | +$ cd /tmp |
| 35 | +$ git clone https://github.com/szi/vartypes.git |
| 36 | +$ cd vartypes |
| 37 | +$ mkdir build |
| 38 | +$ cd build |
| 39 | +$ cmake .. |
| 40 | +$ make |
| 41 | +$ sudo make install |
| 42 | +``` |
40 | 43 |
|
41 |
| -Next, pull down the project: |
| 44 | +Next, clone grSim into your preferred location. |
42 | 45 |
|
43 |
| - $ git clone https://github.com/mani-monaj/grSim.git |
44 |
| - $ cd ./grSim |
| 46 | +```bash |
| 47 | +$ cd /path/to/grsim_ws |
| 48 | +$ git clone https://github.com/mani-monaj/grSim.git |
| 49 | +$ cd grSim |
| 50 | +``` |
45 | 51 |
|
46 | 52 | Create a build directory within the project (this is ignored by .gitignore):
|
47 | 53 |
|
48 |
| - $ mkdir build |
49 |
| - $ cd build |
| 54 | +```bash |
| 55 | +$ mkdir build |
| 56 | +$ cd build |
| 57 | +``` |
50 | 58 |
|
51 | 59 | Run CMake to generate the makefiles:
|
52 | 60 |
|
53 |
| - $ cmake .. |
| 61 | +```bash |
| 62 | +$ cmake .. |
| 63 | +``` |
54 | 64 |
|
55 | 65 | Then compile the program:
|
56 | 66 |
|
57 |
| - $ make |
| 67 | +```bash |
| 68 | +$ make |
| 69 | +``` |
| 70 | + |
| 71 | +The binary is copied to the `../bin` folder after a successful compilation. |
58 | 72 |
|
59 |
| -The program is now under ../bin directory with the name grSim. You can run it from here just by typing "../bin/grSim" |
| 73 | +### Mac OS X Installation |
60 | 74 |
|
61 |
| -## Mac OS X Installation |
| 75 | +To facilitate the compilation on Mac OS, we use the [Homebrew](http://brew.sh/) package manager. |
62 | 76 |
|
63 |
| -To make it easier to install the dependencies, you can use a package manager like Homebrew. |
64 | 77 | First ensure the dependencies are there:
|
65 | 78 |
|
66 |
| - $ brew install cmake |
67 |
| - $ brew install ode --enable-double-precision |
68 |
| - $ brew install qt4 |
69 |
| - $ brew install protobuf |
| 79 | +```bash |
| 80 | +$ brew install cmake |
| 81 | +$ brew install ode --enable-double-precision |
| 82 | +$ brew install qt4 |
| 83 | +$ brew install protobuf |
| 84 | +``` |
70 | 85 |
|
71 | 86 | If you run into build issues, you may need to run this first:
|
72 | 87 |
|
73 |
| - $ brew update |
74 |
| - $ brew doctor |
75 |
| - |
76 |
| -Next we need to install VarTypes manually : |
77 |
| - |
78 |
| -> Note : the vartypes need some edits to be compatible with mac-osx so it's recommanded to use : |
79 |
| -> <https://github.com/lordhippo/vartypes.git> (branch -> osx-fix) |
80 |
| -
|
81 |
| - |
82 |
| - $ (Get VarTypes) |
83 |
| - $ cd ./vartypes |
84 |
| - $ mkdir build |
85 |
| - $ cd build |
86 |
| - $ cmake .. |
87 |
| - $ make |
88 |
| - $ sudo make install |
89 |
| - |
90 |
| -Next, pull down the project: |
91 |
| - |
92 |
| - $ git clone https://github.com/mani-monaj/grSim.git |
93 |
| - $ cd ./grSim |
94 |
| - |
95 |
| -Create a build directory within the project (this is ignored by .gitignore): |
| 88 | +```bash |
| 89 | +$ brew update |
| 90 | +$ brew doctor |
| 91 | +``` |
96 | 92 |
|
97 |
| - $ mkdir build |
98 |
| - $ cd build |
| 93 | +Next we need to install VarTypes manually. Please refer to the documentation above for the procedure. |
99 | 94 |
|
100 |
| -Run CMake to generate the makefiles: |
| 95 | +**IMPORTANT NOTE:** VarTypes currently does not compile on MacOS. Please use the following fork of Vartypes instead of the official repository: `https://github.com/lordhippo/vartypes.git (branch: osx-fix)` |
101 | 96 |
|
102 |
| - $ cmake .. |
| 97 | +The steps to compile grSim on Mac OS is similar to the steps outlines above for Linux: |
103 | 98 |
|
104 |
| -Then compile the program: |
105 | 99 |
|
106 |
| - $ make |
107 |
| - |
108 |
| -The program is now under `../bin` directory with the name grSim. You can run it from here just by typing `../bin/grSim`; |
| 100 | +```bash |
| 101 | +$ cd /path/to/grsim_ws |
| 102 | +$ git clone https://github.com/mani-monaj/grSim.git |
| 103 | +$ cd ./grSim |
| 104 | +$ mkdir build |
| 105 | +$ cd build |
| 106 | +$ cmake .. |
| 107 | +$ make |
| 108 | +``` |
109 | 109 |
|
| 110 | +The binary files (grSim and the sample client) will be placed in `../bin`. |
110 | 111 |
|
111 |
| -you may want to use a cmake-gui instead of cmake, or maybe ccmake for ncurses fans. |
| 112 | +## Notes on the performance |
112 | 113 |
|
113 |
| -The binary files (grSim and sample client) will be placed in `./bin`. Check the fps in status bar, if it is running on 65fps everything is ok, otherwise check the graphics card installation and OpenGL settings. If you received linker error about GL related libraries, also check your graphics card driver |
| 114 | +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. |
0 commit comments