Setup Development Workstation - UPenn-RoboCup/UPennalizers GitHub Wiki
This page contains instructions on how to install the program. These instructions will go over how to setup a personal computer for development or simulation.
Linux
First install the third party packages:
Ubuntu/Debian:
sudo apt-get install build-essential lua5.1 liblua5.1-0-dev swig libboost1.48-dev
Fedora/YUM:
sudo yum groupinstall "Development Tools"
sudo yum install readline-devel lua-devel swig boost-devel
Then check out the git repository:
git clone https://github.com/UPenn-RoboCup/UPennalizers.git
Webots
If you desire to use the Webots simulator please download from here:
Note that the current code does not run on Webots 7, so it is recommended that you use 6.4.3 for now. The versions beyond 6.4.3 have a different model of the DARwIn OP compared to the one used in our code base.
Nao Robot
If you are going to be using the code on the Nao robots you will need to download the NaoQi SDK and Cross-Compilation Toolchain provided by Aldebaran. For Nao V3.3, version 1.10 is the last tested and verified working NaoQi release we use. For Nao V4, version 1.12.5 is required.
In order to compile the our NaoQi module you need to set the environment variables NaoqiSDK
and NaoqiCTC
to the path of the extracted NaoQi SDK and CTC respectively.
Mac OSX
There are two techniques - MacPorts and Homebrew
MacPorts
First you will need to install MacPorts. Follow the instructions here.
Install Boost and swig:
sudo port install boost
sudo port install swig
Install Lua:
curl -O http://www.lua.org/ftp/lua-5.1.4.tar.gz
tar -xvf lua-5.1.4.tar.gz
cd lua-5.1.4
make macosx
sudo make install
Homebrew
(This guide is tested with Lion, but is known to work with Snow Leopard, with some version differences, possibly Command Lines Tools not being necessary)
Install XCode 4.3 (or latest version)
Install Command Line Tools for Xcode
brew update
brew install lua boost swig
Seeeduino Development
If you need to flash firmware:
Webots
If you desire to use the Webots simulator:
Other Mac considerations
Set up your UDP port to accept larger packet sizes so that the Monitor functionalities work properly:
sudo nano /etc/sysctl.conf
Add these lines to the bottom:
net.inet.udp.recvspace=147456
net.inet.udp.maxdgram=65536
and reboot your computer.
To use webots with larger camera sizes, adjust your system shared memory paramters.
NOTE: This may cause your system to become unstable!
sudo nano /etc/sysctl.conf
These are the important parameters, however, the numbers may vary for your system.
kern.sysv.shmmax=16777216
kern.sysv.shmmin=1
kern.sysv.shmmni=128
kern.sysv.shmseg=32
kern.sysv.shmall=4096
Setup MEX-file Compilation with OSX Lion and Xcode 4.3 (latest)
- Link Developer Folder which has been moved in latest Xcode
sudo ln -s /Applications/Xcode.app/Contents/Developer /Developer
- Generate MEX option file in MATLAB
>> mex -setup
choose the one with gcc MEX-files
- Modify MEX option file
sudo nano ~/.matlab/$(MATLAB_VERSION)/mexopts.sh
Line 166 : CC='gcc'
Line 167 : SDKROOT='/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk'
Line 181 : CXX=g++
Nao Robot
If you plan on using the Nao robot we recommend setting up a virtual machine using the Ubuntu instructions in order get the cross compilation to work correctly. We do not have a way to compile the code natively on a Mac at this time.