I’m currently evaluating Nuitrack for my project. I have downloaded the SDK and the Win64 distribution. I have successfully added the headers and .lib files to my VC2015 project and have been able to successfully compile the application and run it. The required DLL’s are in the output folder.
However, when calling
Nuitrack::init(""), it throws a
BadConfigValueException. So I have copied the files in
<install_folder>/data to my project’s assets folder and supply the path to
nuitrack.config to the
const std::filesystem::path configPath = findPath( "data" ) / "nuitrack.config";
nuitrack::Nuitrack::init( configPath.string() );
This time it throws a more generic
My questions are:
- Is a config file necessary and can I use the one from the distribution?
- Since this is a Trial version, do I need a
license.json file somewhere?
- I did not set the environment variables
NUITRACK_HOME and did not add the
bin folder to
PATH, as described in the installation manual, because I don’t want to force this on other developers and prefer to work without them. Does the source code rely on these settings and if so, how can I work around them?
P.S.: I am using an Intel RealSense D435 which is connected. It works well with both the RealSense Viewer application and the
after adding the
bin directory to
PATH, the call to
Nuitrack::init() was successful. Is there a way to make the call work without changing
If you use a custom .config file you need to change a couple of the paths inside the config file as well.
The moment you change the path in the init() … the system also wants to start using that new path as the basis for the location of all the elements the system needs to access.
As such u will need to also have the /data/ and /middleware/ paths in locations relative to the same place … AND you may also need to make sure your licence.json file is in the correct relative location - OR edit the config file manually to make sure all the paths are correct.
You may be better off just using the nuitrack default path so that all the references work correctly.
thanks for your reply. I’ll have a look at the contents of the config file. At first glance, though, it seemed I copied all required files from the Win64
data folder to my own
assets/data folder, so maybe it needs even more files from somewhere else. I will do some trial and error testing to see if I can find the magic mix.
bin folder to
PATH is something I really like to avoid, because it means all developers will have to do this on their machines and it will break the automated build, unless of course we add a build step that takes care of that.
Alright, I solved it!
It was an oversight on my part. I had copied all DLL files from
<my_project>/resources, except for
OpenNI2.dll because I thought I did not need it. That was problem number one. For completeness: I did not need to copy the
<install_folder>/bin/OpenNI2 folder, only the DLL.
Problem number two was an incorrect path in
nuitrack.config, which in my case can be found in
<my_project>/data, along with all the other files from
<install_folder>/data. I had to change to path in
DynamicModules to point to my
../resources folder instead, where a copy of
NuitrackModule.dll can be found.
With those two changes, I can now compile, run and connect to Nuitrack without requiring any changes to my environment variables.
Just a heads up - this is how we originally setup our test and development systems for similar reasons.
HOWEVER … there is no way that I am aware of that will allow you to run the LICENCE activation system without setting up the PATH environment variable and the NUITRACK_HOME environment variable as well.
The activation module seems to be hard coded to use these variables … and once run the licence.json file is also placed based on these settings
OK, good point.
The path to the
license.json file can be found in the config file as well, so theoratically it should be able to find it. Since I haven’t licensed the software yet (still in trial, because I still don’t know if we can use Nuitrack for our current setup), I of course don’t know if we need to create a separate license file for each (target and development) machine. Ah well, it’s something we should be able to figure out and not a huge dealbreaker. Not being able to run 2 cameras on the same machine might be, however.
FYI - Yes you need a separate licence for each computer running nuitrack - which means you need a method of registering and activating the nuitrack runtime on EACH computer it is connected to.
The registration system appears to BIND itself to an individual computer - so as such the activation must be run ON that computer. And for that to run you must setup the NUITRACK_HOME and PATH environment variables.
But yes ONCE you have a valid licence.json file on a system you could move it in your own folder structure - provided yes you change the nuitrack.config paths to point correctly.