
.. rubric:: Command Line Interface

This requires the installation of the ROS2 Modules on B2. To teleoperate the B2W, run the following command:

.. code-block:: bash

   ros2 run teleop_twist_keyboard teleop_twist_keyboard \
     cmd_vel:=/b2_unit_001/hardware/cmd_vel

.. note::
   Replace ``b2_unit_001`` with your robot's namespace. Reduce speed by pressing **z** until **0.1** for safe indoor operation.

Twist Mux Priority
------------------

The twist multiplexer arbitrates between multiple velocity command sources:

.. list-table::
   :header-rows: 1
   :widths: 30 15 15

   * - Source
     - Priority
     - Timeout
   * - E-Stop Lock
     - 255
     - None
   * - Steamdeck Joy
     - 20
     - 0.5s
   * - Logitech Joy
     - 15
     - 0.5s
   * - Webserver
     - 10
     - 0.5s
   * - Interactive Marker
     - 7
     - 0.5s
   * - External cmd_vel
     - 5
     - 0.5s
   * - Autonomous High
     - 3
     - 0.5s
   * - Autonomous Mid
     - 2
     - 0.5s
   * - Autonomous Low
     - 1
     - 0.5s

Logitech F710 Controller
------------------------

.. code-block:: bash

   ros2 launch b2_control teleop.launch.py

PS4 Controller
--------------

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

Steam Deck Controller
---------------------

The ``b2_steamdeck`` package enables wireless teleoperation using a Steam Deck as a portable controller with audio feedback.

**Movement (requires L1 held):**

.. list-table::
   :header-rows: 1
   :widths: 30 50

   * - Input
     - Action
   * - L1 + Left Stick
     - Linear X/Y movement
   * - L1 + Right Stick X
     - Angular rotation
   * - R1 + Sticks
     - Turbo mode (faster speeds)

**Robot Commands:**

.. list-table::
   :header-rows: 1
   :widths: 30 30

   * - Button Combo
     - Action
   * - L2 + D-Pad Up
     - Stand up
   * - L2 + D-Pad Down
     - Sit down

**Speed Configuration:**

.. list-table::
   :header-rows: 1
   :widths: 20 20 20 20

   * - Mode
     - Linear X
     - Linear Y
     - Angular
   * - Normal
     - 0.7 m/s
     - 0.6 m/s
     - 0.8 rad/s
   * - Turbo
     - 1.0 m/s
     - 1.0 m/s
     - 0.8 rad/s

Launch Steam Deck teleop:

.. code-block:: bash

   ros2 launch b2_steamdeck system.launch.py
