private void InitializeMessage() { message = new SensorPointCloud2(); message.header = new StandardHeader(); message.data = new byte[messageLength]; DepthArray = new byte[messageLength]; }
public PointCloud(SensorPointCloud2 sensorPointCloud2) { int I = sensorPointCloud2.data.Length / sensorPointCloud2.point_step; Points = new Point[I]; byte[] byteSlice = new byte[sensorPointCloud2.point_step]; for (int i = 0; i < I; i++) { Array.Copy(sensorPointCloud2.data, i * sensorPointCloud2.point_step, byteSlice, 0, sensorPointCloud2.point_step); Points[i] = new Point(byteSlice); } }
private void ReceiveMessage(object sender, MessageEventArgs e) { pointCloudData = ((SensorPointCloud2)e.Message); isMessageReceived = true; }