AAGRIP

De Neurethic
Aller à la navigation Aller à la recherche

AAGRIP

Erreur lors de la création de la vignette : Fichier manquant
May the gripforce be with you

Evaluate Attributed Agency through GRIP Force.

Sense of Agency is the sense of control of our own actions.

Attributed Agency is the sense of control of actions performed by another person.

Grip Force is the evaluated by the pressure in Newton applied on a small sensor held in hands.

Music

In order to study attributed agency in digital interactions, we use electronic music materials. Electronic music gives us the possibility to easily modify the relationship between the action and her consequences.

Robot

We also study attributed agency in digital interactions with robots. For that, we use some videos of a robot speaking.

Baseline

Materials or Hardware

Acquisition Cards

NI acquisition cards -> drivers only available on Windows and not on Linux

Screen

Check the refresh rate of the screen used. The refresh rate may be less than advertised if you don't use a display port cable.

Operating systems usually have a software permanently running to handle the display of the screen. This software can disturb experiment framework to ensure the vertical synchronisation of the screen. On Windows, this software, the Desktop Windows Manager (DWM), prevent the Psychtoolbox to guarantee the constant vertical frame rate of the screen.

F/T Sensors

Power supply of the computer affects the quality of the signal collected with f/t sensors

Arduino

Troubleshootings

Software

Experiment frameworks

Framework available to build experiment : Psychopy, Psychtoolbox, OpenSesame

Psychopy and OpenSesame rely on Python unlike Psychtoolbox which relies on Matlab.

We chose Psychopy for our project because the package already offers some interesting functionalities such as stimuli pre-loading, interval between frames recording, time blocked until the screen is fully displayed, ... Besides, as it relies on Python, it's easier to custom our script to add hardware and/or LSL trigger.

Stimuli pre-loading is handled with the static component in the builder interface of psychopy and it allows us to avoid the delay between the start of the trial and the launch of the stimulus which will depends on the kind and the size of the stimuls.

Psychopy experiment can be launched by command line if you execute the python file in the psychopy installation folder. Create a python virtual environment with the psychoy package doesn't seems to work to launch experiment in it.

Psychopy have 4 different back-ends to handle video files : ffpyplayer, moviepy, opencv, vlc

  • ffpyplayer : bug if there is no sound file or if it's corrupted
  • moviepy : lot of errors
  • opencv : works even without audio file but if we use the static component to preload the video, the audio part launchs briefly at the preload time.
  • vlc : error during the initialisation, it may need additionnal package

(Psychopy seems to keep a lot of things in RAM when you run an experiment multiple times so it may be better to restart it regularly)

You can create your experiment from the builder and generate the python file associated after this. If you want to edit this file to add code not supported by the builder, keep in mind that every time you refresh the python file from the builder, it will erase the modifications made in the file.

Loop element in the builder is transcribed in TrialHandler object in code (you won't find any doc on loop element but you can seek for TrialHandler to know more about options and properties).

It's possible to retrieve the frame index of a movie component which is playing. It may not be useful to detect frame drop because it will always give an answer so it may be a parallel processus which look the frame index at a specific interval.

LSL

The lab streaming layer (LSL) is a system for the unified collection of measurement time series in research experiments that handles both the networking, time-synchronization, (near-) real-time access as well as optionally the centralized collection, viewing and disk recording of the data.

The core library liblsl is supported on many languages : C, C++, Python, Matlab, C#, Java. We used Python interface with pylsl library.

You can find explanations and examples on their github for this library.

Discoveries

If you use the resolve_stream() function to find your stream, the script will wait until it finds a stream corresponding to your research. It's better to use resolve_byprop() which gives us more flexibility and we can specify the amount of time the script should wait until finding a stream or the number of streams we are looking for. You also have the possibility to fetch all the streams available in an array with resolve_streams()

Documentation recommends to seek streams by type but you can also look by name or source_id which can be more useful when you are working with multiple streams.

You can do multiple streams in the same script from a single computer but you can't stream and retrieve data in the same script, you will get an error of multicasting.

By default, when you create the object to retrieve data from a stream (StreamInlet), this is made with some interesting arguments. One of these is recover which is True by default and this means it will try to reconnect to the stream when connexion broke off. This is useful to prevent lost data with connexion problems but the script will freeze until it reconnects to the stream. If you cut intentionally a stream of data while a script was still listening, the listener will freeze. You can prevent this by putting False to the recover parameter at the creation of the StreamInlet or by using the close_stream() function on the listener before the connexion to the stream broke off (documentation says that this function will drop the data in transmission or in the buffer).

Troubleshootings

<ref>Une référence [1] </ref> <references />