Ransac, Kinect and others

asked 2015-01-27 03:53:13 -0600

Lucer gravatar image

Hy,

I`m writting this subscriptor:

   #!/usr/bin/env python

import rospy
import sensor_msgs.point_cloud2 as pc2
from sensor_msgs.msg import PointCloud2, PointField, Image
from roslib import message
import pcl
#listener
def listen():

    rospy.init_node('listen', anonymous=True)
    rospy.Subscriber("/camera/depth/points", PointCloud2, callback_kinect)
    rospy.spin()

def callback_kinect(data) :
    points = pc2.read_points(data,"x,y")

My question is: Can I convert the points (only x,y without RGB) to image that I can see (for example rviz or other)? and the second question: Is There any library that I can use to detect an object (with RANSAC, for example or other), like a ball (in 3D or 2D) in python?

Regards and Thanks.

edit retag flag offensive close merge delete