Installing and building osgART (older versions)

From ARToolworks support library

Jump to: navigation, search

Main Page > osgART > Installing and building osgART (older versions)

The information on this page relates to older versions of osgART. For information relating to the current version, please see the page Installing and building osgART.

Contents

Version 1.0

Windows

Supported compilers

  • osgART v1.0: Microsoft Visual Studio .NET 2003 is required. Take note that the standard OpenSceneGraph 1.2 binary installation for Windows is set up for linking to MSVS .NET2003, and you should use our rebuilt OSG installer [1] if you are using MSVS 2005 instead.

Specifying the location of ARToolKit

When using ARToolKit, ARToolKit4, or ARToolKitNFT for video capture and/or tracking, you will need to set up environment variables so that osgART knows where to find the directories containing these files. We define an environment variable named ARTOOLKIT_2_ROOT pointing to where the ARToolKit folder is, and if using ARToolKit Professional, another environment variable ARTOOLKIT_4_ROOT pointing to the ARToolKit4 folder, and if using ARToolKit NFT, yet another environment variable ARTOOLKIT_NFT_ROOT. See the pictures below for examples:

Opening the solution

Build files for Visual Studio are located inside folders named VS2003 and VS2005 inside the folder VisualStudio at the top level of the osgART distribution.

The solution file to open is named osgART.sln.

Which project files to build

The minimum set of projects which constitutes a usable build of osgART is the osgART library itself, and a video plugin and a tracker plugin. If using ARToolKit Professional, build the targets in this order:

  1. osgART
  2. Plugin ARToolKit Video
  3. Plugin ARToolKit 4 Professional Tracker

Once these are built, you can build and test the sample "Example Simple".

Mac OS X

Supported compilers

Apple's Xcode Tools, version 2.4 or later is required. (Xcode Tools is available free with registration with ADC at [2].)

Specifying the location of ARToolKit

osgART must be able to find its dependencies during the build process. The XCode project file comes setup for a folder structure like this:

someDirectory/   (top-level development directory)
	ARToolKit/    (ARToolKit v2.x - used by default for video capture)
		bin
		examples
		include
		lib
	ARToolKit4/    (ARToolKit Professional v4.x - recommended tracker plugin)
		bin
		examples
		include
		lib
	OpenSceneGraph/
		Examples/
		Frameworks/
		Plugins/
	OSGART/
		bin/
		docs/
		etc/
		include/
		src/
		VisualStudio/
		XCode/

If you wish to change this structure, you must change the path defined for the build settings ARTOOLKIT_2_ROOT, ARTOOLKIT_4_ROOT, and ARTOOLKIT_NFT_ROOT in the Xcode targets.

Building using the XCode IDE

  1. Unpack the archive to a convenient location, and open the file osgART.xcodeproj located inside the folder XCode, at the top level of the osgART distribution.
  2. Make sure that ARToolKit builds and that you can run the simpleLite ARToolKit example without errors.
  3. Click "Build" from within Xcode. The targets required to build osgART will be built in the correct order.

Linux

The following instructions apply to osgART v1.0. unpack osgART into a local folder (e.g. /home/thatsme/Projects/)

	$> tar xfzj osgART-x.x.tar.bz2

you unpacked osgART into /home/thatsme/Projects/osgART

	$> cd /home/thatsme/Projects/osgART/bin

You need to know where artoolkit is installed and start make

	$> make -f GNUmakefile ARTOOLKIT_PATH="/home/thatsme/Projects/artoolkit"

Assure the ARTOOLKIT_CONFIG is set correctly for the videocapture you are using. For example using GStreamer with the TV testsignal simulator you can use:

	$> echo $ARTOOLKIT_CONFIG
	videotestsrc ! identity name=artoolkit ! fakesink

or for using Video4Linux it should read something like this:

	$> echo $ARTOOLKIT_CONFIG
	-dev=/dev/video0 -width=320 -height=240 -palette=YUV420P

Please consult the ARToolKit documentation for more information how to set up video capturing correctly. To run the example the runtime linker need to be able to load the plugins. For example in a bash shell:

	$> export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH"

run the example

	$> ./osgart_example

For using the same build system as osgART you need bakefile. You can copy the original bakefile to a new one and add another target for your application. $> cd /home/thatsme/Projects/osgART/bin $> cp osgART.bkl MyosgART.bkl You need to edit the bakefile for making changes to the source and include directories of your project. Additionally you need to regenerate the makefile from the bakefile.

	$> bakefile -f gnu MyosgART.bkl
Personal tools