Skip to content

Artifacts Validator Tool

Nate Koenig edited this page Apr 9, 2020 · 2 revisions

This tutorial explains how to use the artifacts validator tool to visualize artifacts in the practice worlds.

  1. Open a terminal and launch a world following the instructions below (if you setup a catkin workspace):
      cd ~/subt_ws/

      source ~/subt_ws/install/setup.bash

      ign launch -v 4 validate_artifacts.ign worldName:=[e.g. urban_qual or tunnel_circuit_practice_01]

If you installed the SubT Simulator as a docker image, then run these commands:

      ./run.bash osrf/subt-virtual-testbed validate_artifacts.ign worldName:=[e.g. urban_qual or tunnel_circuit_practice_01]

The above launches the world with a marker, a spotlight, and two camera displays (as shown below); which can be moved to various artifacts.

validator_two_image_displays.png

  1. Open another terminal and run these commands:
      cd ~/subt_ws/

      source ~/subt_ws/install/setup.bash
   
      # Use any of the following commands to iterate the through the artifacts:

      ign service -s /artifact/next --reqtype ignition.msgs.StringMsg --reptype ignition.msgs.StringMsg --timeout 1000 --req 'data: ""'

      ign service -s /artifact/prev --reqtype ignition.msgs.StringMsg --reptype ignition.msgs.StringMsg --timeout 1000 --req 'data: ""'

      ign service -s /artifact/move_to --reqtype ignition.msgs.StringMsg --reptype ignition.msgs.StringMsg --timeout 1000 --req 'data: "phone_3"'

      # Then iterate through artifacts using the /artifact/nex service; which will respond with the artifact name (e.g. data: "backpack_1") that the two cameras
      # are displaying (top-down and at a 45 deg angle).

      ign service -s /artifact/next --reqtype ignition.msgs.StringMsg --reptype ignition.msgs.StringMsg --timeout 1000 --req 'data: ""'
      

If you are running the SubT Simulator inside a docker container, then run these commands to join the container:

      containerid=$(docker ps -aqf ancestor=osrf/subt-virtual-testbed:latest) && echo $containerid

      docker exec --privileged -e DISPLAY=${DISPLAY} -e LINES="`tput lines`" -it ${containerid} bash

      # Once inside the docker container, then run these commands:

      . install/setup.bash

      ign service -s /artifact/scan --reqtype ignition.msgs.StringMsg --reptype ignition.msgs.StringMsg --timeout 1000 --req 'data: ""'

      ign service -s /artifact/next --reqtype ignition.msgs.StringMsg --reptype ignition.msgs.StringMsg --timeout 1000 --req 'data: ""'

found_backpack.png

found_randy.png