In this tutorial we learn how to install Klamp't, step by step.
Difficulty: easy
Time: 10-30 minutes
-
You will need to install the Xcode Command Line Tools. To see if they are installed, run
xcode-select -pIf you see
/Applications/Xcode.app/Contents/Developerthen the full Xcode package is already installed. If not, you'll need to run
xcode-select --install -
Install XQuartz from http://xquartz.macosforge.org/
-
Install homebrew from http://brew.sh
-
In the terminal, run
brew install assimp boost cmake ffmpeg freeglut glui homebrew/science/glpk python qt5 ode --with-double-precision -
Clone the Klamp't git repo:
git clone https://github.com/krishauser/Klampt -
Make the Klamp't dependencies:
cd Klampt/Library; make unpack-deps; make deps -
Configure Klamp't via CMake
cd .. cmake .or
cmake -DCMAKE_BUILD_TYPE=Debug .if you wish to have debugging information.
-
Compile the Klamp't static library:
make Klampt -
Make the apps:
make appsand test that they work:
./SimTest data/athlete_fractal_1.xml
To install the Klamp't Python bindings:
-
Modify ~/.bash_profile as follows to use the homebrew version of Python:
export PATH=~/bin:/usr/local/bin:$PATH export PYTHONPATH=/usr/local/lib/python2.7/site-packages -
Restart your terminal window and check that you have the right Python:
which pythonshould return
/usr/local/bin/python -
In the terminal, install PyOpenGL with:
pip install PyOpenGL -
Make and install the Klamp't Python bindings:
make python make python-installNote: sudo is not required for installation if you use homebrew's Python.
-
Test that the Python bindings work:
python Python/demos/kbdrive.py data/tx90roll.xml