pyrcf.components.callback_handlers.pb_gui_callbacks

Attributes

QuatType

Numpy array representating quaternion in format [x,y,z,w]

Vector3D

Numpy array representating 3D cartesian vector in format [x,y,z]

Classes

PbGUICallback

Abstraction for all GUICallbacks defined using Pybullet GUI.

PbGUISliderCallback

Create a slider in pybullet and specify the callback to apply the slider value to.

PbMultiGUISliderSingleCallback

Create multiple sliders in pybullet and use values from all the sliders in a single

PbGUIButtonCallback

Create a button in pybullet and specify the callback to apply the slider value to.

PbDebugFrameVizCallback

Draw a coordinate frame in pybullet that changes its pose based on the pose

PbDebugPointsCallback

Visualise point(s)/sphere(s) in pybullet exposing a callback to change its position

Module Contents

pyrcf.components.callback_handlers.pb_gui_callbacks.QuatType: TypeAlias = np.ndarray

Numpy array representating quaternion in format [x,y,z,w]

pyrcf.components.callback_handlers.pb_gui_callbacks.Vector3D: TypeAlias = np.ndarray

Numpy array representating 3D cartesian vector in format [x,y,z]

class pyrcf.components.callback_handlers.pb_gui_callbacks.PbGUICallback

Bases: pyrcf.components.callback_handlers.base_callbacks.CustomCallbackBase

Abstraction for all GUICallbacks defined using Pybullet GUI.

class pyrcf.components.callback_handlers.pb_gui_callbacks.PbGUISliderCallback(slider_name: str, slider_lower_lim: float, slider_upper_lim: float, slider_default_val: float, callback: Callable[[float], None], cid: int, run_only_if_value_changed: bool = True, mapping_function: Callable[[float], float] = lambda x: ...)

Bases: PbGUICallback

Create a slider in pybullet and specify the callback to apply the slider value to.

_slider
_check_first
_callback
run_once() None

This method has to be called for the callback to be executed.

cleanup()

Override if custom cleaning up/shutting down is required.

class pyrcf.components.callback_handlers.pb_gui_callbacks.PbMultiGUISliderSingleCallback(slider_names: List[str], slider_lower_lims: List[float], slider_upper_lims: List[float], slider_default_vals: List[float], callback: Callable[[List[float]], None], cid: int, run_only_if_value_changed: bool = True, mapping_functions: Callable[[float], float] | List[Callable[[float], float]] = lambda x: ...)

Bases: PbGUICallback

Create multiple sliders in pybullet and use values from all the sliders in a single callback.

_sliders: List[pyrcf.components.callback_handlers.pb_gui_utils.PybulletGUISlider] = []
_check_first
_callback
run_once()

This method has to be called for the callback to be executed.

cleanup()

Override if custom cleaning up/shutting down is required.

get_sliders() List[pyrcf.components.callback_handlers.pb_gui_utils.PybulletGUISlider]

Get a list of all slider objects.

Returns:

List of slider objects.

Return type:

List[PybulletGUISlider]

class pyrcf.components.callback_handlers.pb_gui_callbacks.PbGUIButtonCallback(button_name: str, callback: Callable[[], None], cid: int)

Bases: PbGUICallback

Create a button in pybullet and specify the callback to apply the slider value to.

_button
_callback
run_once()

This method has to be called for checking button press and for the callback to be executed.

cleanup()

Override if custom cleaning up/shutting down is required.

class pyrcf.components.callback_handlers.pb_gui_callbacks.PbDebugFrameVizCallback(callback: Callable[[], Tuple[Vector3D, QuatType]], cid: int, line_length: float = 0.2, line_width: float = 2, duration: float = 0.0)

Bases: PbGUICallback

Draw a coordinate frame in pybullet that changes its pose based on the pose returned by a callback function.

_frame_viz
_callback
run_once()

This method has to be called for for getting the pose from the callback function and updating the frame visualiser’s pose.

cleanup()

Override if custom cleaning up/shutting down is required.

class pyrcf.components.callback_handlers.pb_gui_callbacks.PbDebugPointsCallback(callback: Callable[[], List[Vector3D]], cid: int, point_positions: List[Vector3D] = None, point_size: float = 1.0, rgb: Tuple[float, float, float] = (1, 0, 0), lifetime: float = 0.0)

Bases: PbGUICallback

Visualise point(s)/sphere(s) in pybullet exposing a callback to change its position in the world.

_points_viz
_callback
run_once()

To be called in loop.

cleanup()

Override if custom cleaning up/shutting down is required.