Nvidia Jetson Xavier NX Developer Kit, a guide, may be referred to get familiar with the device.
A | On your system
- Download the Jetson Xavier NX Developer Kit SD Card Image.
- Download, install, and launch Etcher.
- Connect microSD card.
- Launch Etcher, select the image, and flash the card.
B | On Xavier
- Mount the microSD card on Xavier.
- Connect hdmi, mouse, keyboard, and power. When connected to power, a green light near the micro-USB will turn on. The monitor should display nvidia logo at the start.
- Setup system configuration; select MODE_15W_6CORE.
- Name the system; keep it simple and short as it would appear on terminal like hawkins@hawkins-desktop.
C | Making Xavier Ready
- Press Ctrl+Alt+T to launch the terminal.
- Install X-terminal-emulator, gedit, git.
$ sudo apt install terminator
- Close the terminal and press Ctrl+Alt+T to relaunch it.
$ sudo apt install gedit
$ sudo apt install git
- Use reef ros autoinstall on github to install ros-melodic.
$ git clone https://github.com/uf-reef-avl/reef_auto_install
$ ./reef_auto_install/autoinstall.sh
- Install libraries for realsense camera.
$ sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install git sudo libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev
$ sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev cmake
- Fetch realsense github repository and build it. More information is provided at qualcomm robotics.
$ git clone https://github.com/IntelRealSense/librealsense.git
$ cd librealsense
$ git reset --hard 61cf21520b4bb29c2c1074f7bad74a6cfcd93ca3
$ ./scripts/setup_udev_rules.sh
$ mkdir build && cd build
$ cmake ../ -DBUILD_EXAMPLES=true -DFORCE_RSUSB_BACKEND=true
$ make uninstall && make clean
$ make -j7
$ sudo make install
- Install realsense camera drivers.
$ sudo apt install ros-melodic-realsense2-*
$ sudo apt install ros-melodic-rgbd-launch
- Launch the realsense viewer.
$ realsense-viewer
- To test, use following commands in another terminal window.
$ rs-distance
$ rs-depth
$ rs-save-to-disk
- To install uncc visionlab dvo_slam, use following commands in order:
$ git clone https://github.com/uncc-visionlab/dvo_slam
$ export ROS_PACKAGE_PATH=`pwd`:$ROS_PACKAGE_PATH
$ rosmake dvo_core dvo_ros dvo_slam dvo_benchmark
Note: The installation instructions on uncc-visionlab github repository are outdated and also the repository link to git clone is different.
- Git clone following repository anywhere on the system but not in your project.
$ git clone https://github.com/DLTcollab/sse2neon
-
From inside the sse2neon directory, copy sse2neon.h file to dvo_slam/dvo_core/include/dvo/core/
-
In sse2neon.h, add following macro:
#define _MM_SHUFFLE2(fp1, fp0) \
(((fp1) << 2) | ((fp0)))
- Include sse2neon.h by adding:
#include <arm_neon.h>
#include <dvo/core/sse2neon.h>
in following files and commenting as follows inline:
/dvo_slam/dvo_core/include/dvo/core/surface_pyramid.h
//#include <mmintrin.h>
//#include <emmintrin.h>
/dvo_slam/dvo_core/src/core/math_sse.cpp
//#include <immintrin.h>
//#include <pmmintrin.h>
/dvo_slam/dvo_core/src/core/rgbd_image_sse.cpp
//#include <immintrin.h>
//#include <pmmintrin.h>
/dvo_slam/dvo_core/src/dense_tracking_impl.cpp
//#include <immintrin.h>
//#include <pmmintrin.h>
In dvo_slam/dvo_core/CMakeLists.txt, add/update as follows:
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
target_link_libraries(${OpenCV_LIBS})
- Following commands were run, not considered stable at the moment.
$ sudo apt-get install qemu
$ sudo apt-get install ros-melodic-libg2o
- Comment out the astra camera driver since we aim to use realsense camera.
- Delete the dvo_benchmark sub-package to prevent catkin build errors.
- In dvo_ros.launch, add following mapping:
<remap from="/camera/color/image_raw" to="/camera/rgb/input_image"/>
<remap from="/camera/depth/image_rect_raw" to="/camera/depth_registered/input_image"/>
<remap from="/camera/aligned_depth_to_color/camera_info" to="/camera/depth_registered/camera_info"/>
<remap from="/camera/color/camera_info" to="/camera/rgb/camera_info"/>
Install boost library for C++ as instructed at this link: install boost
# | Problem | Solution | Notes |
---|---|---|---|
1 | bash: curl: command not found | $ sudo apt install curl |
-- |
2 | rosdep not found | $ sudo apt install python-rosdep $ sudo rosdep init $ rosdep update |
-- |
3 | cmake version conflict | Download tar file to download cmake and run following commands: $ tar zxvf cmake-3.20.4.tar.gz $ cd cmake-3.20.4 $ sudo ./bootstrap $ sudo make $ sudo make install $ cmake --version |
reinstall cmake |
4 | apt broken | $ sudo apt update && sudo apt dist-upgrade |
-- |
5 | rosmake issue on parsing the argument | $ export ROS_PACKAGE_PATH='pwd':$ROS_PACKAGE_PATH |
rosmake pocketsphinx issue rosmake parsing as stacks issue |
6 | Project 'cv_bridge' specifies '/usr/include/opencv' as an include dir, which is not found. | $ sudo apt-get install ros-melodic-cv-bridge $ cd /usr/include/ $ sudo ln -s opencv4/ opencv or $ sudo ln -s /usr/include/opencv4/opencv2/ /usr/include/opencv |
cv_bridge opencv issue |
7 | creating symlink failed | $ sudo ln -sf /usr/include/opencv4/opencv2/ /usr/include/opencv |
symlink fail |
8 | CMake did not find Sophus | $ sudo apt-get install ros-melodic-sophus |
-- |
9 | unrecognized command line option for any of the following: -msse -msse2 -msse3 -msse4 -ftree-vectorize | $ sudo gedit <dvo_slam package path>/dvo_slam/dvo_core/CMakeLists.txt comment out set comamnd as follows: # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse -msse2 -msse3 -msse4 -ftree-vectorize") |
Xavier has an arm architecture and not SSE. By default, the SSE options are enabled. Refer arm linux g error and supercollider build issue with SSE. |
10 | fatal error: opencv2/opencv.hpp: No such file or directory #include <opencv2/opencv.hpp> | add following lines: find_package(OpenCV REQUIRED) include_directories(<existing directories> ${OpenCV_INCLUDE_DIRS}) target_link_libraries( <existing libraries> ${OpenCV_LIBS}) |
opencv4 opencv conflict opencv hpp issue |
11 | fatal error: immintrin.h: No such file or directory #include <immintrin.h> | In specified file, #include <arm_neon.h> // #include <immintrin.h> |
instrinsic header file issue |
12 | fatal error: mmintrin.h: No such file or directory #include <mmintrin.h> | In specified file, #include <dvo/core/sse2neon.h> // #include <mmintrin.h> |
sse2neon |
13 | all intrinstic header file errors | #include <arm_neon.h> #include <dvo/core/sse2neon.h> |
nvidia emmintrin.h not found in TX2 |
14 | error: ‘_MM_SHUFFLE2’ was not declared in this scope fac = _mm_mul_pd(s, _mm_shuffle_pd(v1, v1, _MM_SHUFFLE2(0, 0))); | In sse2neon.h, add following macro: #define _MM_SHUFFLE2(fp1, fp0) \ (((fp1) << 2) | ((fp0))) |
_MM_SHUFFLE() working |
15 | ERRORG2O missing | $ sudo apt-get install ros-melodic-libg2o |
-- |
16 | error: field ‘param_k_’ has incomplete type ‘flann::SearchParams’::flann::SearchParams param_k_; | $ cd /usr/include/pcl-1.8/pcl/kdtree/ $ sudo gedit kdtree_flann.h modify ::flann::SearchParams param_k_; to ::flann::SearchParams *param_k_; |
flann::SearchParams issue |
17 | error: field ‘param_radius_’ has incomplete type ‘flann::SearchParams’::flann::SearchParams param_radius_; | $ cd /usr/include/pcl-1.8/pcl/kdtree/ $ sudo gedit kdtree_flann.h modify ::flann::SearchParams param_radius_; to ::flann::SearchParams *param_radius_; |
flann::SearchParams issue |
18 | error: ‘CV_BGR2GRAY’ was not declared in this scope cv::cvtColor(rgb, grey, CV_BGR2GRAY); | change CV_BGR2RGB to cv::COLOR_BGR2RGB |
-- |
19 | warning: libopencv_core.so.3.2 | -- | opencv bluff find opencv |
20 | ERROR [546400366976] (ds5-options.cpp:88) Asic Temperature value is not valid! | -- | Asic Temperature issue Depth module in D435 camera stops working #5209 |
21 | point cloud display in rviz | -- | open not fixed for current application. |
22 | camera_dense_tracking.cpp from dvo_ros execution issue; ROS_WARN not printed | -- | open |
23 | control_transfer returned error, index: 300, error: Resource temporarily unavailable, number: b | -- | open RealSense v2.3.0 currently on Xavier; control transfer error discusses this issue for nano. librealsense2 backend version conflict gives an insight v4I and RSUSB versions. |
24 | Hardware Notification:USB CAM overflow | try relaunching the node, realsense-viewer might be useful | CAM overflow problem D435-USB SCP |
25 | (Confidence, 0) sensor isn't supported by current device! -- Skipping | -- | open |
26 | CMake error, variables set to NOTFOUND | cmake, variable set to notfound | -- |
27 | build opencv from source | jetsonhack openCV | -- |
28 | No RGB and IMU data on D435i | D435i USB | -- |
29 | Assertion `intensity.size() == depth.size()' failed | -- | open resolution conflict |
30 | rs2_load_json | -- | open |
31 | Could not find a package configuration file provided by "PCL" | $ sudo apt install ros--pcl* | -- |
32 | dvo_ros/CameraDenseTrackerConfig.h: No such file or directory | chmod +x dvo_slam/dvo_ros/cfg/CameraDenseTracker.cfg | uncc visionlab dvo_slam issue 42 |
Commands are for:
- ros version
- opencv version
- find and remove opencv
- cuda version
- USB
$ rosversion --distro
$ python3 -c "import cv2; print(cv2.__version__)"
$ sudo find / -name "*opencv*" -exec rm -i {} \;
$ ./nvcc --version
$ ls -l /usr/local | grep cuda
$ lsusb -d 8086: -v | grep -i bcdUSB
$ sudo su
- Nvidia Jetson Xavier NX Developer Kit
- Jetson Xavier NX Developer Kit SD Card Image
- Etcher
- reef ros autoinstall
- qualcomm robotics
- realsense github repository
- download cmake
- install boost
- reinstall cmake
- uncc visionlab dvo_slam
- rosmake pocketsphinx issue
- rosmake parsing as stacks issue
- cv_bridge opencv issue
- symlink fail
- arm linux g error
- supercollider build issue with SSE
- opencv4 opencv conflict
- opencv hpp issue
- instrinsic header file issue
- sse2neon
- nvidia emmintrin.h not found in TX2
- _MM_SHUFFLE() working
- flann::SearchParams issue
- CV_BGR2RGB issue
- opencv bluff
- find opencv
- Asic Temperature issue
- Depth module in D435 camera stops working #5209
- control transfer error
- librealsense2 backend version conflict
- CAM overflow problem
- D435-USB SCP
- cmake, variable set to notfound
- jetsonhack openCV
- D435i USB
- resolution conflict
- uncc visionlab dvo_slam issue 42