concepts.simulator.pybullet.world.BulletWorld#

class BulletWorld[source]#

Bases: object

Methods

change_visual_color(body_id, rgba[, link_id])

get_batched_qpos(names[, numpy])

get_batched_qpos_by_id(body_id, joint_ids[, ...])

get_body_index(body_name)

get_body_name(body_id)

get_body_state(body_name)

get_body_state_by_id(body_id)

get_collision_shape_data(body_name)

get_collision_shape_data_by_id(body_id)

get_constraint(constraint_id)

get_contact([a, b, update])

get_debug_camera()

get_free_joints(body_id)

Get a list of indices corresponding to all non-fixed joints in the body.

get_joint_info(joint_name)

get_joint_info_by_body(body_id)

get_joint_info_by_id(body_id, joint_id)

get_joint_state(joint_name)

get_joint_state_by_id(body_id, joint_id)

get_link_index(link_name)

get_link_index_with_body(body_id, link_name)

get_link_name(body_id, link_id)

get_link_state(link_name[, fk])

get_link_state_by_id(body_id, link_id[, fk])

get_mesh(body_id[, zero_center, verbose, ...])

Get the point cloud of a body.

get_mesh_box(*args, **kwargs)

get_mesh_mesh(*args, **kwargs)

get_pointcloud(body_id[, points_per_geom, ...])

Get the point cloud of a body.

get_pointcloud_box(*args, **kwargs)

get_pointcloud_mesh(*args, **kwargs)

get_qpos(name)

get_qpos_by_id(body_id, joint_id)

get_state(name[, type])

get_xmat(name[, type])

get_xpos(name[, type])

get_xquat(name[, type])

is_collision_free(a, b)

notify_update(body_id[, body_name, group])

refresh_names()

render_image(config[, image_size])

save_bodies(body_identifiers)

save_body(body_identifier)

save_world()

save_world_v2()

set_batched_qpos(names, qpos)

set_batched_qpos_by_id(body_index, ...)

set_body_state(body_name, state)

set_body_state2(body_name, position, orientation)

set_body_state2_by_id(body_id, position, ...)

set_body_state_by_id(body_id, state)

set_client_id(client_id)

set_debug_camera(distance, yaw, pitch, target)

set_joint_state(joint_name, state)

set_joint_state_by_id(body_id, joint_id, state)

set_qpos(name, qpos)

set_qpos_by_id(body_id, joint_id, qpos)

transform_mesh(mesh, pos, quat_xyzw)

transform_mesh2(mesh, pos, quat_xyzw, ...)

transform_pcd(raw_pcd, pos, quat_xyzw)

update_contact()

Attributes

nr_bodies

nr_joints

nr_links

__getitem__(item)[source]#
__init__(client_id=None)[source]#
__new__(**kwargs)#
change_visual_color(body_id, rgba, link_id=None)[source]#
get_batched_qpos(names, numpy=True)[source]#
get_batched_qpos_by_id(body_id, joint_ids, numpy=True)[source]#
get_body_index(body_name)[source]#
Parameters:

body_name (str) –

Return type:

int

get_body_name(body_id)[source]#
Parameters:

body_id (int) –

Return type:

str

get_body_state(body_name)[source]#
Parameters:

body_name (str) –

Return type:

BodyState

get_body_state_by_id(body_id)[source]#
Parameters:

body_id (int) –

Return type:

BodyState

get_collision_shape_data(body_name)[source]#
Parameters:

body_name (str) –

Return type:

List[CollisionShapeData]

get_collision_shape_data_by_id(body_id)[source]#
Parameters:

body_id (int) –

Return type:

List[CollisionShapeData]

get_constraint(constraint_id)[source]#
Parameters:

constraint_id (int) –

Return type:

ConstraintInfo

get_contact(a=None, b=None, update=False)[source]#
Parameters:
Return type:

List[ContactInfo]

get_debug_camera()[source]#
Return type:

DebugCameraState

get_free_joints(body_id)[source]#

Get a list of indices corresponding to all non-fixed joints in the body.

Parameters:

body_id (int) –

Return type:

List[int]

get_joint_info(joint_name)[source]#
Parameters:

joint_name (str) –

