concepts.simulator.pybullet.client.BulletClient#

class BulletClient[source]#

Bases: object

Methods

connect([suppress_warnings])

disable_rendering([disable_rendering, ...])

disable_world_update()

Temproary disable the world update.

disconnect()

get_mouse_events()

has_gui()

is_connected()

load_mjcf(xml_path[, pos, quat, body_name, ...])

load_urdf(xml_path[, pos, quat, body_name, ...])

load_urdf_template(xml_path, replaces[, ...])

loads_mjcf(xml_content[, pos, quat, save_to])

perform_collision_detection()

remove_body(body_id)

reset_world()

step([steps])

timeout(duration)

update_viewer()

wait_for_duration(duration)

wait_for_user([message])

wait_forever()

with_fps([fps, render_fps])

Attributes

DEFAULT_ASSETS_ROOT

DEFAULT_ENGINE_PARAMETERS

DEFAULT_FPS

DEFAULT_GRAVITY

world

Alias for self.w.

__init__(assets_root=None, is_gui=False, realtime_gui=False, fps=None, render_fps=None, gravity=None, engine_parameters=None, connect=True, client_id=-1, save_video=None, width=960, height=960)[source]#
Parameters:
  • assets_root (str | None) –

  • is_gui (bool) –

  • realtime_gui (bool) –

  • fps (int | None) –

  • render_fps (int | None) –

  • gravity (Tuple[float] | float | None) –

  • engine_parameters (Dict[str, Any] | None) –

  • connect (bool) –

  • client_id (int) –

  • save_video (str | None) –

  • width (int | None) –

  • height (int | None) –

__new__(**kwargs)#
connect(suppress_warnings=True)[source]#
Parameters:

suppress_warnings (bool) –

disable_rendering(disable_rendering=True, reset=False, suppress_stdout=False)[source]#
Parameters:
  • disable_rendering (bool) –

  • reset (bool) –

  • suppress_stdout (bool) –

disable_world_update()[source]#

Temproary disable the world update. Specifically, when loading a new model, the world object self.w will not be updated. This function also disables rendering of the pybullet debug renderer. Thus, this functionality is useful when loading a large number of models.

disconnect()[source]#
get_mouse_events()[source]#
Return type:

List[MouseEvent]

has_gui()[source]#
is_connected()[source]#
load_mjcf(xml_path, pos=(0, 0, 0), quat=(0, 0, 0, 1), body_name=None, group='__UNSET__', static=False, notify_world_update=True)[source]#
Return type:

int

load_urdf(xml_path, pos=(0, 0, 0), quat=(0, 0, 0, 1), body_name=None, group='__UNSET__', static=False, scale=1.0, rgba=None, notify_world_update=True)[source]#
Parameters:
  • body_name (str | None) –

  • group (str | None) –

  • scale (float) –

Return type:

int

load_urdf_template(xml_path, replaces, pos=None, quat=None, **kwargs)[source]#
Parameters:
Return type:

int

loads_mjcf(xml_content, pos=None, quat=None, save_to=None, **kwargs)[source]#
Return type:

int

perform_collision_detection()[source]#
remove_body(body_id)[source]#
reset_world()[source]#
step(steps=1)[source]#
timeout(duration)[source]#
Parameters:

duration (float) –

update_viewer()[source]#
wait_for_duration(duration)[source]#
wait_for_user(message='Press enter to continue...')[source]#
wait_forever()[source]#
with_fps(fps=None, render_fps=None)[source]#
Parameters:
  • fps (int | None) –

  • render_fps (int | None) –

DEFAULT_ASSETS_ROOT = '/Users/jiayuanm/Projects/Concepts/concepts/assets'#
DEFAULT_ENGINE_PARAMETERS = {'numSolverIterations': 10}#
DEFAULT_FPS = 120#
DEFAULT_GRAVITY = (0, 0, -9.8)#
property world#

Alias for self.w.