Standard Node ============= The ``bota_payload_utils`` package implements two standard ROS2 nodes: - **bota_payload_compensator_node** (:ref:`see below `) - **bota_payload_estimator_node** (:ref:`see below `) These nodes follow the `Bota Control Toolkit architecture <../bota_control_toolkit/bota_control_toolkit.html>`__, allowing them to be easily integrated into processing chains with other `ROS2 Bota Control Nodes <../bota_control_toolkit/bota_control_toolkit_ros2.html>`__, such as the `Bota Driver Node <../driver/driver_ros2_standard_node.html>`__. ---- .. _bota-payload-compensator-node: Bota Payload Compensator Node ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Configuration Parameters ------------------------- The node requires the following parameters: .. list-table:: :widths: 15 35 :header-rows: 1 :class: highlight * - Parameter - Description * - ``node_name`` - Name assigned to the node, as well as the prefix for topics and services. * - ``config_file`` - Path to the JSON configuration file * - ``input_node_name`` - Name of the node that provides input data to this node in the processing chain. * - ``imu_offset`` - Offset between the Wrench frame and the IMU frame. .. note:: The ``input_node_name`` parameter should match the ``node_name`` of the previous node in the processing chain. .. warning:: The ``imu_offset`` parameter will be deprecated in future releases as the IMU data will be published by the driver in the same frame as the wrench. Published Topics ---------------- Once running, the node publishes the following topics: .. list-table:: :widths: 28 28 40 :header-rows: 1 :class: highlight * - Topic - Message Type - Description * - ``/bota_frame`` - :ref:`BotaFrame ` (see below) - Complete sensor data including status, wrench, IMU, temperature and timestamp * - ``/bota_wrench`` - `WrenchStamped `_ - Force and torque measurements from the sensor * - ``/bota_imu`` - `Imu `_ - Imu measurements from the sensor The published topics follow the same structure as the ones described in the `Bota Driver Node documentation <../driver/driver_ros2_standard_node.html#published-topics>`__. For this reason, the **same usage recommendations apply here** as well. Since this node is not a starting block in the processing chain (it only processes a signal), **the published topics are defined in the same frame as the one of source node**. Services ------------------ The node exposes the following service: .. list-table:: :widths: 55 30 45 :header-rows: 1 :class: highlight * - Service - Service Type - Description * - ``//tare_compensated_wrench`` - ``std_srvs/srv/Trigger`` - Zeros out the wrench output of this block, setting current state as new reference .. important:: Calling the **tare** service from the **driver node** will **only zero out the input** raw signal, which is not desired behavior when using the compensator node in a processing chain. For this reason, the **tare service provided by the compensator node should be used instead**. Getting Started --------------- **Launch the node from the console:** .. code-block:: bash ros2 run bota_payload_utils bota_payload_compensator_node \ --ros-args \ -p node_name:= -p config_file:= \ -p input_node_name:= \ -p imu_offset:= \ **Call the tare service from console:** .. code-block:: bash ros2 service call //tare_compensated_wrench std_srvs/srv/Trigger {} ---------------------- .. _bota-payload-estimator-node: Bota Payload Estimator Node ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Configuration Parameters ------------------------- The node requires the following parameters: .. list-table:: :widths: 15 35 :header-rows: 1 :class: highlight * - Parameter - Description * - ``node_name`` - Name assigned to the node, as well as the prefix for topics and services. * - ``config_file`` - Path to the JSON configuration file * - ``input_node_name`` - Name of the node that provides input data to this node in the processing chain. * - ``imu_offset`` - Offset between the Wrench frame and the IMU frame. .. note:: The ``input_node_name`` parameter should match the ``node_name`` of the previous node in the processing chain. .. warning:: The ``imu_offset`` parameter will be deprecated in future releases as the IMU data will be published in the same frame as the wrench by the driver. Published Topics ---------------- Once running, the node publishes the following topics: .. list-table:: :widths: 37 16 40 :header-rows: 1 :class: highlight * - Topic - Message Type - Description * - ``/is_estimator_running`` - `Bool `_ - Indicates whether the payload estimator is currently running. * - ``/is_estimation_successful`` - `Bool `_ - Indicates whether the payload estimation algorithm has successfully converged to a solution. These topics should be monitoried after starting the estimation routine (:ref:`see below `) to check its status and decide on further actions. .. _bota-payload-estimator-node-services: Services ------------------ The node exposes the following service: .. list-table:: :widths: 55 30 45 :header-rows: 1 :class: highlight * - Service - Service Type - Description * - ``//start_payload_estimation`` - ``std_srvs/srv/Trigger`` - Start the payload estimation routine Getting Started --------------- **Launch the node from the console:** .. code-block:: bash ros2 run bota_payload_utils bota_payload_estimator_node \ --ros-args \ -p node_name:= -p config_file:= \ -p input_node_name:= \ -p imu_offset:= \ **Call the start estimation service from console:** .. code-block:: bash ros2 service call //start_payload_estimation std_srvs/srv/Trigger {} **Monitor the estimation status topics:** .. code-block:: bash ros2 topic echo //is_estimator_running ros2 topic echo //is_estimation_successful //////////////////////////// Complete Usage Example ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Bota Systems provides a ROS2 demo package ``bota_demo_ros2`` to get yourself started with the **Bota Payload Utilities for ROS2 nodes**. .. raw:: html

Found the package implementation in our official GitLab repository.

bota_demo_ros2 on GitLab