Reality gap: Experiment 1
The experimental scenario and the experimental procedure of the experiment are described in Chapter 4.1 of my Ph.D. thesis and in:
- G. Podevijn, R. O'Grady, C. Fantini-Hauwel, and M. Dorigo, Investigating the effect of the reality gap on the human psychophysiological state in the context of human-swarm interaction, PeerJ Computer Science, vol. 2, no. e82, 2016. See online, Download PDF
Setting up the experiment
In this section, we describe the steps to install and run the robot controller code of the experiment.
TCP server and client
In this experiment, you will need the TCP server and client. On the
Materials webpage, you will find a
.jar
file for each of them. The .jar
files are the executables used to run
the server and the client. By default, the server listens for new connections
on the port 4321
and the client tries to connect on localhost:4321
. If you
want to change these values (host and port), you will need to download the
source code, make the modifications and recompile the Java classes into a new
.jar
file.
The client is used to allow the experimenter to start the simulation-based experiments via their computer. The robot controllers (in ARGoS and in Virtual Reality) connect to the server and wait for a "message" to start. The client is executed from the experimenter's computer and asks the experimenter which experiment to start (ARGoS or Virtual Reality). The client sends to the server which experiment the experimenter has chosen and the server forward this message to the robot controllers connected to the server. The experiment conducted with the real robots does not require the server and the client. It is started manually by the experimenter (i.e., the experimenter is connected to each robot via ssh and starts the robots' controller by executing the robot controller binary, see Run the controller on the real robots ).
In simulation -- ARGoS
Download the robot controller
Make sure that ARGoS3 and that the ARGoS3-Epuck plugin are correctly installed and then go to the Materials webpage to download the robot controller for ARGoS.
Compile and run the controller
Once you have downloaded the archive containing the controller code, uncompress it and go into the epuck_reality_gap1
directory.
>> tar xvzf RealityGap_exp1.tar.gz
>> cd epuck_reality_gap1/
In this directory, you will find two files and a directory:
CMakeLists.txt
: used to find multiple CMake configuration files for ARGoS. You won't need to edit this file.reality_gap1.argos
: the controller XML configuration file. The simulated environment and the simulated robots are configured in the<arena>
tag. The calibration files of the real robots' sensors are referred in thelow_level_config
attribute of each sensor's tag. You can leave this attribute as is if you run the controller in simulation.src
: a directory with the source code of the controller.
Compile the controller by executing the following steps:
>> mkdir build
>> cd build
>> cmake ..
>> make
Go to the directory in which you downloaded the Java TCP server and run it:
>> java -jar PsychoExperimentTCPServer.jar
Go to the directory in which you downloaded the Java TCP client and run it:
>> java -jar RealityGapExperiment1Client.jar
Press 'a' to start ARGoS experiment and 'v' to start the 'virtual reality' experiment:
Run the controller in ARGoS:
>> argos3 -c reality_gap1.argos
If everything went well, you should see the following screen:
Start the experiment in ARGoS (by clicking the Play
button, not shown in the
above picture). At this point the robot are not moving. The robots will start
moving when you will start the experiment from the TCP client.
In the Java TCP client, press a
to start the experiment. The robots are now
moving in the environment for 60 seconds.
In simulation -- Android
Download the Android application
Go to the Materials webpage and download the source code of the application.
Compile and run the application
Firstly, download and install Unity3D. Do not forget to install the "Android building packages" while you are installing Unity3D. Then, extract the source code of the application:
tar xvzf VRRealityGapExperiment1.tar.gz
Open Unity3D and open a new project. Select the directory that contains the
source code of the application (UnityRealityGapExperiment1
). Unity3D will
import the project.
Once the project is imported, open the scene (File > Open scene
)
Assets/_Scenes/experimentScene.unity
. In the Project
tab of Unity3D, go in
the directory Scripts
and double click on the file TCPConnection.cs
.
Edit the following function with the IP address on which the Java TCP server is running:
void Start {
Debug.Log(tcpClient.Connect("10.0.0.99", 4321));
}
Connect your Android device to your computer. In Unity3D, build the application
for Android. In File > Build Settings
, select "Android" and click Build and
Run
. After a few minutes, the application should be installed on your Android
device.
Go to the directory in which you downloaded the Java TCP server and run it:
>> java -jar PsychoExperimentTCPServer.jar
Go to the directory in which you downloaded the Java TCP client and run it:
>> java -jar RealityGapExperiment1Client.jar
Press 'a' to start ARGoS experiment and 'v' to start the 'virtual reality' experiment:
Start the application on your Android device. If everything went well, you should see the following when you run the application on your device:
Once the application is launched, insert your device in a virtual reality headset (e.g., the Google Cardboard).
In the Java TCP client, press v
to start the experiment. The robots are now
moving in the environment during 60 seconds. Do not forget to keep on the
foreground the terminal in which you started the TCP client.
On real robots
The robot controller is the same as the one used in simulation (ARGoS).
Compile the controller for the real robots
Make sure that the ARGoS-Epuck plugin is correctly installed for the real robots.
In the controller directory, edit the file src/CMakefile.txt
at line 13 (add
the correct path to the argos3-epuck
plugin directory):
PATH_TO_ARGOS3_EPUCK_PLUGIN/src/plugins/robots/e-puck/real_robot/real_epuck_main.cpp)
Compile the controller by executing the following steps:
>> mkdir build_realepuck
>> cd build_realepuck
>> cmake -DCMAKE_BUILD_STYLE=Release -DCMAKE_TOOLCHAIN_FILE=PATH_TO_ARGOS3_EPUCK_PLUGIN/src/cmake/TargetEPuck.cmake ..
>> make
Do not forget to edit the path to the argos3-epuck
plugin directory as above.
Run the controller on the real robots
Install the controller and its configuration file (the XML file) on the robots:
>> cd argos3-epuck/scripts
>> ./upload.sh file PATH_TO_REALITY_GAP1_CONTROLLER/build_realepuck/src/reality_gap1 /destination/path/on/robot/ XX
>> ./upload.sh file PATH_TO_REALITY_GAP1_CONTROLLER/reality_gap1.argos /destination/path/on/robot/ XX
where XX
corresponds to the identification number of an e-uck.
Go to the directory in which you downloaded the Java TCP server and run it:
>> java -jar PsychoExperimentTCPServer.jar
Go to the directory in which you downloaded the Java TCP client and run it:
>> java -jar RealityGapExperiment1Client.jar
Press 'a' to start ARGoS experiment and 'v' to start the 'virtual reality' experiment:
In order to run your controller on an e-puck robot, first connect to the e-puck robot:
>> ssh root@10.0.1.XX
where XX
is the identification number of an e-puck. The password is root
.
Run the controller by writing:
>> ./reality_gap1 -c reality_gap2.argos -i rg1
If everything went well, the e-puck robot should start executing the controller.
Note
In general, you want the robot controller of all your robots to start at (approximately) the same time. Therefore, you will have to connect to all the robots from different terminals and execute the above command at the same time. In order to do so, we strongly suggest to use the software Terminator. Terminator allows you to use multiple terminals simultaneously and to synchronyse different terminals (i.e., if you execute a command in a terminal, the same command is executed in the other synchronised terminals).
Data analysis
In this section, we provide the data of our experiments and the R and Python scripts used to analyse and plot the data.
Data
The following archive contains a text file for each type of data (heart rate, skin conductance, arousal, valence).
Scripts
- Boxplots: R scripts that generate the boxplots
- Friedman/Nemenyi: R scripts that execute the Friedman and Nemenyi post-hoc tests
- Nemenyi CD Diagram: Python script that generates the Nemenyi critical difference diagrams. The script requires the Python library Orange.
- Correlation: R scripts that execute the correlation tests