fastdev.sim_webui.maniskill_webui

Module Contents

fastdev.sim_webui.maniskill_webui.get_component_meshes(component: sapien.physx.PhysxRigidBaseComponent)[source]

Get component (collision) meshes in the component’s frame.

Parameters:

component (sapien.physx.PhysxRigidBaseComponent)

class fastdev.sim_webui.maniskill_webui.ManiSkillStateManger[source]

Bases: fastdev.sim_webui.webui.StateManager

State manager for multiple scenes.

component_poses_history: List[Dict[str, numpy.ndarray]] = [][source]
component_colors: Dict[str, fastdev.sim_webui.webui.Color][source]
component_name_to_asset_id: Dict[str, str][source]
component_name_to_scene_indices: Dict[str, List[int]][source]
scene_index_to_component_names: Dict[int, List[str]][source]
get_scene_num_frames(scene_index: int) int[source]
Parameters:

scene_index (int)

Return type:

int

get_frame_viser_asset_states(scene_index: int, frame_index: int) List[fastdev.sim_webui.webui.ViserAssetState][source]
Parameters:
  • scene_index (int)

  • frame_index (int)

Return type:

List[fastdev.sim_webui.webui.ViserAssetState]

property num_scenes: int[source]
Return type:

int

get_scene_last_updated(scene_index: int) float[source]
Parameters:

scene_index (int)

Return type:

float

reset()[source]
set_robot_state(*args, **kwargs)[source]
set_mesh_state(*args, **kwargs)[source]
set_point_cloud_state(*args, **kwargs)[source]
__getitem__(scene_index: int)[source]
Parameters:

scene_index (int)

__hash__() int[source]
Return type:

int

__repr__() str[source]
Return type:

str

__str__() str[source]
Return type:

str

class fastdev.sim_webui.maniskill_webui.ManiSkillWebUI(env: gymnasium.Env, host: str = 'localhost', port: int = 8080, disable_cache: bool = False)[source]

Bases: fastdev.sim_webui.webui.SimWebUI

WebUI for simulator and 3D scene visualization.

Parameters:
  • env (gymnasium.Env)

  • host (str)

  • port (int)

  • disable_cache (bool)

set_robot_state(*args, **kwargs)[source]

Set the state of a robot asset.

Parameters:
  • asset_id (str) – Asset ID of the robot asset.

  • joint_values (Optional[JointValuesT], optional) – Multi-frame (or single-frame) joint values. Defaults to None.

  • root_poses (Optional[PosesT], optional) – Multi-frame (or single-frame) root poses. Defaults to None.

  • scene_index (Optional[int], optional) – Scene index. Defaults to None.

Note

The number of frames of the asset state is determined by the number of joint values provided.

set_mesh_state(*args, **kwargs)[source]

Set the state of a mesh asset.

Parameters:
  • asset_id (str) – Asset ID of the mesh asset.

  • scene_index (Optional[int], optional) – Scene index. Defaults to None.

  • poses (Optional[PosesLike], optional) – Multi-frame (or single-frame) poses. Defaults to None.

  • scale (ScaleLike, optional) – Scale factor. Defaults to 1.0.

  • color (ColorLike, optional) – Color of the mesh, use random color if not provided. Defaults to None.

Note

The number of frames of the asset state is determined by the number of poses provided.

set_point_cloud_state(*args, **kwargs)[source]

Set the state of a point cloud asset.

Parameters:
  • asset_id (str) – Asset ID of the point cloud asset.

  • scene_index (Optional[int], optional) – Scene index. Defaults to None.

  • poses (Optional[PosesLike], optional) – Multi-frame (or single-frame) poses. Defaults to None.

  • scale (ScaleLike, optional) – Scale factor. Defaults to 1.0.

  • color (Optional[ColorLike], optional) – Color of the point cloud. Defaults to None.

Note

The number of frames of the asset state is determined by the number of poses provided.

__repr__() str[source]
Return type:

str

__str__() str[source]
Return type:

str