
.. warning::
   ROS 2 Foxy Fitzroy reached end-of-life in June 2023. We recommend upgrading to ROS 2 Humble for continued support.

Webserver
---------

The B2W includes a built-in web interface for remote control and monitoring.

.. image:: media/figures/web_dashboard.png
    :alt: B2 Webserver Dashboard
    :width: 100%
    :class: mbsrounded

|

Accessing the Webserver
^^^^^^^^^^^^^^^^^^^^^^^

Open a browser and navigate to:

.. code-block:: text

   http://192.168.123.164:8080

Features
^^^^^^^^

- **Camera Streams:** Live video feeds from onboard cameras
- **Joystick Control:** Virtual joystick for manual navigation
- **Mode Selection:** Robot mode controls (stand up, sit down, gaits)
- **Servo Control:** Dynamixel pan-tilt camera sliders
- **Status Display:** Real-time robot status information

Configuration
^^^^^^^^^^^^^

The webserver is configured via the launch file parameters:

.. code-block:: python

   # In b2_webserver/launch/webserver.launch.py
   webserver_node = Node(
       package='b2_webserver',
       executable='webserver',
       parameters=[{
           'port': 8080,
           'host': '0.0.0.0',
       }],
   )

Troubleshooting
^^^^^^^^^^^^^^^

**Cannot access webserver:**

1. Verify the service is running:

   .. code-block:: bash

      systemctl status b2-webserver

2. Check network connectivity:

   .. code-block:: bash

      ping 192.168.123.164

3. Verify port is open:

   .. code-block:: bash

      ss -tlnp | grep 8080
