-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
The paper mentions the use of signed distance for each object. However, the preprocessing code makes use of unsigned distance. Is this correct? (absolute=True is used)
grasp_diffusion/scripts/create_data/generate_mesh_sdf.py
Lines 43 to 58 in 59b633c
| def generate_mesh_sdf(mesh, absolute=True, normalize=False, n_points=200000): | |
| print (mesh) | |
| q_sdf, pcl = sample_sdf_near_surface(mesh, number_of_points=n_points, return_gradients=False) | |
| query_points, sdf = q_sdf[0], q_sdf[1] | |
| if absolute: | |
| neg_sdf_idxs = np.argwhere(sdf<0)[:,0] | |
| sdf[neg_sdf_idxs] = -sdf[neg_sdf_idxs] | |
| if normalize: | |
| sdf_max = sdf.max() | |
| sdf_min = sdf.min() | |
| sdf = (sdf - sdf_min) / (sdf_max - sdf_min) | |
| return query_points, sdf |
Metadata
Metadata
Assignees
Labels
No labels