-
Notifications
You must be signed in to change notification settings - Fork 18
Azure Kinect
First, you'll need to configure Microsoft's Package Repository, following the instructions here.
Next, you'll need to install the Azure Kinect SDK. You can do this by running the following commands:
sudo apt install k4a-tools
sudo apt install libk4a1.4-devIf the above commands fail, you may follow the below steps to install the SDK.
Refer to issue:1263 Even though OS is for Ubuntu 18.04, it works for Ubuntu 20.04 as well.
Make sure to check the version[^1] of Azure Kinect SDK and Body Tracking SDK. You can check an option of libk4abt.-dev versions here And also libk4a.-dev here.
k4aVERSION=1.4
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod
curl -sSL https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-prod.list
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-get update
sudo apt install libk4a{$k4aVERSION}-dev
# sudo apt install libk4abt${BodyTranckVERSION}-dev # you may not need this
sudo apt install k4a-tools=$k4aVERSION[^1]: My version is 1.4.1 and 1.1 for SDK and Body Tracking SDK respectively.
sudo k4aviewerTo use Azure Kinect without sudo, you'll need to set up a udev rule. You can follow this page or do this by running the following command:
DO NOT COPY github.com link. USE raw.githubusercontent.com
# sudo mkdir -p '/etc/udev/rules.d/'
wget -P '/etc/udev/rules.d/' https://raw.githubusercontent.com/microsoft/Azure-Kinect-Sensor-SDK/develop/scripts/99-k4a.rulesThen, reattach Azure Kinect devices if attached during this process.
Hopefully, you should be able to run the following command without sudo:
k4aviewerInstall pyKinectAzure
This is a Python wrapper for Azure Kinect SDK. You should be able to just follow the instructions on the GitHub page, but I'll repeat them here for convenience.
You have two options to install pyKinectAzure.
- Simple ( if no need to change the source code)
pip install pykinect_azure- Advanced ( if you want to change the source code)
mkdir -p $YOUR_WORK_REPO/third_party
cd $YOUR_WORK_REPO/third_party
git clone https://github.com/ibaiGorordo/pyKinectAzure.git
cd pyKinectAzure
pip install -e .pyKinectAzure has banch of exsamples. You can run them to test the installation.
python exsamples/exampleColorImage.pyWriting... rosrun tf2_ros static_transform_publisher 1 0 0 0 0 0 rgb_camera_link map
If you have any questions or find errors, please let me know. Thanks.