kinect PointCloud2 differs in rviz and numpy array plot, redundant data in PointCloud2? [closed]

asked 2016-01-12 07:26:40 -0500

meiskje gravatar image

I need an numpy array with the xz coordinates in an certain y-range for an obstacle avoidance from the Kinect pointCloud2 Data. I wrote a test program and compared it with the rviz output. Now I am a little confused about the result. Can someone explain to me the array plot on the left?

Thank you very much!


left: plot of np.array
right: rviz (TopDownOrtho)

test code

def callback_kinectPointCloud(data):
 # data '/camera/depth/points', PointCloud2

a = np.fromstring(, dtype=np.float32)
b = a.reshape((-1,3)) 

# Filter data          
#d = b[ np.where( b[:,1] < robot_height_kinect),:][0]

e =b [:,(0,2)]

plt.plot(*np.transpose(e), marker=',', color='r', ls='')
edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see for more details. by tfoote
close date 2016-08-08 00:17:41.904627