storm_kit.geom.sdf.world module

class WorldCollision(batch_size=1, tensor_args={'device': 'cpu', 'dtype': torch.float32})[source]

Bases: object

load_collision_model()[source]
class WorldGridCollision(batch_size=1, tensor_args={'device': 'cpu', 'dtype': torch.float32}, bounds=None, grid_resolution=0.05)[source]

Bases: storm_kit.geom.sdf.world.WorldCollision

This template class can be used to build a sdf grid using a signed distance function for fast lookup.

_compute_sdfgrid()[source]
build_transform_matrices(bounds, pitch)[source]

Args: bounds: [[min_x, min_y, min_z], [max_x, max_y, max_z]] pitch: float

check_pts_sdf(pts)[source]

finds the signed distance for the points from the stored grid Args: pts: [n,3]

get_signed_distance(pts)[source]

This needs to be implemented

Parameters

pts (tensor) – [b,3]

Raises

NotImplementedError – Raises error as this function needs to be implemented in a child class

Returns

distance [b,1]

Return type

tensor

update_world_sdf()[source]
view_sdf_grid(sdf_grid)[source]
voxel_inds(pt, scale=1)[source]
class WorldImageCollision(bounds, tensor_args={'device': 'cpu', 'dtype': torch.float32})[source]

Bases: storm_kit.geom.sdf.world.WorldCollision

get_pt_value(pt)[source]
update_world(image_path)[source]
voxel_inds(pt)[source]
class WorldPointCloudCollision(label_map, bounds, grid_resolution=0.02, tensor_args={'device': 'cpu', 'dtype': torch.float32}, batch_size=1)[source]

Bases: storm_kit.geom.sdf.world.WorldGridCollision

_update_trimesh_projection()[source]
get_scene_mesh_from_voxelgrid()[source]
get_scene_pts_from_voxelgrid()[source]
get_signed_distance(pts)[source]

This needs to be implemented

Parameters

pts (tensor) – [b,3]

Raises

NotImplementedError – Raises error as this function needs to be implemented in a child class

Returns

distance [b,1]

Return type

tensor

update_camera_transform(w_c_trans, w_R_c)[source]
update_world_pc(pointcloud, seg_labels)[source]
update_world_sdf(scene_pc)[source]
update_world_voxel(scene_pc)[source]
class WorldPrimitiveCollision(world_collision_params, batch_size=1, tensor_args={'device': 'cpu', 'dtype': torch.float32}, bounds=None, grid_resolution=0.05)[source]

Bases: storm_kit.geom.sdf.world.WorldGridCollision

This class holds a batched collision model

get_cube_objs()[source]
get_pt_distance(w_pts)[source]

Args: w_pts: b, n, 3

get_signed_distance(w_pts)[source]

This needs to be implemented

Parameters

pts (tensor) – [b,3]

Raises

NotImplementedError – Raises error as this function needs to be implemented in a child class

Returns

distance [b,1]

Return type

tensor

get_sphere_distance(w_sphere)[source]

Computes the signed distance via analytic function Args: tensor_sphere: b, n, 4

get_sphere_objs()[source]
load_collision_model(world_collision_params)[source]
update_obj_poses(objs_pos, objs_rot)[source]

Update collision object poses :param link_pos: [batch, n_links , 3] :param link_rot: [batch, n_links , 3 , 3]

update_reference_frame(r_pos, r_rot)[source]

Update world collision poses :param link_pos: [batch, n_links , 3] :param link_rot: [batch, n_links , 3 , 3]