pyrcf.components.callback_handlers.pb_gui_callbacks
Attributes
Numpy array representating quaternion in format [x,y,z,w] |
|
Numpy array representating 3D cartesian vector in format [x,y,z] |
Classes
Abstraction for all GUICallbacks defined using Pybullet GUI. |
|
Create a slider in pybullet and specify the callback to apply the slider value to. |
|
Create multiple sliders in pybullet and use values from all the sliders in a single |
|
Create a button in pybullet and specify the callback to apply the slider value to. |
|
Draw a coordinate frame in pybullet that changes its pose based on the pose |
|
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.CustomCallbackBaseAbstraction 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:
PbGUICallbackCreate a slider in pybullet and specify the callback to apply the slider value to.
- _slider
- _check_first = True
- _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:
PbGUICallbackCreate multiple sliders in pybullet and use values from all the sliders in a single callback.
- _sliders: List[pyrcf.utils.gui_utils.pb_gui_utils.PybulletGUISlider] = []
- _check_first = True
- _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.utils.gui_utils.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:
PbGUICallbackCreate 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:
PbGUICallbackDraw 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:
PbGUICallbackVisualise 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.