Migration from ROS1. Original Repository: https://github.com/code-iai/iai_kinect2. this work is based on OpenCV4 version: https://github.com/paul-shuvo/iai_kinect2_opencv4.
- Install the ROS2 humble.
- Install libfreenect2.
- clone this repo to your workspace and build it
cd ~/catkin_ws/src/
git clone https://github.com/YuLiHN/kinect2_ros2
cd kinect2_ros2
rosdep install -r --from-paths .
cd ~/catkin_ws
colcon build
Note: if you have runtime error like this:
[kinect2_bridge-1] error while loading shared libraries: libfreenect2.so.0.2: cannot open shared object file: No such file or directory
you could establish a symbolic link in usr lib folder like:
sudo ln -s $PATH_TO_LIBFREENECT2/freenect2/lib/libfreenect2.so.0.2 /usr/lib/libfreenect2.so.0.2
ros2 launch kinect2_bridge kinect2_bridge.launch.py
and visualize the results in rviz2
ros2 run rviz2 rviz2
Tested on RTX 3060 mobile, Ubuntu 22.04 LTS, ROS2 Humble. Here are some screenshots from the toolkit:
This repo only contains kinect2_registration and kinect2_bridge, still have two packages to be completed.