Taccel APIs

The Taccel Simulator is built upon the Warp-IPC. It provides the importing and simulating of VBTS-integrated robots, and synthesizes tactile signals for the sensors.

class taccel.taccel.TaccelModel(num_envs: int = 1, viz_envs: list[int] = [], device='cuda:0')

Bases: ASRModel

add_robot(urdf_path: str, tac_fab_path: str, env_id: int = 0, start_coll_layer: int = 2, coll_layers: list[int] = [], disable_coll_layers: list[int] = [], mu: float = 0.3, no_bodies: bool = False, self_collision: bool = False, use_collision_mesh: bool = False)
add_vbts_to_sim(robot: TactileRobot, coll_layers: int | List[int] = 1) list[TetMeshBodyHandle]

Add the VBTS of a given robot to the simulation, and set the colliding layers.

Parameters:
  • robot (TactileRobot) – The robot to add VBTS to.

  • coll_layers (int | List[int], optional) – The colliding layer of each gel pad, int or list[int]. If int given, all the gel pads will be in the same colliding layer. Defaults to 1.

Returns:

_description_

Return type:

list[TetMeshBodyHandle]

property dummy_robot: TactileRobot | None
finalize() None
property gel_coat_mesh_indexers_wp
get_marker_flow_2d()

Transform the markers, rest markers, and their flows back to 2D space on the pixel coordinate.

get_tac_markers_and_rest(local: bool = False, return_numpy: bool = True)
render_tactile(render_marker: bool = False, render_flow: bool = False) tuple[Tensor, Tensor, Tensor]
robots: list[TactileRobot] = []
property sensor_xy_queries_local: tuple[Tensor, Tensor]
set_robot_states(joint_params: list[dict[str, float]] | ndarray[Any, dtype[_ScalarType_co]] | Tensor, root_tf: ndarray[Any, dtype[_ScalarType_co]] | Tensor | None = None, env_ids: list[int] = [])
set_robot_targets(joint_params: list[dict[str, float]] | ndarray[Any, dtype[_ScalarType_co]] | Tensor, root_tf: ndarray[Any, dtype[_ScalarType_co]] | Tensor | None = None, env_ids: list[int] = [])
property tac_coat_rest_and_current: tuple[list[Trimesh], list[Trimesh]]

Accquire the current and rest states of the gel pads.

Returns:

coat_current and coat_rest, each is a list of trimesh.Trimesh with length of num_envs

Return type:

tuple[list[tm.Trimesh], list[tm.Trimesh]]

property tac_markers: Tensor

Accquire the current markers of the gel pads.

Returns:

torch.Tensor markers, in shape [num_envs, num_markers_all, 3]

property tac_markers_local: Tensor
property tac_markers_rest_and_current: tuple[Tensor, Tensor]

Accquire the current markers and their rest states (for reference) of the gel pads.

Returns:

markers and rest markers, each in shape [num_envs, num_markers_all, 3]

Return type:

tuple[torch.Tensor, torch.Tensor]

property tac_markers_rest_and_current_hand_local: tuple[Tensor, Tensor]

Accquire the current markers and their rest states (for reference) of the gel pads.

Returns:

markers and rest markers, each in shape [num_envs, num_markers_all, 3]

Return type:

tuple[torch.Tensor, torch.Tensor]

property tac_markers_rest_and_current_local: tuple[Tensor, Tensor]

Accquire the current markers and their rest states (for reference) of the gel pads.

Returns:

markers and rest markers, each in shape [num_envs, num_markers_all, 3]

Return type:

tuple[torch.Tensor, torch.Tensor]

property tac_markers_rest_and_current_stacks: tuple[Tensor, Tensor]

Accquire the current markers and their rest states (for reference) of the gel pads.

Returns:

markers and rest markers, each in shape [num_envs, num_markers_all, 3]

Return type:

tuple[torch.Tensor, torch.Tensor]

property tac_tf: Tensor

Accquire the current state of the gel pads”

Returns:

gel pad frame transformation, in shape [num_envs, num_tac, 3, 3]

Return type:

torch.Tensor

property tac_tf_robot_local: Tensor

Accquire the current state of the gel pads”

Returns:

gel pad frame transformation, in shape [num_envs, num_tac, 3, 3]

Return type:

torch.Tensor

update_gel_coat_meshes_wp()
vbts_depths: <warp.types.array object at 0x7f4c98f0b880>
vbts_normals: <warp.types.array object at 0x7f4c3a7aff40>