Return type:

JointInfo

get_joint_info_by_body(body_id)[source]#
Parameters:

body_id (int) –

Return type:

List[JointInfo]

get_joint_info_by_id(body_id, joint_id)[source]#
Parameters:
  • body_id (int) –

  • joint_id (int) –

Return type:

JointInfo

get_joint_state(joint_name)[source]#
Parameters:

joint_name (str) –

Return type:

JointState

get_joint_state_by_id(body_id, joint_id)[source]#
Parameters:
  • body_id (int) –

  • joint_id (int) –

Return type:

JointState

Parameters:

link_name (str) –

Return type:

LinkIdentifier

Parameters:
  • body_id (int) –

  • link_name (str) –

Return type:

int

Parameters:
  • body_id (int) –

  • link_id (int) –

Return type:

str

Parameters:

link_name (str) –

Return type:

LinkState

Parameters:
  • body_id (int) –

  • link_id (int) –

Return type:

LinkState

get_mesh(body_id, zero_center=True, verbose=False, mesh_filename=None, mesh_scale=1.0)[source]#

Get the point cloud of a body.

Parameters:
  • body_id (int) –

  • zero_center (bool) –

  • verbose (bool) –

  • mesh_filename (str | None) –

  • mesh_scale (float) –

Return type:

TriangleMesh

get_mesh_box(*args, **kwargs)[source]#
Parameters:

self (BulletWorld) –

get_mesh_mesh(*args, **kwargs)[source]#
Parameters:

self (BulletWorld) –

get_pointcloud(body_id, points_per_geom=1000, zero_center=True)[source]#

Get the point cloud of a body.

Parameters:
  • body_id (int) –

  • points_per_geom (int) –

  • zero_center (bool) –

Return type:

ndarray

get_pointcloud_box(*args, **kwargs)[source]#
Parameters:

self (BulletWorld) –

get_pointcloud_mesh(*args, **kwargs)[source]#
Parameters:

self (BulletWorld) –

get_qpos(name)[source]#
get_qpos_by_id(body_id, joint_id)[source]#
get_state(name, type=None)[source]#
Parameters:
  • name (str) –

  • type (str | None) –

Return type:

BodyState | LinkState | JointState

get_xmat(name, type=None)[source]#
get_xpos(name, type=None)[source]#
get_xquat(name, type=None)[source]#
is_collision_free(a, b)[source]#
Parameters:
Return type:

bool

notify_update(body_id, body_name=None, group=None)[source]#
refresh_names()[source]#
render_image(config, image_size=None)[source]#
Parameters:
Return type:

Tuple[ndarray, ndarray, ndarray]

save_bodies(body_identifiers)[source]#
Parameters:

body_identifiers (List[str | int]) –

Return type:

GroupSaver

save_body(body_identifier)[source]#
Parameters:

body_identifier (str | int) –

Return type:

BodyFullStateSaver

save_world()[source]#
Return type:

WorldSaver

save_world_v2()[source]#
Return type:

WorldSaverV2

set_batched_qpos(names, qpos)[source]#
set_batched_qpos_by_id(body_index, joint_indices, qpos)[source]#
set_body_state(body_name, state)[source]#
Parameters:
set_body_state2(body_name, position, orientation)[source]#
Parameters:
set_body_state2_by_id(body_id, position, orientation)[source]#
Parameters:
set_body_state_by_id(body_id, state)[source]#
Parameters:
set_client_id(client_id)[source]#
set_debug_camera(distance, yaw, pitch, target)[source]#
Parameters:
set_joint_state(joint_name, state)[source]#
Parameters:
set_joint_state_by_id(body_id, joint_id, state)[source]#
Parameters:
set_qpos(name, qpos)[source]#
set_qpos_by_id(body_id, joint_id, qpos)[source]#
transform_mesh(mesh, pos, quat_xyzw)[source]#
Parameters:

mesh (TriangleMesh) –

transform_mesh2(mesh, pos, quat_xyzw, current_pos, current_quat_xyzw)[source]#
Parameters:
transform_pcd(raw_pcd, pos, quat_xyzw)[source]#
update_contact()[source]#
property nr_bodies#
property nr_joints#