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

Visualization with RViz2
------------------------

Launch the visualization tools for the B2W.

Robot Description
^^^^^^^^^^^^^^^^^

View the robot URDF model:

.. code-block:: bash

   ros2 launch b2_description display.launch.py

With Z1 arm enabled:

.. code-block:: bash

   export B2_Z1=1
   ros2 launch b2_description display.launch.py

Full Visualization
^^^^^^^^^^^^^^^^^^

Launch complete visualization with sensor data:

.. code-block:: bash

   ros2 launch b2_bringup rviz.launch.py

RViz Configuration
^^^^^^^^^^^^^^^^^^

The default RViz configuration includes:

- Robot model visualization
- TF tree display
- LaserScan from LiDAR
- PointCloud2 visualization
- Camera image displays
- Odometry arrows
- Path visualization

Custom configurations are stored in:

.. code-block:: text

   b2_bringup/rviz/

TF Tree
^^^^^^^

View the transform tree:

.. code-block:: bash

   ros2 run tf2_tools view_frames

   # Or real-time in terminal
   ros2 run tf2_ros tf2_echo base_link odom
