pyrcf.components.callback_handlers.pb_gui_callbacks =================================================== .. py:module:: pyrcf.components.callback_handlers.pb_gui_callbacks Attributes ---------- .. autoapisummary:: pyrcf.components.callback_handlers.pb_gui_callbacks.QuatType pyrcf.components.callback_handlers.pb_gui_callbacks.Vector3D Classes ------- .. autoapisummary:: pyrcf.components.callback_handlers.pb_gui_callbacks.PbGUICallback pyrcf.components.callback_handlers.pb_gui_callbacks.PbGUISliderCallback pyrcf.components.callback_handlers.pb_gui_callbacks.PbMultiGUISliderSingleCallback pyrcf.components.callback_handlers.pb_gui_callbacks.PbGUIButtonCallback pyrcf.components.callback_handlers.pb_gui_callbacks.PbDebugFrameVizCallback pyrcf.components.callback_handlers.pb_gui_callbacks.PbDebugPointsCallback Module Contents --------------- .. py:data:: QuatType :type: TypeAlias :value: np.ndarray Numpy array representating quaternion in format [x,y,z,w] .. py:data:: Vector3D :type: TypeAlias :value: np.ndarray Numpy array representating 3D cartesian vector in format [x,y,z] .. py:class:: PbGUICallback Bases: :py:obj:`pyrcf.components.callback_handlers.base_callbacks.CustomCallbackBase` Abstraction for all GUICallbacks defined using Pybullet GUI. .. py:class:: 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: x) Bases: :py:obj:`PbGUICallback` Create a slider in pybullet and specify the callback to apply the slider value to. .. py:attribute:: _slider .. py:attribute:: _check_first :value: True .. py:attribute:: _callback .. py:method:: run_once() -> None This method has to be called for the callback to be executed. .. py:method:: cleanup() Override if custom cleaning up/shutting down is required. .. py:class:: 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: x) Bases: :py:obj:`PbGUICallback` Create multiple sliders in pybullet and use values from all the sliders in a single callback. .. py:attribute:: _sliders :type: List[pyrcf.utils.gui_utils.pb_gui_utils.PybulletGUISlider] :value: [] .. py:attribute:: _check_first :value: True .. py:attribute:: _callback .. py:method:: run_once() This method has to be called for the callback to be executed. .. py:method:: cleanup() Override if custom cleaning up/shutting down is required. .. py:method:: get_sliders() -> List[pyrcf.utils.gui_utils.pb_gui_utils.PybulletGUISlider] Get a list of all slider objects. :returns: List of slider objects. :rtype: List[PybulletGUISlider] .. py:class:: PbGUIButtonCallback(button_name: str, callback: Callable[[], None], cid: int) Bases: :py:obj:`PbGUICallback` Create a button in pybullet and specify the callback to apply the slider value to. .. py:attribute:: _button .. py:attribute:: _callback .. py:method:: run_once() This method has to be called for checking button press and for the callback to be executed. .. py:method:: cleanup() Override if custom cleaning up/shutting down is required. .. py:class:: PbDebugFrameVizCallback(callback: Callable[[], Tuple[Vector3D, QuatType]], cid: int, line_length: float = 0.2, line_width: float = 2, duration: float = 0.0) Bases: :py:obj:`PbGUICallback` Draw a coordinate frame in pybullet that changes its pose based on the pose returned by a callback function. .. py:attribute:: _frame_viz .. py:attribute:: _callback .. py:method:: run_once() This method has to be called for for getting the pose from the callback function and updating the frame visualiser's pose. .. py:method:: cleanup() Override if custom cleaning up/shutting down is required. .. py:class:: 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: :py:obj:`PbGUICallback` Visualise point(s)/sphere(s) in pybullet exposing a callback to change its position in the world. .. py:attribute:: _points_viz .. py:attribute:: _callback .. py:method:: run_once() To be called in loop. .. py:method:: cleanup() Override if custom cleaning up/shutting down is required.