This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def pointcloud_to_depth_map(pointcloud: np.ndarray, theta_res=150, phi_res=32, max_depth=50, phi_min_degrees=60, | |
phi_max_degrees=100) -> np.ndarray: | |
""" | |
All params are set so they match default carla lidar settings | |
""" | |
assert pointcloud.shape[1] == 3, 'Must have (N, 3) shape' | |
assert len(pointcloud.shape) == 2, 'Must have (N, 3) shape' |