-
Notifications
You must be signed in to change notification settings - Fork 1
Using the Testbed
The parameters for running an experiment can be configured using the provided user interface. Run the interface by navigating to the top level of the Core Tools repo, and run:
$ python gui.py
In order to configure the experiment, select the desired parameters in both panes, including the robots to be used. Then click 'SAVE' to save the chosen parameters. Make sure the file is named 'config.yaml,' and overwrite the existing config.yaml file in the top level of the Core Tools repo. Then click 'RUN' to begin running the experiment. Proceed to the next section for running the experiment.
In order to change the options available in the config interface, edit the 'enum.yaml' file located in the same directory as 'gui.py'. The interface is generated based on this file. Note: If a new planner is added, in addition to adding the option to use it in the interface, the file 'planner.py' in core/robo_tools must be modified.
There are several options available in the default experiment code that can be changed depending on the experiment. These options can be found and changed in the config.yaml file in the top level of the Core Tools directory.
Choose 'True' to use a robot in the 'robots_to_use' section of the config file to use that robot, or 'False' to not use that robot.
Choose your goal planner type from one of the defaults listed, or your own custom planner. *See the "Custom planners and robots" page for more information on creating custom goal planners and robot types.
Choose the maximum number of update frames for the experiment. An update frame consists of each robot receiving a new action from its goal planner.
Choose the type of robot each robot will be. *See the "Custom planners and robots" page for more information on creating custom goal planners and robot types.
Choose the source of pose information for the robots, i.e position and orientation data. For experiments using a camera system this will be the default 'tf' (for the 'transform' data published over ROS by a VICON camera system).
In order to run an experiment, start the interface. Alternatively, navigate to the Core Tools folder and run the startup shell script. This will use the parameters currently saved in 'config.yaml'
$ ./run.sh
You will be prompted to pick the main experiment script (default is "main_tester.py"), and choose if you want a new map generated. You will then be prompted to connect to the robots you will be using. The script will automatically initiate connections to the robots specified in run.sh, but additional robots can be connected using ssh.
Once all robots have been connected, and the vicon_nav.launch file run on each, you will be prompted to run the main experiment code.
NOTE Currently creating a new map requires the map.py file in the map_tools directory of the Cops and Robots repository
There is a provided interface for making observations for the current POMDP experiment. This interface allows a user, when prompted, to make an observation about the position of a robber robot relative to a cop robot, and will display the belief of the cop robot (in development). Run the interface by navigating to core_tools/observation_interface/src and running
$ python observation_interface_GUI.py
Under the hood, the interface is a ROS service using a custom message type. The interface itself is written using PyQt5. In order to modify the observations sent, the service response and request message types must be modified. These are found in core_tools/observation_interface/msg.