.. _brash_docker_rover_demo: Running the Rover Demo with docker ##################################### We'll use the docker images built in :ref:`tutorial 4 ` to run the Rover Demo. This demo consists on a user operating a rover running in Gazebo on the flight side. .. figure:: _static/rover_setup.png :width: 600px :alt: Rover demo setup :align: center | .. note:: Remember that all the commands mentioned in the following instructions need to be run from the terminal in the **brash_docker**, e.g. .. code-block:: bash $ cd ${HOME}/brash_docker Instructions ============= 1. Run :code:`fsw` : .. code-block:: bash $ docker compose -f docker-compose-dev.yml up fsw #. Run :code:`rosgsw` (cfe-ros2 plugin, call TO once): .. code-block:: bash $ docker compose -f docker-compose-dev.yml up rosgsw #. Run novnc to see ROS2 output: .. code-block:: bash $ docker compose -f docker-compose-dev.yml up novnc This will start a "noVNC" server, which will show GUI applications. Open a browser and go to http://localhost:8080/vnc.html . After you press Connect, you should see a window where any GUI launched from the :code:`rosgsw` or :code:`rosfsw` machines will be accessible. #. Run in :code:`rosgsw` all the ROS2 nodes - rviz, rqt, twist_odom_converter : .. code-block:: bash $ docker exec -it brash_docker-rosgsw-1 bash $ ros2 launch brash_application_tools ground_rover_demo_husky.launch.py .. figure:: _static/rover_demo_rosgsw.png :width: 800px :alt: Rover demo - Groundsystem :align: center You'll see an Rviz window, where you'll see the odometry information returned by the bridge. There should also be an Rqt window which you'll use to send twist commands to the remote rover in the flightsystem side. #. Finally, we need to start the Rover on the flightside. Start the :code:`rosfsw` service: .. code-block:: bash $ docker compose -f docker-compose-dev.yml up rosfsw and launch the rover: .. code-block:: bash $ docker exec -it brash_docker-rosfsw-1 bash $ ros2 launch brash_application_tools flight_rover_demo_husky.launch.py You'll see something like this in the browser: .. figure:: _static/rover_demo_rosfsw.png :width: 800px :alt: Rover in gazebo :align: center Press the PLAY button at the lower left of the gazebo window to start the simulation. #. That is it for setup, now you can command the robot. Using the rqt interface, send twist commands. As you might remember, the rqt and rviz interfaces are running in **rosgsw** (ground). You'll see the rover moving around in gazebo, on **rosfsw** (flight side). The commands and odometry are flowing back and forth using the BRASH bridges. The video below shows an example run: .. youtube:: Pg2PoZmaGoA :width: 640 :height: 480