VBTS Config

The Vision-Based Tactile Sensor (VBTS) stores configures necessary to integrate them on robots within the simulation.

class taccel.vbts.VBTSConfig(sensor_name: str = 'sensor', link_name: str = 'link', attch_rel_pose: ndarray = array([0, 0, 0, 0, 0, 0]), gel_mesh_path: str = '', gel_resolution: float = 1e-07, shell_mesh_path: str = '', cam_h: int = 400, cam_w: int = 400, cam_fov: float = 60, cam_pixel_size: float = 0.079375, cam_intrinsics: ndarray | None = None, cam_rel_pose: ndarray = array([0, 0, 0, 0, 0, 0]), ref_img_path: str = 'taccel/data/6k_ref.png', mlp_ckpt_path: str = 'taccel/data/n2rgb.pth', cam_fwd_dir: ndarray = array([0, 0, -1]), ray_axis: str = 'z', ray_start_level: float = 0.01, ray_rest_level: float = 0.0, reso_ds_ratio: int = 1, body_coat_mask: ndarray | None = None, surf_coat_mask: ndarray | None = None, body_attach_mask: ndarray | None = None, surf_attach_mask: ndarray | None = None, with_marker: bool = True, body_marker_bc_verts: Tensor | None = None, marker_bc_coords: Tensor | None = None, density: float = 1000.0, E: float = 500000.0, nu: float = 0.4, mu: float = 0.3, collide_with_robot: bool = False, shell_body_handle: TriMeshBodyHandle | None = None, gel_body_handle: TetMeshBodyHandle | None = None, coll_layer: int = -1, self_coll: bool = False)

Bases: object

Vision-Based Tactile Sensor configuration.

sensor_name

Name of the sensor.

Type:

str

Name of the link.

Type:

str

attch_rel_pose

Relative pose of the sensor w.r.t. the link.

Type:

numpy.ndarray

gel_mesh_path

Path to the gel mesh.

Type:

str

gel_resolution

Resolution of the gel.

Type:

float

shell_mesh_path

Path to the shell mesh.

Type:

str

body_coat_mask

Body coat mask.

Type:

numpy.ndarray

surf_coat_mask

Surface coat mask.

Type:

numpy.ndarray

body_attach_mask

Body attach mask.

Type:

numpy.ndarray

with_marker

Whether to use markers.

Type:

bool

body_marker_bc_verts

Marker barycentric vertices, indices on the gel body mesh.

Type:

torch.Tensor

body_marker_bc_coords

Marker barycentric coordinates.

density

Density of the material.

Type:

float

E

Young’s modulus.

Type:

float

nu

Poisson’s ratio.

Type:

float

mu

Friction coefficient.

Type:

float

collide_with_robot

Whether to collide with the robot.

Type:

bool

shell_body_handle

Shell body handle.

Type:

warp_ipc.body_handle.TriMeshBodyHandle

gel_body_handle

Gel body

Type:

warp_ipc.body_handle.TetMeshBodyHandle

coll_layer

Specify the collision layer

Type:

int

self_coll

Specify whether to enable self-collision for the soft body

Type:

bool

E: float = 500000.0
attch_rel_pose: ndarray = array([0, 0, 0, 0, 0, 0])
property attch_rel_tf

Relative transformation from the gel pad to the robot link that the sensor is attached to.

Returns:

Relative transformation.

Return type:

np.ndarray

body_attach_mask: ndarray = None
body_coat_mask: ndarray = None
body_marker_bc_verts: Tensor = None
cam_fov: float = 60
cam_fwd_dir: ndarray = array([ 0,  0, -1])
cam_h: int = 400
cam_intrinsics: ndarray = None
cam_pixel_size: float = 0.079375
cam_rel_pose: ndarray = array([0, 0, 0, 0, 0, 0])
property cam_rel_tf

Relative transformation from the gel pad to the camera.

Returns:

Relative transformation.

Return type:

np.ndarray

property cam_reso: tuple[int, int]

VBTS Camera resolution, H x W

cam_w: int = 400
cfgs_from_json()

Load configuration from JSON file.

Parameters:

json_path – Path to the JSON file.

Returns:

Vision-Based Tactile Sensor configuration.

Return type:

list[VBTSConfig]

coll_layer: int = -1
collide_with_robot: bool = False
density: float = 1000.0
gel_body_handle: TetMeshBodyHandle = None
property gel_mesh: UnstructuredGrid

The tet mesh (in pv.UnstructuredGrid format) of the gel pad. This member is a cached property for efficiency.

gel_mesh_path: str = ''
gel_resolution: float = 1e-07
link_name: str = 'link'
marker_bc_coords: Tensor = None
mlp_ckpt_path: str = 'taccel/data/n2rgb.pth'
mu: float = 0.3
property n_pixels: int

The amount of pixels in total for a VBTS camera

nu: float = 0.4
ray_axis: str = 'z'
property ray_dist_to_depth_offset
ray_rest_level: float = 0.0
ray_start_level: float = 0.01
ref_img_path: str = 'taccel/data/6k_ref.png'
reso_ds_ratio: int = 1
self_coll: bool = False
sensor_name: str = 'sensor'
shell_body_handle: TriMeshBodyHandle = None
property shell_mesh: Trimesh

The trimesh of the shell of the gel pad. It is currently omitted and will be added to the sim for realistic visualization. This member is a cached property for efficiency.

shell_mesh_path: str = ''
surf_attach_mask: ndarray = None
surf_coat_mask: ndarray = None
with_marker: bool = True