ARToolkit node github repository (was: How to include an external library creating a custom node)


I’m trying to port ARToolkit in a Vuo node. Quite challenging, I think.
Anyway, I studied the video introduction here on Vuo about creating nodes and succeeded in compiling the examples.
Then, I downloaded ARToolkit SDK and placed in my home path, under /SDKs. There also there’s Vuo SDK.
I created a new node cloning an example, so my structure is:

and I’m trying to build the node placed in

I open the .pro file in QT Creator, choose “Desktop” kit, and add

#include <AR/config.h>

to detect.c file.

Building, i get “<AR/config.h> file not found” error.

I tried adding several INCLUDEPATH directive in .pro file, without success, like
INCLUDEPATH += ~/SDKs/ARToolKit5-bin-5.3.2r1-OSX/include

using brackets, absolute paths, using HEADER directive and so on, but I can’t make it include the header.

So, what’s am I doing wrong?

hm. I upgraded to vuo 1.2.5 to see how Syphon node is implemented, to have a idea of a similar task, and I think this is over my knowledge. The best I can do is spend my 50 credits on that feature request hoping it’ll be considered soon.

I’m trying to port ARToolkit in a Vuo node.

!!! That would be awesome! If you can get past the obstacle of including and linking in the ARToolkit SDK, will you continue working on it?

I tried adding several INCLUDEPATH directive in .pro file

INCLUDEPATH refers to the include paths that Qt would pass to the regular C compiler (clang). Instead, here you need to pass them to the Vuo compiler (vuo-compile).

Starting from the stateless node example from the Vuo SDK, you would add this line…

ARTOOLKIT_PATH = ~/SDKs/ARToolKit5-bin-5.3.2r1-OSX

… and add --header-search-path to the vuo-compile command like so…

node.commands = $${VUO_FRAMEWORK_PATH}/vuo-compile --header-search-path $${ARTOOLKIT_PATH}/include --output ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} \

You’ll also need to help vuo-link find the ARToolkit libraries when it links a composition. This means listing the libraries in the dependencies section of your module metadata and either placing them in the Modules folder or passing --library-search-path arguments. See Vuo: Managing Dependencies for instructions.

Oh, and if ARToolkit links to dynamic libraries (which from skimming the documentation I think it does), and if you plan to distribute the node instead of just using it on your own computer, then there’s an extra step just because dylibs like to be annoying ;) You have to run a command called install-name-tool on them (which, in the Vuo source code, is done in the file If you need help with that, let me know. (6.12 KB)

Cool Jaymie, thanks for these clarifications.
I’ll go on trying in this challenge, following your suggestion.
I’ll report here if I’ll have some success and ask again for your kind help if i’ll get stuck.

1 Like

I succeeded in importing ARToolkit libraries in a Vuo node skeleton, following your suggestion.
But, my skills are not enough to get the goal.
Shouldn’t be impossibile; on ARToolkit website there’s a well documented example that could be used as a reference: GOLDENSLOT88: Link Situs Judi Live Casino Online Resmi dan terbaik Di Indonesia

So, what I did is creating a github project, uploading my humble start, open to all contributors here from Vuo community wishing to give some help. It’s online at GitHub - micrem73/VuoARToolkit: Vuo node that implements ARToolkit markers detection. Actually just a skeleton, importing ARToolkit and Vuo SDKs, open to contributors.
I’ll keep it updated of any eventual step forward I’d get.


1 Like

Hi Jaymie,
actually I got the code compile with success.
When I try to run a composition in the vuo editor that uses that node, I get this error:

Node outdated or broken — One or more nodes in this composition can't be used by this version of Vuo. Make sure you're using the latest version of all the extra Vuo nodes you've installed:

I think i missed the step you mentioned:

You'll also need to help vuo-link find the ARToolkit libraries when it links a composition. This means listing the libraries in the dependencies section of your module metadata and either placing them in the Modules folder or passing --library-search-path arguments. See for instructions.

I read the link provided but I can’t sort it out.
Please, what’s the way to instruct linker with --library-search-path directive?



Also: in console i found this:

24/02/17 10:13:37,602 vuo-compile[1341]:  parseMetadata()  Error: Couldn't parse VuoModuleMetadata as JSON: { "title" : "detect markers", "description" : "Keeps track of how many times this node has been executed, and outputs that count.", "keywords" : [ ], "version" : "1.0.0", "dependencies" : [ AR ], "node": { "isInterface" : false } }

As you can see, I added “AR” dependence, but something is wrong.

"dependencies" : [ AR ] needs some quotes. It should be "dependencies" : [ "AR" ] .

The --library-search-path option is only available when compiling and linking compositions with the command-line tools (found in the Vuo SDK). For example:

./vuo-compile ~/Desktop/SomeComposition.vuo
./vuo-link --library-search-path ~/SDKs/ARToolKit5/lib ~/Desktop/SomeComposition.bc

If running the composition with Vuo Editor instead of the command-line tools, there isn’t currently a way to add a library search path. Instead, you should place the ARToolKit library in the User Modules or System Modules folder.


I put quotes as:

             "dependencies" : [ "AR" ],

following documentation that reads:

Notice that the static and dynamic library names leave off the "lib" prefix, and the file extension is optional; libassimp.a becomes assimp or assimp.a, and libicuuc.dylib becomes icuuc or icuuc.dylib. 

When i run vuo-link (with --library-search-path ~/SDKs/ARToolKit5-bin-5.3.2r1-OSX/lib option ) i get in console:

01/03/17 08:55:56,558 vuo-link[1107]:  getLinkerInputs()  Warning: Could not locate dependency 'AR'.

If instead i put

             "dependencies" : [ "AR.a" ],

this seems to solve the error.

Just to know if I’m doing something wrong, or if the documentation saying that file extension is optional is a mistake.


@cremaschi, I don’t think you did anything wrong. I’m seeing the same problem. Created bug report: API documentation says you can library file extension is optional, but it’s actually required.