Jetson Nano link D435 lib to addon


I’m trying to link the librealsense library installed on my Jetson Nano to the ofxRealsense addon with the 2.2.22 version.

I have tried to create a pkg file for the system to pick it up, but I must be missing something else, because it doesn’t seem to find it.

I have tried to removed the code from the lib folder, and link it from the addon_config without success…

The :

	ADDON_NAME = ofxRealsense2
	ADDON_DESCRIPTION = Addon for Intel librealsense2 (supports D400 series depth camera)
	ADDON_AUTHOR = Hiroshi Matoba
	ADDON_TAGS = "device"


	#ADDON_INCLUDES =  libs/realsense2/include/

	# linux only, any library that should be included in the project using
	# pkg-config

	ADDON_PKG_CONFIG_LIBRARIES = librealsense cuda-10.0 cudart-10.0 libusb-1.0 #OpenCL
	ADDON_LDFLAGS = -L/usr/local/lib/ -L/usr/local/cuda/lib64 -lcuda -lcudart

Then in the exampleLiveCamera here is my config.make : (project linker flags line)
PROJECT_LDFLAGS=-I/usr/local/include/ -I/usr/local/lib/ -L/usr/local/include/ -L/usr/local/lib/ -L/usr/local/cuda/lib64 -lcuda -lcudart

I get the error :

/usr/bin/ld: cannot find -librealsense

i have tried changing the librealsense flag for librealsense-2.21.0,and the error becomes :

Package librealsense-2.22.0 was not found in the pkg-config search path.

The lib was installed following this tutorial , so the lib is installed at this place :

#The library is installed in /usr/local/lib
#The header files are in /usr/local/include
#The demos and tools are located in /usr/local/bin

So my librealsense.pc looks like this :

# Package Information for pkg-config


Name: librealsense
Description: Intel RealSense D435i Library
Version: 2.21.0
Cflags: -I${includedir}/librealsense2
Libs: -L${libdir}
Libs.private: -ldl -lm -lpthread -lrt

Sorry it’s v long.

Hope someone can help me figure this out.


well actually the install from Jetson Hack had a pkg config associated :sweat_smile::sweat_smile:
The solution was to copy the pkg config from the librealsense install to the pkg config folder :

sudo mv /usr/local/lib/pkgconfig/realsense2.pc /usr/lib/pkgconfig/realsense2.pc

I updated my fork of Hiro MTB’s addon with a different branch and a release.

It helped to get inspired by the kinect tutorial of @mad, and @jvcleave install.


1 Like

I will merger your PR asap!
How is the performance of Jetson Nano and Realsense?

Hi @hrs!

Sorry took me so long to get back to you.

Well performances are correct, but the filters are killing it really (temporal one in particular).
Do you have any benchmark to run it against…?

I have create a different branch maybe I should incorporate it to the master branch? How should I proceed…?