ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how to get point cloud data from Kinect ROS

asked 2021-08-17 01:10:49 -0500

YoungjoonHong gravatar image

hello there ! I am using Kinect v4 in our lab, I successfully was able to install ROS on Kinect v4.

what we are trying to do is to get point clouds from Kinect. Is there any way to do it by using python ??

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-08-17 06:49:12 -0500

Ranjit Kathiriya gravatar image

updated 2021-08-17 06:52:38 -0500

what we are trying to do is to get point clouds from Kinect. Is there any way to do it by using python ??

You need to install the driver first.

Take a look at this package: Drivers

https://github.com/ZiqiChai/k4a-ros or https://github.com/microsoft/Azure_Ki...

Is there any way to do it by using python ??

In your python subscribe to point cloud Topics.

#!/usr/bin/env python
import rospy
import pcl
from sensor_msgs.msg import PointCloud2
import sensor_msgs.point_cloud2 as pc2
import ros_numpy

def callback(data):
    print(data)
    # Enter your code here


rospy.init_node('listener', anonymous=True)
rospy.Subscriber("/<Your topic name>", PointCloud2, callback)
rospy.spin()
edit flag offensive delete link more

Comments

I appreciate your kind and detailed comment !!

YoungjoonHong gravatar image YoungjoonHong  ( 2021-08-19 21:56:52 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-08-17 01:10:49 -0500

Seen: 120 times

Last updated: Aug 17 '21