Skip to content

Commit

Permalink
Merge pull request #32 from mani-monaj/2.0-dev
Browse files Browse the repository at this point in the history
Preparing for 2.0 release
  • Loading branch information
mani-monaj authored Dec 23, 2016
2 parents ef7000e + 1336388 commit daff563
Show file tree
Hide file tree
Showing 70 changed files with 476 additions and 134 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ bin*/*
*.user
*.swp
Thumbs.db
.idea/*
51 changes: 51 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
language: cpp

compiler:
- gcc

# by default Ubuntu Precise is included
# this results on 3 build configurations:
# Ubuntu Precise and Trusty + Latest OSX image
matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx
osx_image: xcode8

addons:
apt:
packages:
- cmake
- libqt4-dev
- libgl1-mesa-dev
- libglu1-mesa-dev
- libprotobuf-dev
- protobuf-compiler
- libode-dev
- libboost-dev

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install qt4 ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install protobuf ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ode --with-double-precision ; fi

install:
# vartypes
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git clone https://github.com/szi/vartypes.git ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git clone https://github.com/lordhippo/vartypes.git -b osx-fix; fi
- cd vartypes
- mkdir build && cd build
- cmake ..
- make
- sudo make install

script:
# grsim
- cd $TRAVIS_BUILD_DIR
- mkdir build && cd build
- cmake ..
- make
- sudo make install
28 changes: 14 additions & 14 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Head Developer
- Ali Koochakzadeh - Amirkabir University of Technology (ali.koochakzade@gmail.com)
## Authors

grSim was originally developed by [Ali Koochakzadeh](https://github.com/ali-k) and [Mani Monajjemu](https://mani.im) from [Parsian](http://wiki.robocup.org/Small_Size_League/Teams#Parsian), the RoboCup Small Size Team of [Amirkabir University of Technology](http://www.aut.ac.ir/aut/). Since 2011, it has received numerous contributions from the RoboCup SSL community as well as Parsian team members (listed below). grSim is Currently maintained by [Mohammad Mahdi Rahimi](https://github.com/Mahi97).

# Project Manager
- Mani Monajjemi - Simon Fraser University (https://github.com/mani-monaj)
### Contributers

- [Christopher Head](https://github.com/Hawk777) - Thunderbots (University of British Coloumbia)
- [Jonathan Fraser](https://github.com/Binaryblade) - Thunderbots (University of British Coloumbia)
- [Verónica Raspeño](vero.uc3m@gmail.com) - University Carlos III of Madrid
- [Alejandro Caparrós](alexcap.uc3m@gmail.com) - University Carlos III of Madrid
- [Jan Segre](jan@segre.in) - RoboIME
- [Henrique Bonini de Britto Menezes](henrique.menezes@usp.br) - Universidade de São Paulo

# Other Contributers
- Christopher Head - University of British Coloumbia (https://github.com/Hawk777)
- Jonathan Fraser - University of British Coloumbia (https://github.com/Binaryblade)
- Verónica Raspeño - University Carlos III of Madrid- (vero.uc3m@gmail.com)
- Alejandro Caparrós - University Carlos III of Madrid - (alexcap.uc3m@gmail.com)
- Jan Segre - RoboIME Team (jan@segre.in)

# Contributers from Parsian Small Size Team from Amirkabir University of Technology
- Sepehr Mohaimanianpour (s.mehdi.mohaimanianpour@gmail.com)
- Arash Behmand (arashbehmand@gmail.com)
### Contributers from Parsian SSL

- [Sepehr Mohaimanianpour](http://sepehr.im)
- [Arash Behmand](https://github.com/arashbehmand)
- [Mohammad Mahdi Rahimi](https://github.com/Mahi97)
- [Ehsan Omidi](#)
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ grSim is a software from developers for developers, mainly
in RoboCup Small Size League domain. Commit logs can be
accessed [here](https://github.com/mani-monaj/grSim/commits/master)

2016-11-05
----------

Mohammad Mahdi Rahimi <mohammadmahdi76@gmail.com>

- Fix png texture chunks
- Send data in 4 camera packet.
- Make it full compatible with both Linux and Mac-osx
- Add Commands for more control on the ball and robots.

2013-03-28
----------

Expand Down
68 changes: 40 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ if(UNIX)
endif()
endif()

# set explicitly the c++ standard to use
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03")

# add src dir to included directories
include_directories(src)
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/include/net)
include_directories(${PROJECT_SOURCE_DIR}/include/physics)


## Handling depenendcies
Expand Down Expand Up @@ -63,11 +67,19 @@ include_directories(${ODE_INCLUDE_DIRS})
list(APPEND libs ${ODE_LIBRARIES})
#TODO: make this an option
option(DOUBLE_PRECISION "Use double precision? If not single precision will be used." ON)
if(DOUBLE_PRECISION)
add_definitions(-DdDOUBLE)
else()
add_definitions(-DdSINGLE)
endif()
if(DOUBLE_PRECISION)
if(APPLE)
add_definitions(-DdIDEDOUBLE)
else()
add_definitions(-DdDOUBLE)
endif()
else()
if(APPLE)
add_definitions(-DdIDESINGLE)
else()
add_definitions(-DdSINGLE)
endif()
endif()

# VarTypes
find_package(VarTypes REQUIRED)
Expand Down Expand Up @@ -123,28 +135,28 @@ set(SOURCES
)

set(HEADERS
src/mainwindow.h
src/glwidget.h
src/graphics.h
src/physics/pworld.h
src/physics/pobject.h
src/physics/pball.h
src/physics/pground.h
src/physics/pfixedbox.h
src/physics/pcylinder.h
src/physics/pbox.h
src/physics/pray.h
src/net/robocup_ssl_server.h
src/net/robocup_ssl_client.h
src/sslworld.h
src/robot.h
src/configwidget.h
src/statuswidget.h
src/logger.h
src/robotwidget.h
src/getpositionwidget.h
src/common.h
src/config.h
include/mainwindow.h
include/glwidget.h
include/graphics.h
include/physics/pworld.h
include/physics/pobject.h
include/physics/pball.h
include/physics/pground.h
include/physics/pfixedbox.h
include/physics/pcylinder.h
include/physics/pbox.h
include/physics/pray.h
include/net/robocup_ssl_server.h
include/net/robocup_ssl_client.h
include/sslworld.h
include/robot.h
include/configwidget.h
include/statuswidget.h
include/logger.h
include/robotwidget.h
include/getpositionwidget.h
include/common.h
include/config.h
)

# files to be compiled
Expand Down
127 changes: 99 additions & 28 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,117 @@
We developed grSim on Ubuntu 9.10+ OS. (Ubuntu 12.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 32 bit Linux. 64 bit compile and run support is experimental.
# GrSim - INSTALL

grSim has dependcies on these external libraries in order to get compiled.
## Overview

- Qt4 Development Libraries
- OpenGL
- Open Dynamics Engine (ODE)
- VarTypes Library
- Google Protobuf
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.

Except VarTypes, all other libraries can be installed using most Linux distributions' package managers.
GrSim is written in C++, in order to compile it, you will need a working toolchain and a c++ compiler.

In order to compile grSim on Ubuntu 12.04+, follow the following steps:
## Dependencies

1. Download and install these packages:
GrSim depends on:

- [CMake](https://cmake.org/) version 2.8+
- [OpenGL](https://www.opengl.org)
- [Qt4 Development Libraries](https://www.qt.io) version 4.8+
- [Open Dynamics Engine (ODE)](http://www.ode.org)
- [VarTypes Library](https://github.com/szi/vartypes)
- [Google Protobuf](https://github.com/google/protobuf)
- [Boost development libraries](http://www.boost.org/) (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`.

### Linux/Unix Installation

If you run a Debian system, or derivative, first ensure that these dependencies are there:

```bash
$ sudo apt-get install git build-essential cmake libqt4-dev libgl1-mesa-dev libglu1-mesa-dev libprotobuf-dev protobuf-compiler libode-dev libboost-dev
```

Next compile and install VarTypes from source. In the following we install VarTypes from source using `git`.

```bash
$ cd /tmp
$ git clone https://github.com/szi/vartypes.git
$ cd vartypes
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install
```

Next, clone grSim into your preferred location.

```bash
$ cd /path/to/grsim_ws
$ git clone https://github.com/mani-monaj/grSim.git
$ cd grSim
```

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

```bash
$ mkdir build
$ cd build
```

Run CMake to generate the makefiles:

```bash
sudo apt-get install build-essential cmake libqt4-dev libgl1-mesa-dev libglu1-mesa-dev libprotobuf-dev libode-dev
$ cmake ..
```

2. Download, Compild & Install VarTypes:
Then compile the program:

```bash
$ make
```

The binary is copied to the `../bin` folder after a successful compilation.

### Mac OS X Installation

Pre-requirements:

- [Xcode](https://developer.apple.com/xcode/) or Xcode Command Line Tools 8.0 or newer
- [Homebrew](http://brew.sh/) package manager.

First ensure the dependencies are there:

```bash
[In a temporary directory]
wget http://vartypes.googlecode.com/files/vartypes-0.7.tar.gz
tar xfz vartypes-0.7.tar.gz
cd vartypes-0.7
mkdir build && cd build
cmake ..
make
sudo make install
$ brew install cmake
$ brew install ode --with-double-precision
$ brew install qt4
$ brew install protobuf
```

3. Compile grSim
If you run into build issues, you may need to run this first:

```bash
$ brew update
$ brew doctor
```
[In grSim folder]
mkdir build
cd build
cmake ..
make

Next we need to install VarTypes manually. Please refer to the documentation above for the procedure.

**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)`

The steps to compile grSim on Mac OS is similar to the steps outlines above for Linux:


```bash
$ cd /path/to/grsim_ws
$ git clone https://github.com/mani-monaj/grSim.git
$ cd ./grSim
$ mkdir build
$ cd build
$ cmake ..
$ make
```

you may want to use a cmake-gui instead of cmake, or maybe ccmake for ncurses fans.
The binary files (grSim and the sample client) will be placed in `../bin`.

## Notes on the performance

The binary files (grSim and sample client) will be placed in `grSim/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
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.
3 changes: 3 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
grSim - RoboCup Small Size League Simulator
Copyright (c) 2011 Parsian SSL Team (Amirkabir University of Technology)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
Expand Down
Loading

0 comments on commit daff563

Please sign in to comment.