From 63e389549a26ee7d0f3f0cc3c984ba1ce389dfbb Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Sat, 12 Oct 2024 12:55:36 +0200 Subject: [PATCH] docs: add new demo world --- docs/demo_worlds.rst | 138 ++++++++++++++++++++++++++++--------------- 1 file changed, 90 insertions(+), 48 deletions(-) diff --git a/docs/demo_worlds.rst b/docs/demo_worlds.rst index 6668124a..bacaef88 100644 --- a/docs/demo_worlds.rst +++ b/docs/demo_worlds.rst @@ -16,6 +16,96 @@ MVSim. :backlinks: none +demo_warehouse +--------------------- + +Example of a 3D Lidar Jackal robot in a warehouse. The XML illustrates how to animate an object to make it to follow a given trajectory +in a loop. + +.. tab-set:: + .. tab-item:: ROS 1 + + .. code-block:: bash + + roslaunch mvsim demo_warehouse.launch + + .. tab-item:: ROS 2 + :selected: + + .. code-block:: bash + + ros2 launch mvsim demo_warehouse.launch.py + + .. tab-item:: Standalone MVSim build + + Assuming you compiled MVSim in the directory ``MVSIM_ROOT``, + with cmake build directory ``build-Release``, run: + + .. code-block:: bash + + cd MVSIM_ROOT + build-Release/bin/mvsim launch mvsim_tutorial/demo_warehouse.world.xml + + +.. raw:: html + +
+ +
+ + +.. dropdown:: World XML code + + File: `mvsim_tutorial/demo_warehouse.world.xml `_ + + .. literalinclude:: ../mvsim_tutorial/demo_warehouse.world.xml + :language: xml + +demo_road_circuit1 +--------------------- + +Example of two Jackal robots with cameras and 3D LiDARs in a 2.5 world, including ramps, road bumps, and a bridge. +For ROS, note that having multiple robots uses namespaces even for ``/tf``, hence the ``remappings`` (see the launch file) +needed for RViz to show the sensors and send ``/cmd_vel`` commands. + +.. tab-set:: + .. tab-item:: ROS 2 + :selected: + + .. code-block:: bash + + ros2 launch mvsim demo_road_circuit1.launch.py + + .. tab-item:: Standalone MVSim build + + Assuming you compiled MVSim in the directory ``MVSIM_ROOT``, + with cmake build directory ``build-Release``, run: + + .. code-block:: bash + + cd MVSIM_ROOT + build-Release/bin/mvsim launch mvsim_tutorial/demo_road_circuit1.world.xml + + +.. raw:: html + +
+ +
+ + +.. dropdown:: World XML code + + File: `mvsim_tutorial/demo_road_circuit1.world.xml `_ + + .. literalinclude:: ../mvsim_tutorial/demo_road_circuit1.world.xml + :language: xml + + demo_1robot ------------------ @@ -351,51 +441,3 @@ external ``.dae`` or ``.stl`` files. :language: xml -demo_warehouse ---------------------- - -Example of a 3D Lidar Jackal robot in a warehouse. The XML illustrates how to animate an object to make it to follow a given trajectory -in a loop. - -.. tab-set:: - .. tab-item:: ROS 1 - - .. code-block:: bash - - roslaunch mvsim demo_warehouse.launch - - .. tab-item:: ROS 2 - :selected: - - .. code-block:: bash - - ros2 launch mvsim demo_warehouse.launch.py - - .. tab-item:: Standalone MVSim build - - Assuming you compiled MVSim in the directory ``MVSIM_ROOT``, - with cmake build directory ``build-Release``, run: - - .. code-block:: bash - - cd MVSIM_ROOT - build-Release/bin/mvsim launch mvsim_tutorial/demo_warehouse.world.xml - - -.. raw:: html - -
- -
- - -.. dropdown:: World XML code - - File: `mvsim_tutorial/demo_warehouse.world.xml `_ - - .. literalinclude:: ../mvsim_tutorial/demo_warehouse.world.xml - :language: xml - -