
The QRE B2W workspace is organized into two main categories: **mybotshop** (custom MBS packages) and **third_party** (external dependencies).

Workspace Structure
-------------------

Located under: ``/opt/mybotshop/src/mybotshop/``

Core Packages
-------------

.. list-table::
   :header-rows: 1
   :widths: 25 15 45

   * - Package
     - Version
     - Description
   * - b2_platform
     - 1.0.0
     - Unitree SDK hardware interface, odometry, video streaming
   * - b2_interface
     - 1.0.0
     - Custom ROS 2 services (B2Modes.srv, B2Light.srv)
   * - b2_dynamixel
     - 1.0.0
     - Dynamixel servo control for pan-tilt mechanism
   * - b2_bringup
     - 1.0.0
     - System startup and service installer
   * - b2_description
     - 1.0.0
     - URDF/Xacro robot descriptions
   * - b2_z1
     - 1.0.0
     - Unitree Z1 arm driver

Sensor Packages
---------------

.. list-table::
   :header-rows: 1
   :widths: 25 15 45

   * - Package
     - Version
     - Description
   * - b2_lidars
     - 1.2.0
     - Livox Mid360 dual-LiDAR integration
   * - b2_depth_camera
     - 1.2.0
     - RealSense D435i depth camera
   * - b2_usbcam
     - 1.2.0
     - USB camera streaming
   * - b2_gps
     - 1.2.0
     - GPS/GNSS integration (Fixposition, Drotek)
   * - b2_vision_action
     - 1.0.0
     - Computer vision and object detection

Navigation and Control
----------------------

.. list-table::
   :header-rows: 1
   :widths: 25 15 45

   * - Package
     - Version
     - Description
   * - b2_control
     - 1.2.0
     - Twist mux, teleop, EKF localization
   * - b2_nav2
     - 1.0.0
     - Nav2 navigation stack, SLAM
   * - b2_webserver
     - 2.0.0
     - Web-based remote operation interface
   * - b2_viz
     - 1.0.0
     - RViz visualization configurations
   * - b2_gazebo
     - 1.0.0
     - Gazebo Fortress simulation
   * - b2_steamdeck
     - 1.0.0
     - Steam Deck wireless teleoperation

b2_platform
-----------

The ``b2_platform`` package provides ROS 2 integration with the Unitree SDK 2.0.

**Key Launch Files:**

- ``hardware.launch.py`` - Main hardware control
- ``state_publisher.launch.py`` - Robot state publishing
- ``front_video.launch.py`` - Front camera streaming
- ``rear_video.launch.py`` - Rear camera streaming
- ``bridge.launch.py`` - ROS domain bridging

**Configuration:**

Configuration file: ``b2_platform/config/b2_platform.yaml``

.. code-block:: yaml

   robot_odom_topic: "platform/odom"
   robot_odom_publisher_on: true
   transform_odom_frame: "odom"
   transform_base_frame: "base_link"
   front_camera_port: 1720
   rear_camera_port: 1721

b2_interface
------------

Custom ROS2 message and service definitions for B2W packages.

**Key Services:**

- ``B2Modes.srv`` - Robot mode control (stand_up, stand_down, gaits, etc.)
- ``B2Light.srv`` - LED light control

b2_control
----------

Control system package for robot base. Provides twist mux, teleop configuration, and EKF localization.

**Key Launch Files:**

- ``twistmux.launch.py`` - Twist mux configuration
- ``control.launch.py`` - Full control stack
- ``teleop.launch.py`` - Teleop configuration
- ``ekf_localization.launch.py`` - EKF localization

**EKF Localization:**

.. code-block:: bash

   ros2 launch b2_control ekf_localization.launch.py

Configuration file: ``b2_control/config/localization.yaml``
