ERROR : Can't create DepthSensor module

OS : Windows
Editor : Visual studio 2019
Language : C++
Device : Intel Realsense 435

I received the following error.

My guess is that the settings in the nuitrack.config file are wrong.
The “chmod” in “docs” doesn’t seem to work.
If desired, I will show you a capture of the “config file”.

I did not modify the config file at all. Environment variables were set.

Sombody help me. Thank you:)

//Following source code
#include <nuitrack/Nuitrack.h>
#include <iomanip>
#include <iostream>
using namespace tdv::nuitrack;
void showHelpInfo()
{
	std::cout << "Usage: nuitrack_console_sample [path/to/nuitrack.config]" << std::endl;
}
// Callback for the hand data update event
void onHandUpdate(HandTrackerData::Ptr handData)
{
	if (!handData)
	{
		// No hand data
		std::cout << "No hand data" << std::endl;
		return;
	}
	auto userHands = handData->getUsersHands();
	if (userHands.empty())
	{
		// No user hands
		return;
	}
	auto rightHand = userHands[0].rightHand;
	if (!rightHand)
	{
		// No right hand
		std::cout << "Right hand of the first user is not found" << std::endl;
		return;
	}
	std::cout << std::fixed << std::setprecision(3);
	std::cout << "Right hand position: "
		"x = " << rightHand->xReal << ", "
		"y = " << rightHand->yReal << ", "
		"z = " << rightHand->zReal << std::endl;
}
int main(int argc, char* argv[])
{
	showHelpInfo();
	std::string configPath = "C:\\Program Files\\Nuitrack\\nuitrack\\nuitrack\\data\\nuitrack.config";
	if (argc > 1)
		//configPath = argv[1];
	// Initialize Nuitrack
	try
	{
		Nuitrack::init(configPath);
	}
	catch (const Exception & e)
	{
		std::cerr << "Can not initialize Nuitrack (ExceptionType: " << e.type() << ")" << std::endl;
		return EXIT_FAILURE;
	}

	// Create HandTracker module, other required modules will be
	// created automatically
	auto handTracker = HandTracker::create();
	// Connect onHandUpdate callback to receive hand tracking data
	handTracker->connectOnUpdate(onHandUpdate);
	// Start Nuitrack
	try
	{
		Nuitrack::run();
	}
	catch (const Exception & e)
	{
		std::cerr << "Can not start Nuitrack (ExceptionType: " << e.type() << ")" << std::endl;
		return EXIT_FAILURE;
	}
	int errorCode = EXIT_SUCCESS;
	while (true)
	{
		try
		{
			// Wait for new hand tracking data
			Nuitrack::waitUpdate(handTracker);
		}
		catch (LicenseNotAcquiredException & e)
		{
			std::cerr << "LicenseNotAcquired exception (ExceptionType: " << e.type() << ")" << std::endl;
			errorCode = EXIT_FAILURE;
			break;
		}
		catch (const Exception & e)
		{
			std::cerr << "Nuitrack update failed (ExceptionType: " << e.type() << ")" << std::endl;
			errorCode = EXIT_FAILURE;
		}
	}
	// Release Nuitrack
	try
	{
		Nuitrack::release();
	}
	catch (const Exception & e)
	{
		std::cerr << "Nuitrack release failed (ExceptionType: " << e.type() << ")" << std::endl;
		errorCode = EXIT_FAILURE;
	}
	return errorCode;
}

Hi, you can get “rs2_config_resolve(config: pipe: )” error from Realsense2DepthProvider because you don’t use USB 3.0 with your sensor or usb port is out of order.
To solve the problem you can try to setup RawWidth and RawHeight parameters in nuitrack.config file:

   "Realsense2Module":
   {
       "Depth":
       {
           "RawWidth": 640,
           "RawHeight": 480
       }
   }
1 Like