7. Running the Rover Demo with docker

We’ll use the docker images built in tutorial 4 to run the Rover Demo. This demo consists on a user operating a rover running in Gazebo on the flight side.

Rover demo setup

Note

Remember that all the commands mentioned in the following instructions need to be run from the terminal in the brash_docker, e.g.

$ cd ${HOME}/brash_docker

7.1. Instructions

  1. Run fsw :

    $ docker compose -f docker-compose-dev.yml up fsw
    
  2. Run rosgsw (cfe-ros2 plugin, call TO once):

    $ docker compose -f docker-compose-dev.yml up rosgsw
    
  3. Run novnc to see ROS2 output:

    $ 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 rosgsw or rosfsw machines will be accessible.

  4. Run in rosgsw all the ROS2 nodes - rviz, rqt, twist_odom_converter :

    $ docker exec -it  brash_docker-rosgsw-1  bash
    $ ros2 launch brash_application_tools ground_rover_demo_husky.launch.py
    
    Rover demo - Groundsystem

    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.

  5. Finally, we need to start the Rover on the flightside. Start the rosfsw service:

    $ docker compose -f docker-compose-dev.yml up rosfsw
    

    and launch the rover:

    $ 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:

    Rover in gazebo

    Press the PLAY button at the lower left of the gazebo window to start the simulation.

  6. 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: