
.. rubric:: RViz2 Visualization

To visualize the robot state in RViz2:

.. code-block:: bash

   ros2 launch b2_viz view_robot.launch.py

Robot Description
-----------------

Standard B2 (legged):

.. code-block:: bash

   export B2_DESC=1
   ros2 launch b2_description b2_description.launch.py

Wheeled B2W:

.. code-block:: bash

   ros2 launch b2_description b2w_description.launch.py

Convert Xacro to URDF
---------------------

.. code-block:: bash

   export B2_DESC=1
   ros2 run xacro xacro \
     /opt/mybotshop/src/mybotshop/b2_description/xacro/robot.xacro \
     > /opt/mybotshop/src/mybotshop/b2_description/xacro/b2.urdf

Check Transforms (TF Tree)
--------------------------

To debug the TF tree:

.. code-block:: bash

   ros2 run rqt_gui rqt_gui --ros-args \
     --remap tf:=/b2_unit_001/tf \
     tf_static:=/b2_unit_001/tf_static

Visualize URDF
--------------

To view the robot's URDF model:

.. code-block:: bash

   ros2 launch b2_description b2w_description.launch.py
