(ros_cloud)
return pcl_data
Converts a ROS PointCloud2 message to a pcl PointXYZRGB
    
        Args:
            ros_cloud (PointCloud2): ROS PointCloud2 message
            
        Returns:
            pcl.PointCloud_PointXYZRGB: PCL XYZRGB point cloud
Converts a ROS PointCloud2 message to a pcl PointXYZRGB
    
        Args:
            ros_cloud (PointCloud2): ROS PointCloud2 message
            
        Returns:
            pcl.PointCloud_PointXYZRGB: PCL XYZRGB point cloud
Converts a ROS PointCloud2 message to a pcl PointXYZRGB Args : ros_cloud ( PointCloud2 ) : ROS PointCloud2 message Returns : pcl . PointCloud_PointXYZRGB : PCL XYZRGB point cloud
def ros_to_pcl(ros_cloud):
    """ Converts a ROS PointCloud2 message to a pcl PointXYZRGB
    
        Args:
            ros_cloud (PointCloud2): ROS PointCloud2 message
            
        Returns:
            pcl.PointCloud_PointXYZRGB: PCL XYZRGB point cloud
    """
    points_list = []

    for data in pc2.read_points(ros_cloud, skip_nans=True):
        points_list.append([data[0], data[1], data[2], data[3]])

    pcl_data = pcl.PointCloud_PointXYZRGB()
    pcl_data.from_list(points_list)

    return pcl_data
def ros_to_pcl ( ros_cloud ) : points_list = [ ] for data in pc2 . read_points ( ros_cloud , skip_nans = True ) : points_list . append ( [ data [ 0 ] , data [ 1 ] , data [ 2 ] , data [ 3 ] ] ) pcl_data = pcl . PointCloud_PointXYZRGB ( ) pcl_data . from_list ( points_list ) return pcl_data