vrx_2023 testing - osrf/vrx GitHub Wiki

Testing your solution

This tutorial will allow you to verify that your submission is working as expected.

Dependencies

The steps below assume you have Docker installed and configured to work with your Nvidia graphics card.

  • If you have not yet set up Docker on your system, complete steps 1 and 2 of this tutorial before proceeding. Note that step 3 (installing Rocker) is not currently needed.
  • In addition, currently you must also have followed the host-based install instructions to install VRX on your host system.
    • Note: we are working to eliminate this dependency.

Prerequisites

To complete this tutorial, you will need to have already prepared a solution to one or more VRX tasks. This means:

Step 1: Prepare a local testing environment

This step installs the necessary testing tools on your system. You should only need to do this once.

  1. Change into the vrx_ws/src directory you created when installing vrx.

    cd ~/vrx_ws/src
  2. Clone the vrx-docker repository.

    git clone https://github.com/osrf/vrx-docker

    This should create a new vrx-docker directory alongside the original vrx repository directory.

  3. Source your bash.setup file, change into the vrx-docker directory, and set the variable TEAM for later use:

    source ~/vrx_ws/install/setup.bash
    cd vrx-docker
    TEAM=<your_team_name>

    Replace <your_team_name> with the team name you will use for your submission.

  4. Build the vrx-server docker image (may take 30-60 minutes the first time):

    ./vrx_server/build_image.bash

Step 2: Configure your test

In this step you will set up your platform and specify which task you want to evaluate.

  1. Copy your submission files (yaml config files and docker hub image name) to the vrx-docker/team_config folder.

  2. Prepare your team's vehicle according to the configuration you provided:

    ./prepare_team_wamv.bash "$TEAM"
  3. Define a TASK variable to indicate the task you wish to test against.

    TASK=stationkeeping

    Other valid options include wayfinding, perception, acoustic_perception,wildlife, follow_path, acoustic_tracking, and scan_dock_deliver.

  4. Get the practice worlds provided for your task:

    cd ~/vrx_ws/src/vrx-docker
    mkdir -p generated/task_generated/$TASK/worlds
    for world in ~/vrx_ws/src/vrx/vrx_gz/worlds/2023_practice/practice_2023_$TASK*.sdf; do suffix=${world##*2023_}; name=${suffix%_task.sdf}.sdf; cp -v ${world} generated/task_generated/$TASK/worlds/$name; done
    
  5. Define a TRIAL variable to indicate which of the task worlds you would like to run (options are 0,1,2).

    TRIAL=0

Step 3: Run and score your solution

This step will test your submission on the task and trial specified above:

  1. Execute the run_trial.bash script with your team, task and trial variables as arguments:

    ./run_trial.bash $TEAM $TASK $TRIAL

    This command will run your submission image and the vrx-server image at the same time and generate multiple log files which are saved in the vrx-docker/generated/logs directory.

  2. View your score for the task:

    cat generated/logs/$TEAM/$TASK/$TRIAL/trial_score.txt
  3. See a replay of your system's performance on the task and verify that it behaved as you expected:

    ./replay_trial.bash $TEAM $TASK $TRIAL

Troubleshooting

If you have completed the steps above and playback of your trial shows that:

  • either your WAMV does not move at all or
  • the behavior of your WAMV in the container does not match its behavior when run directly on a host system

then there may be a problem with your Docker image setup. In this case, refer to our Docker troubleshooting tutorials for some suggestions for detecting and correcting docker-related problems.

Back: Validation Top: VRX Tutorials
⚠️ **GitHub.com Fallback** ⚠️