As discussed in the previous post, we need a script that publishes RGBD images from Kinect v2 on ROS topics to compute VO. Below are the ROS topics that are needed for rtabmap_ros to compute Visual Odometry.
There are many ROS packages that are available for this job but very few of them are currently working and rest of them are deprecated. Below are some of them.
1. Kinect2 Bridge
2. Kinect Camera
3. Openni Launch
4. RGBD Launch
After considering all of them, only Kinect2 Bridge is performing well. It is one of the packages in iai_kinect2. It doesn’t have good support but the package is pretty much understandable. The Kinect2 bridge ROS node wasn’t running fine but the when it is executed from the launch file, it works perfectly fine. Below is the console output from Kinect Bridge.
As it is seen in the image, the frame rate is pretty good with OpenCL. Here are ROS topics that kinect2 Bridge publishes.
It publishes images we want but with different ROS topic names. So, we have two options to get images published on desired ROS topics.
1. Write a python script that uses pylibfreenect2 and publishes Kinect v2 depth and color images on desired ROS topics
2. Write a python script which subcribes to Kinect2 Bridge and re-publish images from Kinect2 Bridge on ROS topics we wanted.
First option have been implemented. Here is the link for the same. But we have problems such as variable fps and sudden shutdown of ROS node which need to be rectified.
Will preserve further information for the next post.