Git Product home page Git Product logo

buildlibrealsense2tx's Introduction

buildLibrealsense2TX

Build librealsense 2.0 library on the NVIDIA Jetson TX Development kit. Jetson TX1 and Jetson TX2. Intel RealSense D400 series cameras.

This is for version L4T 28.2 / L4T 28.2.1 (JetPack 3.2.1) librealsense v2.13.0

July, 2018

In order for librealsense to work properly, the kernel image must be rebuilt and patches applied to the UVC module and some other support modules. Running installLibrealsense.sh alone will appear to make the camera mostly work but will be missing features such as frame metadata support ( https://github.com/IntelRealSense/librealsense/blob/master/doc/frame_metadata.md ).

Note: On the Jetson TX1, space onboard the device is at a premium. If you are going to rebuild the kernel, flash the Jetson and then modify the kernel. Afterwards you can delete the kernel sources before installing the rest of librealsense and dependencies.

Rebuilding the kernel

The Jetsons have the v4l2 module built into the kernel image. The module should not be built as an external module, due to needed support for the carrier board camera. Because of this, a separate kernel Image should be generated, as well as any needed modules (such as the patched UVC module).

In order to support Intel RealSense cameras with built in accelerometers and gyroscopes, modules need to be enabled. These modules are in the Industrial I/O ( IIO ) device tree. The Jetson already has IIO support enabled in the kernel image to support the INA3321x power monitors. To support these other HID IIO devices, IIO_BUFFER must be enabled; it must be built into the kernel Image as well.

Most developers will want to apply the needed patches, configure the kernel .config file to match their desired environment, and then build their kernel Image and modules. The scripts assumes that the source is in the usual place for the Jetson, i.e. /usr/src/kernel/kernel-4.4, though you may want to change it to match your needs. Note: You can examine buildPatchedKernel.sh for the general outline of building the kernel.

The script scripts/patchKernel.sh will patch the kernel modules and Image to support the librealsense2 cameras.

$ sudo ./scripts/patchKernel.sh

The kernel configuration modifications are in the scripts/configureKernel.sh script.

$ sudo ./scripts/configureKernel.sh

This script modifies the Industrial I/O device modules as needed and then ensures that any dependencies are met. The script also sets the local version to the local version of the current kernel. See the script for more details.

Note: The configureKernel.sh script sets the local version of the kernel to be the current local version, ie -tegra on a stock kernel. If that is not your intention, modify configureKernel.sh appropriately.

A nasty little alternative

If you live a little more dangerously, and you are not concerned with building/maintaining your own kernel, there is a script which downloads the kernel source, patches it, builds a new kernel and installs it. To be clear, this is not good development methodology.

$ ./buildPatchedKernel.sh

By default, the kernel sources will be erased from the disk after the kernel has been compiled and installed. You will need >3GB of disk space to build the kernel in this manner. Please note that you should do this on a freshly flashed system. In the case when something goes wrong, it may make the system fail and become unresponsive; the only way to recover may be to use JetPack to reflash.

The script has an option to keep the kernel sources and build information:

$ ./buildPatchedKernel.sh --nocleanup

which may prove useful for debugging purposes.

The script is more provided as a guide on how to build a system that supports librealsense2 than as a practical method to generate a new system.

Install librealsense 2.0

To install the librealsense library:

$ ./installLibrealsense.sh

The install script does the following:

  • Install dependencies
  • Applies Jetson specific patches
  • Sets up udev rules so the camera may be used in user space
  • Builds librealsense, tools and demos
  • Installs libraries and executables

Tracking Module

Some RealSense cameras have a tracking module. Here's some more info on that:

TM1-specifics: Tracking Module requires hid_sensor_custom kernel module to operate properly. Due to TM1's power-up sequence constrains, this driver is required to be loaded during boot for the HW to be properly initialized.

In order to accomplish this add the driver's name hid_sensor_custom to /etc/modules file, eg:

$ echo 'hid_sensor_custom' | sudo tee -a /etc/modules`

Releases

July, 2018

v0.9
  • librealsense now has native CUDA support (v2.13.0)
  • librealsense v2.13.0 requires CMake 3.8+; Jetson has 3.5.1 so CMake is rebuilt
  • L4T 28.2 / L4T 28.2.1 (JetPack 3.2.1)
  • librealsense 2.13.0

May, 2018

v0.81
  • Fix README.md directions

April, 2018

v0.8
  • Initial support for Jetson TX1
  • Added CUDA support for yuy2->RGB/BGR/RGBA/BGRA
  • L4T 28.2 (JetPack 3.2)
  • librealsense 2.10.4

April, 2018

v0.5 (Development)
  • Initial support for Jetson TX2
  • L4T 28.2 (JetPack 3.2)
  • librealsense 2.10.2

MIT License

Copyright (c) 2017-2018 Jetsonhacks Portions Copyright (c) 2015-2018 Raffaello Bonghi (jetson_easy) Portions Copyright (c) 2016 Mehran Maghoumi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

buildlibrealsense2tx's People

Contributors

jetsonhacks avatar mohammedari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

buildlibrealsense2tx's Issues

Will it influence the use of realsense r200?

Hello, JetsonHacks. Thanks for your tutorials. And since I have fllowed your previous tutorials of realsense r200, and it works well. And I wonder would this tutorials influence the use of realsense r200? I may still need to use r200 sometimes.

No CMAKE_CUDA_COMPILER could be found (solved)

I have a similar issue to issue #12 but am unable to fix it (SOLVED-- see answer below). I am installing with CUDA 9.0 and the path to the compiler is in the usual location, /usr/local/cuda-9.0/bin/nvcc. The install with the script installLibrealsens.sh works fine without CUDA but fails when CUDA is selected.

The error is:
CMake Error at CMakeLists.txt:7 (project):
No CMAKE_CUDA_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CUDACXX" or the CMake cache entry CMAKE_CUDA_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.

I tried to export CUDACXX as /usr/local/cuda-9.0/bin and also as /usr/local/cuda-9.0/bin/nvcc and also as nvcc
but none of those helped. The PATH also contains /usr/local/cuda-9.0/bin

I tried modifying the CMakeLists.txt file that is generated with the CUDA option off. I changed the CUDA option to ON and added this line to the CUDA section:
set(CMAKE_CUDA_COMPILER /usr/local/cuda-9.0/bin/nvcc)
but I don't know how to use that CMakeLists.txt file to drive a new compile. If I just use "make" it does not update the compilation.

UPDATE: It has to do with ownership. If I run installLibrealsens.sh without sudo, then it finds the CUDA compiler but fails with:

/usr/local/cuda-9.0/bin: Permission denied

If I run the script as sudo, either with or without the -E option to keep environment variables, then it cannot find the CUDA compiler.

ANSWERED:
put
CUDACXX=/usr/local/cuda-9.0/bin/nvcc
into /etc/environment so that it is applied when using sudo.

no display

I hava built the realsense follow your sugestion, and install successfully
my steps:

  1. flash os,install cuda
  2. run script:getKernelSourcesNoGUI.sh from https://github.com/jetsonhacks/buildJetsonTX2Kernel
  3. run ./installLibrealsense.sh
  4. run sudo ./scripts/patchKernel.sh
  5. run sudo ./scripts/configureKernel.sh

Errors for building librealsense, headers, tools and demos

Hi!

I was following https://www.jetsonhacks.com/2018/04/09/intel-realsense-d400-librealsense2-nvidia-jetson-tx-dev-kits/ and did try to build the library with ./installLibrealsense.sh on a Jetson TX-2 and Ubuntu 18.04

I get the following errors:

`
Building librealsense, headers, tools and demos
Scanning dependencies of target realsense
[ 2%] Building CXX object CMakeFiles/realsense.dir/src/archive.cpp.o
[ 2%] Building CXX object CMakeFiles/realsense.dir/src/context.cpp.o
[ 3%] Building CXX object CMakeFiles/realsense.dir/src/device.cpp.o
In file included from /home/tamer/librealsense/src/archive.h:8:0,
from /home/tamer/librealsense/src/archive.cpp:2:
/home/tamer/librealsense/src/types.h:577:14: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<void()> continuation;
^~~~~~~~
/home/tamer/librealsense/src/types.h:585:50: error: expected ‘)’ before ‘<’ token
explicit frame_continuation(std::function<void()> continuation, const void* protected_data) : continuation(continuation), protected_data(protected_data) {}
^
/home/tamer/librealsense/src/types.h: In constructor ‘rsimpl::frame_continuation::frame_continuation()’:
/home/tamer/librealsense/src/types.h:583:32: error: class ‘rsimpl::frame_continuation’ does not have any field named ‘continuation’
frame_continuation() : continuation( {}) {}
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h: In constructor ‘rsimpl::frame_continuation::frame_continuation(rsimpl::frame_continuation&&)’:
/home/tamer/librealsense/src/types.h:588:59: error: class ‘rsimpl::frame_continuation’ does not have any field named ‘continuation’
frame_continuation(frame_continuation && other) : continuation(std::move(other.continuation)), protected_data(other.protected_data)
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:588:88: error: ‘class rsimpl::frame_continuation’ has no member named ‘continuation’; did you mean ‘frame_continuation’?
nuation(frame_continuation && other) : continuation(std::move(other.continuation)), protected_data(other.protected_data)
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h:590:19: error: ‘class rsimpl::frame_continuation’ has no member named ‘continuation’; did you mean ‘frame_continuation’?
other.continuation = {};
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: In member function ‘void rsimpl::frame_continuation::operator()()’:
/home/tamer/librealsense/src/types.h:596:13: error: ‘continuation’ was not declared in this scope
continuation();
^~~~~~~~~~~~
In file included from /home/tamer/librealsense/src/uvc.h:8:0,
from /home/tamer/librealsense/src/device.h:8,
from /home/tamer/librealsense/src/device.cpp:4:
/home/tamer/librealsense/src/types.h:577:14: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<void()> continuation;
^~~~~~~~
/home/tamer/librealsense/src/types.h:585:50: error: expected ‘)’ before ‘<’ token
explicit frame_continuation(std::function<void()> continuation, const void* protected_data) : continuation(continuation), protected_data(protected_data) {}
^
/home/tamer/librealsense/src/types.h: In constructor ‘rsimpl::frame_continuation::frame_continuation()’:
/home/tamer/librealsense/src/types.h:583:32: error: class ‘rsimpl::frame_continuation’ does not have any field named ‘continuation’
frame_continuation() : continuation( {}) {}
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h: In constructor ‘rsimpl::frame_continuation::frame_continuation(rsimpl::frame_continuation&&)’:
/home/tamer/librealsense/src/types.h:588:59: error: class ‘rsimpl::frame_continuation’ does not have any field named ‘continuation’
frame_continuation(frame_continuation && other) : continuation(std::move(other.continuation)), protected_data(other.protected_data)
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:588:88: error: ‘class rsimpl::frame_continuation’ has no member named ‘continuation’; did you mean ‘frame_continuation’?
frame_continuation(frame_continuation && other) : continuation(std::move(other.continuation)), protected_data(other.protected_data)
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h:590:19: error: ‘class rsimpl::frame_continuation’ has no member named ‘continuation’; did you mean ‘frame_continuation’?
other.continuation = {};
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: In member function ‘void rsimpl::frame_continuation::operator()()’:
/home/tamer/librealsense/src/types.h:596:13: error: ‘continuation’ was not declared in this scope
continuation();
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:596:13: note: suggested alternative: ‘frame_continuation’
continuation();
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: In member function ‘void rsimpl::frame_continuation::reset()’:
/home/tamer/librealsense/src/types.h:604:13: error: ‘continuation’ was not declared in this scope
continuation = {};
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:596:13: note: suggested alternative: ‘frame_continuation’
continuation();
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: In member function ‘void rsimpl::frame_continuation::reset()’:
/home/tamer/librealsense/src/types.h:604:13: error: ‘continuation’ was not declared in this scope
continuation = {};
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:604:13: note: suggested alternative: ‘frame_continuation’
continuation = {};
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: In member function ‘rsimpl::frame_continuation& rsimpl::frame_continuation::operator=(rsimpl::frame_continuation&&)’:
/home/tamer/librealsense/src/types.h:611:13: error: ‘continuation’ was not declared in this scope
continuation();
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:604:13: note: suggested alternative: ‘frame_continuation’
continuation = {};
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: In member function ‘rsimpl::frame_continuation& rsimpl::frame_continuation::operator=(rsimpl::frame_continuation&&)’:
/home/tamer/librealsense/src/types.h:611:13: error: ‘continuation’ was not declared in this scope
continuation();
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:611:13: note: suggested alternative: ‘frame_continuation’
continuation();
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h:613:34: error: ‘class rsimpl::frame_continuation’ has no member named ‘continuation’; did you mean ‘frame_continuation’?
continuation = other.continuation;
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h:614:19: error: ‘class rsimpl::frame_continuation’ has no member named ‘continuation’; did you mean ‘frame_continuation’?
other.continuation = {};
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: In destructor ‘rsimpl::frame_continuation::~frame_continuation()’:
/home/tamer/librealsense/src/types.h:621:13: error: ‘continuation’ was not declared in this scope
continuation();
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:611:13: note: suggested alternative: ‘frame_continuation’
continuation();
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h:613:34: error: ‘class rsimpl::frame_continuation’ has no member named ‘continuation’; did you mean ‘frame_continuation’?
continuation = other.continuation;
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h:614:19: error: ‘class rsimpl::frame_continuation’ has no member named ‘continuation’; did you mean ‘frame_continuation’?
other.continuation = {};
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: In destructor ‘rsimpl::frame_continuation::~frame_continuation()’:
/home/tamer/librealsense/src/types.h:621:13: error: ‘continuation’ was not declared in this scope
continuation();
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:621:13: note: suggested alternative: ‘frame_continuation’
continuation();
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: At global scope:
/home/tamer/librealsense/src/types.h:630:44: error: expected ‘)’ before ‘<’ token
calibration_validator(std::function<bool(rs_stream, rs_stream)> extrinsic_validator,
^
/home/tamer/librealsense/src/types.h:638:14: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<bool(rs_stream from_stream, rs_stream to_stream)> extrinsic_validator;
^~~~~~~~
/home/tamer/librealsense/src/types.h:639:14: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<bool(rs_stream stream)> intrinsic_validator;
^~~~~~~~
/home/tamer/librealsense/src/types.h:621:13: note: suggested alternative: ‘frame_continuation’
continuation();
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: At global scope:
/home/tamer/librealsense/src/types.h:630:44: error: expected ‘)’ before ‘<’ token
calibration_validator(std::function<bool(rs_stream, rs_stream)> extrinsic_validator,
^
/home/tamer/librealsense/src/types.h:638:14: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<bool(rs_stream from_stream, rs_stream to_stream)> extrinsic_validator;
^~~~~~~~
/home/tamer/librealsense/src/types.h:639:14: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<bool(rs_stream stream)> intrinsic_validator;
^~~~~~~~
In file included from /home/tamer/librealsense/src/uvc.h:8:0,
from /home/tamer/librealsense/src/device.h:8,
from /home/tamer/librealsense/src/ds-device.h:8,
from /home/tamer/librealsense/src/r200.h:8,
from /home/tamer/librealsense/src/context.cpp:8:
/home/tamer/librealsense/src/types.h:577:14: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<void()> continuation;
^~~~~~~~
/home/tamer/librealsense/src/types.h:585:50: error: expected ‘)’ before ‘<’ token
explicit frame_continuation(std::function<void()> continuation, const void* protected_data) : continuation(continuation), protected_data(protected_data) {}
^
/home/tamer/librealsense/src/types.h: In constructor ‘rsimpl::frame_continuation::frame_continuation()’:
/home/tamer/librealsense/src/types.h:583:32: error: class ‘rsimpl::frame_continuation’ does not have any field named ‘continuation’
frame_continuation() : continuation( {}) {}
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h: In constructor ‘rsimpl::frame_continuation::frame_continuation(rsimpl::frame_continuation&&)’:
/home/tamer/librealsense/src/types.h:588:59: error: class ‘rsimpl::frame_continuation’ does not have any field named ‘continuation’
frame_continuation(frame_continuation && other) : continuation(std::move(other.continuation)), protected_data(other.protected_data)
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:588:88: error: ‘class rsimpl::frame_continuation’ has no member named ‘continuation’; did you mean ‘frame_continuation’?
frame_continuation(frame_continuation && other) : continuation(std::move(other.continuation)), protected_data(other.protected_data)
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h:590:19: error: ‘class rsimpl::frame_continuation’ has no member named ‘continuation’; did you mean ‘frame_continuation’?
other.continuation = {};
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: In member function ‘void rsimpl::frame_continuation::operator()()’:
/home/tamer/librealsense/src/types.h:596:13: error: ‘continuation’ was not declared in this scope
continuation();
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:596:13: note: suggested alternative: ‘frame_continuation’
continuation();
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: In member function ‘void rsimpl::frame_continuation::reset()’:
/home/tamer/librealsense/src/types.h:604:13: error: ‘continuation’ was not declared in this scope
continuation = {};
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:604:13: note: suggested alternative: ‘frame_continuation’
continuation = {};
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: In member function ‘rsimpl::frame_continuation& rsimpl::frame_continuation::operator=(rsimpl::frame_continuation&&)’:
/home/tamer/librealsense/src/types.h:611:13: error: ‘continuation’ was not declared in this scope
continuation();
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:611:13: note: suggested alternative: ‘frame_continuation’
continuation();
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h:613:34: error: ‘class rsimpl::frame_continuation’ has no member named ‘continuation’; did you mean ‘frame_continuation’?
continuation = other.continuation;
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h:614:19: error: ‘class rsimpl::frame_continuation’ has no member named ‘continuation’; did you mean ‘frame_continuation’?
other.continuation = {};
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: In destructor ‘rsimpl::frame_continuation::~frame_continuation()’:
/home/tamer/librealsense/src/types.h:621:13: error: ‘continuation’ was not declared in this scope
continuation();
^~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:621:13: note: suggested alternative: ‘frame_continuation’
continuation();
^~~~~~~~~~~~
frame_continuation
/home/tamer/librealsense/src/types.h: At global scope:
/home/tamer/librealsense/src/types.h:630:44: error: expected ‘)’ before ‘<’ token
calibration_validator(std::function<bool(rs_stream, rs_stream)> extrinsic_validator,
^
/home/tamer/librealsense/src/types.h:638:14: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<bool(rs_stream from_stream, rs_stream to_stream)> extrinsic_validator;
^~~~~~~~
/home/tamer/librealsense/src/types.h:639:14: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<bool(rs_stream stream)> intrinsic_validator;
^~~~~~~~
/home/tamer/librealsense/src/device.cpp: In lambda function:
/home/tamer/librealsense/src/device.cpp:369:71: error: no matching function for call to ‘rsimpl::frame_continuation::frame_continuation(std::function<void()>&, const void*&)’
frame_continuation release_and_enqueue(continuation, frame);
^
In file included from /home/tamer/librealsense/src/uvc.h:8:0,
from /home/tamer/librealsense/src/device.h:8,
from /home/tamer/librealsense/src/device.cpp:4:
/home/tamer/librealsense/src/types.h:588:9: note: candidate: rsimpl::frame_continuation::frame_continuation(rsimpl::frame_continuation&&)
frame_continuation(frame_continuation && other) : continuation(std::move(other.continuation)), protected_data(other.protected_data)
^~~~~~~~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:588:9: note: candidate expects 1 argument, 2 provided
/home/tamer/librealsense/src/types.h:583:9: note: candidate: rsimpl::frame_continuation::frame_continuation()
frame_continuation() : continuation( {}) {}
^~~~~~~~~~~~~~~~~~
/home/tamer/librealsense/src/types.h:583:9: note: candidate expects 0 arguments, 2 provided
CMakeFiles/realsense.dir/build.make:62: recipe for target 'CMakeFiles/realsense.dir/src/archive.cpp.o' failed
make[2]: *** [CMakeFiles/realsense.dir/src/archive.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/realsense.dir/build.make:75: recipe for target 'CMakeFiles/realsense.dir/src/context.cpp.o' failed
make[2]: *** [CMakeFiles/realsense.dir/src/context.cpp.o] Error 1
CMakeFiles/realsense.dir/build.make:88: recipe for target 'CMakeFiles/realsense.dir/src/device.cpp.o' failed
make[2]: *** [CMakeFiles/realsense.dir/src/device.cpp.o] Error 1
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/realsense.dir/all' failed
make[1]: *** [CMakeFiles/realsense.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

real 0m3,044s
user 0m6,724s
sys 0m0,696s
librealsense did not build
`

Any idea on how to solve this?

When available

Hey Jetsonhacks,

very nice that you take ont this challange!
Do you already know when this repo will be finished?

I am just starting with the D435 on the Jetson, is there already a way to get them both working together?

Cheers
Gustav

D435I: can ONLY get infrared 1 data in the 3 cameras

Required Info  
Camera Model D435i
Firmware Version 05.10.13.00
Operating System & Version Linux (Ubuntu 16.04)
Kernel Version (Linux Only) 4.4.38+
Platform TX2 JETPACK3.2.1 L4T28.2.1
SDK Version 2.18.1

image

CAN NOT get:
infrared 2, RGB Camera
TX2 CAN recognize the 3 cameras :
xxx@XXX:$ ls /dev/ | grep video
crw-rw-rw-+ 1 root plugdev 81, 0 Feb 22 12:39 video0
crw-rw-rw-+ 1 root plugdev 81, 1 Feb 22 12:39 video1
crw-rw-rw-+ 1 root plugdev 81, 2 Feb 22 12:39 video2
xxx@XXX:$ v4l2-ctl --list-devices
Intel(R) RealSense(TM) Depth Ca (usb-3530000.xhci-3):
/dev/video0
/dev/video1
/dev/video2
When enable 1 camera at once, can ONLY get the infrared 1 camera data, can NOT get either infrared 2 or RGB camera data (No Frames Received).
And there is a kind of ERROR backend-v4l2.cpp:1335 reported by realsense-viewer in terminator
screenshot from 2019-02-22 13-07-11

When enable infrared 1 and infrared 2 at same time, neither of them can get frame

image

And I also tested with rs_capture ,
xxx@XXX:~$ /usr/local/bin/rs-capture
22/02 15:31:39,458 ERROR [547675435472] (backend-v4l2.cpp:1335)
RealSense error calling rs2_pipeline_wait_for_frames(pipe:0x9094b0):
Frame didn't arrived within 5000

rs_capture log file is attacted:
2019-02-22-15_31_38.log

A workable way and some threads for people who need.

Basically the same time, I successfully install the librealsense2 in a TX2 with J120 carrier board In jetpack3.2.

My procedure as follow:

Flash the TX2 by using jetpack 3.2(with J120 USB patch, if you are using official board, just ignore)
Using jetpack3.0 to install CUDA8.0 and cudnn5.1
git clone https://github.com/freemanlo/librealsense
cd librealsense/scripts/
gedit patch-utils.sh
delete line 138
`sudo rm ${tgt_ko}.bckup`
save
sudo apt-get install libusb-1.0-0-dev pkg-config cmake git libglfw3-dev qtcreator cmake-curses-gui build-essential libgtk-3-dev libssd-dev
cd  ../
./scripts/patch-realsense-ubuntu-xenial-jetson-tx2.sh 
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger
install opencv by using https://github.com/jetsonhacks/buildOpenCVTX2 (ignore if you have already done that)
mkdir build && cd build
cmake ../ -DBUILD_EXAMPLES=true
make && sudo make install

some thread may help:

Install in Jetpack 3.2 (Intel provided an official patch script)
IntelRealSense/librealsense#1424

Install in Jetpack3.1
IntelRealSense/librealsense#1095 (I simply tested and some file can't be downloaded)

Best

how to install newer librealsense 2.25?

I have TX2 and I just have installed up-to-date JetPack 4.2.2, L4T 32.2.1.
How can I install librealsense 2.25 instead of old 2.13?
what is the procedure? what does mean "Build and apply patched kernel modules"?
Do I need to run getKernelSources.sh from buildJetsonTX2Kernel at first and then patch it and only then install librealsense?
(https://github.com/jetsonhacks/buildJetsonTX2Kernel)

I need newer because I want to use t265 camera.

error while './buildPatchedKernel.sh'

I am using TX2 with Auvidea j120 (jetpack 3.2.1) and trying to build librealsense2tx.
Whenever I try to build it, I got this.
Anyone can help?
Thanks in advance!

CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
LINK vmlinux
LD vmlinux.o
MODPOST vmlinux.o
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
drivers/built-in.o: In function nvs_remove': /usr/src/kernel/kernel-4.4/drivers/misc/nvs/nvs_iio.c:1804: undefined reference to devm_iio_kfifo_free'
/usr/src/kernel/kernel-4.4/drivers/misc/nvs/nvs_iio.c:1804:(.text+0x26137c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol devm_iio_kfifo_free' drivers/built-in.o: In function nvs_init':
/usr/src/kernel/kernel-4.4/drivers/misc/nvs/nvs_iio.c:1846: undefined reference to devm_iio_kfifo_allocate' /usr/src/kernel/kernel-4.4/drivers/misc/nvs/nvs_iio.c:1846:(.text+0x26203c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol devm_iio_kfifo_allocate'
Makefile:959: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1
Make did not successfully build
Please fix issues and retry build

Install Librealsense with CUDA on Jetson Tx2

I have installed CUDA 8.0 on the Jetson Tx2 and am trying to install Librealsense using the jetson hacks script.
I can install the library fine without CUDA, but whenever I enable the CUDA flag, I am getting an issue that the CMAKE_CUDA_COMPILER flag is not found. I can compile other applications using CUDA just fine, but for some reason Librealsense cannot detect my version of CUDA. I've been trying to manually set the CMAKE_CUDA_COMPILER flag to /usr/bin/cc but that just throws another error during build.

I am using jetson hacks install Librealsense package for the installation, and updating the SDK version to 2.14.1 instead of 2.13.0. But both SDK versions return the same error for me.

D435 camera unable to connect after killing launch !

Hello,
when starting TX2 and testing roslaunch realsense2_camera rs_camera.launch, it works !


When i kill the node and start it again, SOMETIMES, IT FAILS,
and unable to restart node without restarting TX2 !!!

auto-starting new master
process[master]: started with pid [26020]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to a9b3279e-90e9-11e8-8a3c-00044b8c50d7
process[rosout-1]: started with pid [26035]
started core service [/rosout]
process[camera/realsense2_camera_manager-2]: started with pid [26054]
process[camera/realsense2_camera-3]: started with pid [26055]
[ INFO] [1532619390.555301027]: Initializing nodelet with 6 worker threads.
[ INFO] [1532619390.735162427]: RealSense ROS v2.0.3
[ INFO] [1532619390.735321338]: Running with LibRealSense v2.13.0
[ERROR] [1532619390.752382648]: No RealSense devices were found! Terminating RealSense Node...
[FATAL] [1532619390.958182460]: Failed to load nodelet '/camera/realsense2_camera` of type `realsense2_camera/RealSenseNodeFactory` to manager `realsense2_camera_manager'
[camera/realsense2_camera_manager-2] process has died [pid 26054, exit code 1, cmd /opt/ros/kinetic/lib/nodelet/nodelet manager __name:=realsense2_camera_manager __log:=/home/nvidia/.ros/log/a9b3279e-90e9-11e8-8a3c-00044b8c50d7/camera-realsense2_camera_manager-2.log].
log file: /home/nvidia/.ros/log/a9b3279e-90e9-11e8-8a3c-00044b8c50d7/camera-realsense2_camera_manager-2*.log
[camera/realsense2_camera-3] process has died [pid 26055, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet load realsense2_camera/RealSenseNodeFactory realsense2_camera_manager __name:=realsense2_camera __log:=/home/nvidia/.ros/log/a9b3279e-90e9-11e8-8a3c-00044b8c50d7/camera-realsense2_camera-3.log].
log file: /home/nvidia/.ros/log/a9b3279e-90e9-11e8-8a3c-00044b8c50d7/camera-realsense2_camera-3*.log
^C[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete

Failed to build - CUDA compiler identification is unknown

Getting this error message when i tried to build:

navaneeth@mousebox:~/workspace/spconv$ python3 setup.py bdist_wheel
running bdist_wheel
running build
running build_py
running build_ext
Release
|||||CMAKE ARGS||||| ['-DCMAKE_PREFIX_PATH=/home/navaneeth/.local/lib/python3.6/site-packages/torch', '-DPYBIND11_PYTHON_VERSION=3.6', '-DSPCONV_BuildTests=OFF', '-DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr" -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/navaneeth/workspace/spconv/build/lib.linux-x86_64-3.6/spconv', '-DCMAKE_BUILD_TYPE=Release']
-- The CXX compiler identification is GNU 7.4.0
-- The CUDA compiler identification is unknown
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working CUDA compiler: /usr/local/bin/cmake
-- Check for working CUDA compiler: /usr/local/bin/cmake -- broken
CMake Error at /usr/local/share/cmake-3.15/Modules/CMakeTestCUDACompiler.cmake:46 (message):
  The CUDA compiler

    "/usr/local/bin/cmake"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/navaneeth/workspace/spconv/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/make cmTC_03517/fast && /usr/bin/make -f CMakeFiles/cmTC_03517.dir/build.make CMakeFiles/cmTC_03517.dir/build
    make[1]: Entering directory '/home/navaneeth/workspace/spconv/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp'
    Building CUDA object CMakeFiles/cmTC_03517.dir/main.cu.o
    /usr/local/bin/cmake    "--expt-relaxed-constexpr" -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__    -x cu -c /home/navaneeth/workspace/spconv/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp/main.cu -o CMakeFiles/cmTC_03517.dir/main.cu.o
    Parse error in command line argument: -D__CUDA_NO_HALF_OPERATORS__
    Should be: VAR:type=value
    CMake Error: No cmake script provided.
    CMake Error: Problem processing arguments. Aborting.
    
    CMakeFiles/cmTC_03517.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_03517.dir/main.cu.o' failed
    make[1]: *** [CMakeFiles/cmTC_03517.dir/main.cu.o] Error 1
    make[1]: Leaving directory '/home/navaneeth/workspace/spconv/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp'
    Makefile:121: recipe for target 'cmTC_03517/fast' failed
    make: *** [cmTC_03517/fast] Error 2
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:6 (project)


-- Configuring incomplete, errors occurred!
See also "/home/navaneeth/workspace/spconv/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log".
See also "/home/navaneeth/workspace/spconv/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "setup.py", line 99, in <module>
    zip_safe=False,
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run
    self.run_command('build')
  File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 40, in run
    self.build_extension(ext)
  File "setup.py", line 82, in build_extension
    subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/navaneeth/workspace/spconv', '-DCMAKE_PREFIX_PATH=/home/navaneeth/.local/lib/python3.6/site-packages/torch', '-DPYBIND11_PYTHON_VERSION=3.6', '-DSPCONV_BuildTests=OFF', '-DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr" -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/navaneeth/workspace/spconv/build/lib.linux-x86_64-3.6/spconv', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

I have environment variables in my ~/.bashrc as:

export PATH=/usr/local/cuda-10.1/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda-10.1/lib64
export CUDA_BIN_PATH=/usr/local/cuda-10.1/bin
export CMAKE_CUDA_COMPILER=/usr/local/cuda-10.1/bin/gcc
export CUDACXX=/usr/local/cuda-10.1/bin
export CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.1

cmake version: 3.15.0
nvcc version: 10.1.168

can't test D435 cam : errors !! Help !

hello, friends.
Tested some bin utils, doesn't work !!

nvidia@tegra-ubuntu:/usr/local/bin$ ./rs-color
There are 1 connected RealSense devices.

Using device 0, an Intel RealSense USB2
    Serial number: 727212070514
    Firmware version: 05.08.15.00

The connected device doesn't support color streaming!
nvidia@tegra-ubuntu:/usr/local/bin$ ./rs-depth
There are 1 connected RealSense devices.

Using device 0, an Intel RealSense USB2
    Serial number: 727212070514
    Firmware version: 05.08.15.00

The connected device doesn't support depth streaming!
nvidia@tegra-ubuntu:/usr/local/bin$ ./rs-capture 
X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  149 (RANDR)
  Minor opcode of failed request:  8 (RRGetScreenResources)
  Serial number of failed request:  14
  Current serial number in output stream:  14

./rs-pointcloud 
X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  149 (RANDR)
  Minor opcode of failed request:  8 (RRGetScreenResources)
  Serial number of failed request:  14
  Current serial number in output stream:  14

My cam : d435
connected to small TX2, usb3 port, with a 4 ports unpowered hub.

Any idea ??
Thanks the team.
Vincent

Seg fault with the examples

I ran the scripts with
./buildPatchedKernel.sh

sudo reboot 0

./installLibrealsense.sh

And when I try to run the example code (either rs-capture or realsense-viewer) on my tx2 I segfault and coredump.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.