arm architecture, Xavier NX DK, Ubuntu 18 04. ROS melocdic drives Azure Kinect dk camera
Device Xavier NX DK azure Kinect DK camera
System: Ubuntu 18 04 ros melodic
Devices under X86 architecture drive Azure cameras. You can read a blog:
x86 architecture, Ubuntu 18 04. ROS melocdic drives Azure Kinect dk camera
Preface: Xavier NX DK is an arm product of nvidia and has its own CUDA acceleration function. Therefore, this time, the Azure Kinect dk camera is driven under the arm architecture. In terms of SDK configuration, it is slightly different from x86.
Reference blog:
nvidia agx xavier runs azure kinect DK ros
ubuntu18.04 driver official SDK
1. Download the official SDK package
Add code warehouse:
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
Update software source under arm:
sudo apt-get update -y && apt-get install curl -y
Add warehouse under arm64
sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/multiarch/prod sudo apt-get update
Add a warehouse under x86. There is no need to add a warehouse when using arm series embedded board
sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod
Source code installation: because the subsequent projects use sdk1 Version 4, so version 1.4 is installed here
git clone -b v1.4.0 https://github.com/microsoft/Azure-Kinect-Sensor-SDK.git
2.libdepthengine.so.2.0 download
Because the arm architecture is used, libdepthangine.com is installed here so. 2.0 is best obtained from the files downloaded from the arm source
sudo apt install k4a-tools sudo apt install libk4a1.4-dev #Note that there are many versions of libk4a. The 1.4 version selected here can be installed according to the selection of SDK
Copy to / usr / lib / x86_ 64 Linux GNU directory
cd /usr/lib/aarch64-linux-gnu/libk4a1.4 sudo cp libdepthengine.so.2.0 /usr/lib/aarch64-linux-gnu
If it is under x86 architecture, copy it to / usr / lib / x86_ 64 Linux GNU directory
cd /usr/lib/x86_64-linux-gnu sudo cp libdepthengine.so.2.0 /usr/lib/x86_64-linux-gnu
3. Compile and install azure Kinect sensor SDK
cd Azure-Kinect-Sensor-SDK mkdir build cd build cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug
ps:cmake... - GNinja is the configuration for generating ninja. Ninja is a small compilation system with parallel compilation and high speed
When finished, execute
ninja sudo ninja install
Problems encountered when executing cmake... - GNinja:
ERROR 1:
Solution: add source
sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/multiarch/prod sudo apt-get update
ERROR 2:
sudo apt install libsoundio-dev cmake .. -GNinja ninja
ERROR 3:
sudo apt-get install libudev-dev
4. Start k4aviewer
Connect the camera, still in the build folder, and start the viewer
sudo ./bin/k4aviewer
be careful! sudo must be added, or the permission is not enough
Write the serial port model of the camera into the rule script, so that the permission is higher and sudo free
sudo cp /Azure-Kinect-Sensor-SDK/scripts/99-k4a.rules /etc/udev/rules.d/
Install ROS melody version of azure kinect
Key references: Robot capture (III) -- Installation of Azure Kinect SDK and ROS driver
Install opencv3 four point three
Download opencv3.0 from the official website four point three
cd ~/opencv-3.4.13 mkdir build cd build cmake .. build -j6 sudo make install
Install Azure_Kinect_ROS_Driver package
You don't need to transplant / ext files, as the old online tutorial said
# Download Azure_Kinect_ROS_Driver source code cd catkin_ws/src git clone https://github.com/microsoft/Azure_Kinect_ROS_Driver.git # Compile workspace cd catkin_ws catkin_make
ERROR
During compilation, you may encounter the problem of displaying the lack of cv::bridge. This is because xavier comes with opencv4, while ROS melody comes with cv::bridge, which is linked to the opencv directory and cannot be found
terms of settlement:
Method 1: modify cv_bridge configcmake path, making it compatible with the current opencv version
Key reference Blogs:
Solve CV in ROS Kinetic in Ubuntu environment_ Bridge and install opencv 2.4 XX compatibility notes
Method 2 (recommended): Download and compile your own CV in the workspace_ bridge
Reference blog:
NX Getting Started tutorial software - installing vins mono
cd catkin_ws/src git clone -b melodic https://github.com/ros-perception/vision_opencv catkin_make
source devel/setup.bash roslaunch azure_kinect_ros_driver driver.launch
Open rviz image topic to subscribe to images
Project Download
In order to facilitate rapid development, you can download the configured ros project and library files at the following link
https://github.com/rainbowrooster/RoboticsX-Study/tree/main/ubuntu%2018.04%20%2B%20xavier%20nx%20%2B%20ros%20melodic%20%2B%20Azure_Kinect%20camera
There are three files
Will Azure_Kinect_ROS_Driver and vision_ The two function packages of OpenCV are put into their own catkin_ws/src workspace, compile libdepthangine so. 2.0 execution instructions
sudo cp libdepthengine.so.2.0 /usr/lib/aarch64-linux-gnu