Code for the paper "Surrogate Assisted Generation of Human-Robot Interaction Scenarios".
qd/
: Code for QD search.src/
: Code for simulating the scenarios.scripts/
: Bash scripts for running experiments.
- Install singularity.
- Create the openrave container:
sudo singularity build openrave_container.sif openrave_container.def
. See openrave_container_README.md for more details about the container and potential issues.
- When opening singularity shell or running commands in the container, set
SINGULARITYENV_DISPLAY=$DISPLAY
to allow GUI apps to work. Since X11 and local monitor use different environment variables, this needs to be set during execution time. - Use option
--bind <path_to_this_repo>/src:/usr/project/catkin/src
when opening singularity shell or running commands in the container. Otherwise, singularity's python will continue to import the original python files included during the build.
Note, you might require multiple singularity shells for this step. In the first shell,
run roscore
.
Run the python script in the second shell as described in the subsections below.
In the third shell, run rosrun rviz rviz
.
In the rviz window, add MarkerArray
with Marker Topic
visualization_marker_array
and InteractiveMarkers
with Update Topic
/openrave/update
.
Commands to run the python script:
cd src/simple_environment/src/simple_environment
python scenario_generators/scenario_generator.py
In the rviz window, the robot should move towards a goal.
Commands to run the python script:
cd src/simple_environment/src/simple_environment
python scenario_generators/collab_scenario_generator.py
In the rviz window, the human hand (visualized using a sphere) should move towards a goal and the robot arm should move towards a different goal.
In this setup, we connect the QD code in this directory with the simulation code running on OpenRAVE. The simulation code is turned into a Python 2 Flask server which handles requests for OpenRave evaluations while this code uses pyribs on Python 3 and queries the server for evaluations.
Note that we assume Python 2.7.12, as that is what the machine uses.
Install the additional requirements:
pip install -r requirements_networking.txt
In one terminal, run:
roscore
In another, start the server with:
cd src/simple_environment/src/simple_environment
python search/server.py -c SERVER_CONFIG
Replace SERVER_CONFIG
with search/config/experiment/experiment.tml
for shared control
teleoperation experiments or with search/config/experiment/experiment_collab.tml
for shared workspace collaboration.
See qd/README.md
This code is released under the MIT License. Some packages in src/
have a
BSD-3 license.