dVC2d Installation Guide
This guide will step you through the process of installing dVC2d, and its graphical frontend, dvcQt.
Install dVC2d in Windows
For a fully functional dVC2d application, we will need a set of software and external libraries. Installation for each dependency will be first briefly introduced in this installation guide. After that, we can download and compile dVC2d code itself.
dVC2d installation for Windows will need the following software and external libraries.
Instructions for installation follow
- Microsoft Visual Studio: Required as C++ development IDE for dVC2d
- TortoiseGit: A git client, implemented as a windows shell extension. TortoiseGit is a really easy to use Revision control / version control / source control software for Windows.
- CMake: CMake is a cross-platform, open-source build system. It's used to control the software compilation process using simple platform and compiler independent configuration files.
- PATH Solver: PATH is used to solve time-stepping formulations when bodies are in contact. Without PATH, the dVC simulator can only handle bodies in freefall.
- Qt: Qt provides an advanced graphical user interface. Without Qt you will not be able to build the dVCQt application.
Dependencies Installation
Microsoft Visual Studio
As of January, 2011, you're required to install Microsoft Visual Studio 2003 for working with dVC2d, at least. With Microsoft's DreamSpark program, students can get Microsoft Visual Studio for free. You might want to check it out at
here. Download your version and get your Visual Studio installed. Please make sure you have Visual C++ selected as an installation component. Aditionally, Visual Studio Express is avaliable for free
here, though it hasn't been tested with these instructions yet.
First you will need to download and install msysgit from
here. During the installation of mysysgit, make sure to select Add “Git Bash here”, then Run Git from the Windows Command Prompt, and Use PLink. They will each be on separate screens. Then download TortoiseGit from
this page. It comes with an easy to use installer. Double click on the installer file and follow the instructions. The installer will take care of the rest.
CMake
Download the CMake binary distribution for Windows from
this page. Double click on the installer file and follow the instructions to finish installation.
PATH Solver
Please download "pathlib.zip" from
ftp://ftp.cs.wisc.edu/math-prog/solvers/path/pathlib.zip , unzip the archive, and you will have a folder called "pathlib". Next you have two options for installing "pathlib", you only need to do
one of the following:
- Place the "pathlib" folder into the dVC source tree in the "libraries" folder. Your directory tree will look like this:
dvc/dvc-2d/libraries/pathlib. Further instructions can be found when you install the source. This is the recommended option.
- Place the "pathlib" folder anywhere in your file system and set an environment variable named PATHLIBDIR to indicate where the folder may be found. For example, *PATHLIBDIR=*C:\pathlib (Here are instructions for setting environment variables in Windows XP. Setting environment variables is pretty similar in other windows versions. )
In addition to one of the above steps, at runtime dVC applications need to find path46.dll. This file is located at
pathlib/lib/windows/dynamic/path46.dll. Copy this dll to a folder that is in your system's search path. The easiest way to accomplish this is to copy
path46.dll to
C:\WINDOWS\system32.
Qt
As of January, 2011 it is required to use Qt4. A guide for installing Qt for dVC2d can be found
here
dVC2d Installation
This part of the instruction assumes you've already installed all software and libraries listed above.
Download dVC2d Package
TortoiseGit can be used to clone the dVC2d repository. It is located at
git://grasp.robotics.cs.rpi.edu/dvc . To clone the repository, right click where you would like to place the folder. In the right click menu, click on Git Clone...
In the Git clone box, enter
git://grasp.robotics.cs.rpi.edu/dvc as the URL, and check that the directory is to your liking. Then press OK.
If you do not wish to use Git, or cannot, a static snapshot can be downloaded
here.
- If you want to install the PATH solver in the dvc source tree, now is the time to do it. Copy the contents of pathlib.zip into dvc/dvc-2d/libraries.
Compile dVC2d
You will configure the compiling using CMake. Create a new folder to contain the build and the folder can be placed anywhere. Next run CMake, usually found in Start --> Program Files --> CMake. Tell CMake where to find the dvc source folder and the dvc build folder:
Press the 'Configure' button. Configuration will be an iterative process, you may have to press 'Configure' a few times before all CMake variables are set. Some variables are hidden by default. You can see and modify them by enabling 'Advanced' on CMake interface. Enabling 'Grouped' will help you categorize all CMake variables. Please make sure
PATH_INCLUDE_DIR and
PATH_LIBRARY are correctly set corresponding to the directory you have placed PATH solver.
When CMake is configured successfully, the 'Generate' button will appear. Press 'Generate' to generate Visual Studio project files. Open the build directory you created in the Configuration step. Open the dvc solution file
DVC.sln. When Visual Studio opens the target
ALL_BUILD will be selected by default. Go to the 'Build' menu and select 'Build ALL_BUILD'. dVC in windows will only work as a 32bit application. Make sure it is set to build as a Win32.
The solution explorer window lists all dVC2d libraries and applications. Right-click on the name of the example application you'd like to run and select the option 'Set as StartUp Project'. Then go to the Debug menu and choose 'Start Without Debugging', or just hit Ctrl+F5. 'dvcQt' is the main, graphical dvc application. It will load the scenes defined by the xml files in "share/dvc/xml/scenes". Enjoy trying out the scenes!
Install dVC2d in Ubuntu
This guide was tested on Ubuntu 10.04 - 32bit.
dVC2d is also known to work on 64bit Ubuntu and Gentoo Linux.
Install needed libraries
It is recommended that you update your system before installing the needed libraries.
sudo apt-get update && apt-get upgrade
Then you can install all the needed libraries and programs at once.
sudo apt-get install libqtcore4 libqt4-dev libsdl-ttf2.0-dev lsb-cxx cmake-curses-gui
Download Source Code
There are two ways of getting the source code. Either through Git, or downloading a zip archive. Git is recommended, as it allows for easier updates.
Download via Git
If you don't have git, you can install it with the package git-core.
sudo apt-get install git-core
In a terminal, move to the directory that you want to install in, for example
cd ~/src
Then you can clone the remote repository.
git clone git://grasp.robotics.cs.rpi.edu/dvc
Download via archive
You can download a zip archive of the sourcecode
here.
Extract the archive in a location of your choosing, usually somewhere in your home folder.
Install the PATH solver
This process varies depending on if you are on a 32bit or 64bit operating system. Most computer sold in the last 3 years run 64bit operating systems.
32bit Install
Automatic Install
cd dvc/dvc-2D/libraries
./download_path.sh
Manual Install
Download the 32bit path library from
http://pages.cs.wisc.edu/~ferris/path.html You can also download the file directly using wget.
ftp://ftp.cs.wisc.edu/math-prog/solvers/path/pathlib.zip
Unzip the downloaded file into
dvc/dvc-2D/libraries/. In particular, you need to have
dvc/dvc-2d/libraries/pathlib/include/ and
dvc/dvc-2d/libraries/pathlib/lib/linux/ copied from the zip file.
64bit Install
First follow the steps for the 32bit install, then download
this file.
Extract and copy the dynamic and static folders to
dvc/dvc-2D/libraries/pathlib/lib/linux, overwriting old files.
Compile
cd dvc/dvc-2D
mkdir build
cd build
ccmake ../
Press c to configure until the option "Press [g] to generate and exit" is available. CMake make inform you of errors during this process that you may need to resolve.
Press [g] to generate and exit.
make
Running dvcQt
dvc/dvc-2d/build/bin/dvcQt
Getting Help (For the original dvc2d)
Download Original dVC2d Package
The main branch of dVC2d project is currently hosted at SourceForge.net. A lighter version is referenced in the above install guide.
To quickly checkout the main development branch of dVC2d, first create a new folder to contain the code. You can place this folder anywhere.
Right-click on the folder and click "SVN Checkout..." (if TortoiseSVN is successfully installed), fill in https://dvc.svn.sourceforge.net/svnroot/dvc/trunk as the URL of repository in the dialog box that prompted.
Click "OK" and the code will start to download if your computer is connected to the internet. Click "OK" when done.
The installation instruction of dVC2d is mainly covered in this page. If you run into problems, please first make sure you followed the steps strictly on this page. If problem still exists, please don't hesitate to send your questions to the DVC mailing list:
dvc-devel@lists.nospam.sourceforge.net. Be sure to include this important information:
- Where/when you downloaded the DVC source code
- Your operating system and compiler
- All error messages if you are encountering compile errors
Subscription to the list is not required but recommended. You can
subscribe from here.
Also, you can find the DVC documentation generated by DoxyGen from
this link.