11. Running the Mars rover Demo with docker

In this tutorial, we’ll use the space-ros Curiosity rover. We’ll use the same cFS application we have used previously (rover_app), with the only difference being the odometry and twist topics being used, as they have different names for the Husky rover and Curiosity.

To follow this tutorial, you have to build docker images of BRASH with SpaceROS (see tutorial: Building BRASH Docker images with SpaceROS ).

11.1. Instructions

  1. Run the services fsw , rosgsw, rosfsw and novnc :

    $ cd ${HOME}/brash_demonstrations
    $ docker compose -f docker-compose-dev.yml up fsw rosgsw rosfsw novnc
    

    They do the following:

    • fsw : Start cFS in the spacecraft machine.

    • rosgsw : Start the cFS-ROS2 bridge in the ground machine. It also sent a TO request.

    • rosfsw : Start the cFS-SBN bridge in the flight machine.

    • novnc : Start the noVNC server to show GUI applications.

  2. 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.

  3. Open a terminal in the rosgsw container and start the GUI tools to send commands to the robots:

    $ docker exec -it  brash_demonstrations-rosgsw-1  bash
    $ ros2 launch brash_application_tools ground_mars_rover.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.

  4. Finally, we need to start the Rover on the flightside:

    $ docker exec -it  brash_demonstrations-rosfsw-1  bash
    $ ros2 launch brash_application_tools flight_mars_rover.launch.py
    

    You’ll see something like this in the browser:

    Mars rover in gazebo
  5. 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: