使用环境:两台ubuntu20.04的电脑;摄像机:azure kinect。

我需要使用一台电脑当服务端,一台电脑当客户段;客户端一发消息,服务端就收集处理各种信息发回给客户端,让客户端做一些数据计算之类的。

目前我成功的实现了传输list格式的RGB数据和depth数据,以及uint16的width和height数据。

现在我我需要再加装传输点云数据的功能,但不知道具体该怎么做。

目前我在srv文件里加入了float32[] pointcloud

又在服务端的程序里添加了一些东西,但尝试了很多网上找到的教程都一直在报错。

以下是一个大体的结果

def points_image(msg):
global points_array
points_data=point_cloud2.read_points_list(msg,field_names=("x","y","z","r","g","b","depth"))
points_array = np.array(points_data,dtype=np.float32)
rospy.Subscriber("/points2", PointCloud2,callback=points_image,queue_size=5
time.sleep(2)
points = list(points_array.reshape(-1))
return ExecuteTrajectoryResponse(points,rgb,d,width,height)

请问我具体应该怎么写?