Python =========== Download and Installation ------------------------- The Python driver is available as a **PyPI package** for easy installation. .. raw:: html

Supported platforms:

Installation using pip:

.. code-block:: bash pip install bota-payload-utils .. raw:: html
Usage Examples --------------- .. _py_usage_examples: We provide a demo to **get yourself started** with the Python Payload Utilities. .. raw:: html

What you'll find in the examples:

→ Python Demo Repository ←
API description ------------------ BotaPayloadCompensator ^^^^^^^^^^^^^^^^^^^^^^ Compensates force/torque measurements for the effects of payload mass and gravity. .. py:class:: BotaPayloadCompensator(config_path: str) Initializes the compensator from a JSON configuration file. .. py:method:: update(timestamp: float, wrench_imu_raw: np.ndarray, wrench_imu_compensated: np.ndarray) -> BotaControlReturnCode Computes compensated output from raw input. Result is written into ``wrench_imu_compensated`` in-place. .. py:method:: tare_compensated_wrench() -> bool Zeros the compensated wrench output by computing and applying current offsets. BotaPayloadEstimator ^^^^^^^^^^^^^^^^^^^^ Estimates payload properties (mass, center of mass) from force/torque measurements. .. py:class:: BotaPayloadEstimator(config_path: str) Initializes the estimator from a JSON configuration file. .. py:method:: update(timestamp: float, wrench_imu_raw: np.ndarray) -> BotaControlReturnCode Feeds new raw data into the estimation algorithm. .. py:method:: start_payload_estimation() -> bool Starts the payload estimation process. .. py:method:: is_estimator_running() -> bool Returns ``True`` if estimation is currently in progress. .. py:method:: is_estimation_successful() -> bool Returns ``True`` if the last estimation completed successfully.