« AAGRIP » : différence entre les versions

De Neurethic
Aller à la navigation Aller à la recherche
Add links and correct spelling
Correct gallicisms
 
Ligne 8 : Ligne 8 :
Attributed Agency is the sense of control of actions performed by another person.
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.
Grip Force is the evaluated pressure in Newton applied on a small sensor held in hands.


=== Music ===
=== Music ===


In order to study attributed agency in digital interactions, we use electronic music materials.  
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.  
Electronic music gives us the possibility to easily modify the relationship between the action and its consequences.  


=== Robot ===
=== Robot ===
Ligne 30 : Ligne 30 :
Check the refresh rate of the screen used. The refresh rate may be less than advertised if a display port cable is not used.
Check the refresh rate of the screen used. The refresh rate may be less than advertised if a display port cable is not used.


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 synchronization 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.
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 synchronization of the screen. On Windows, this software, the Desktop Windows Manager (DWM), prevents the Psychtoolbox to guarantee the constant vertical frame rate of the screen.


=== F/T Sensors ===
=== F/T Sensors ===


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


=== Arduino ===
=== Arduino ===
Ligne 43 : Ligne 43 :


=== Experiment frameworks ===
=== Experiment frameworks ===
Framework available to build experiment : [[PsychoPy|Psychopy]], Psychtoolbox, OpenSesame
Framework available to build experiment : [[PsychoPy]], Psychtoolbox, OpenSesame


[[PsychoPy|Psychopy]] and OpenSesame rely on Python unlike Psychtoolbox which relies on Matlab.
[[PsychoPy]] and OpenSesame rely on Python, unlike Psychtoolbox which relies on Matlab.


We chose [[PsychoPy|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 [[Lab Streaming Layer|LSL]] trigger.
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 [[Lab Streaming Layer|LSL]] trigger.


Stimuli pre-loading is handled with the static component in the builder interface of [[PsychoPy|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 stimulus.
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 depend on the kind and the size of the stimulus.


[[PsychoPy|Psychopy]] experiment can be launched by command line if you execute the python file in the [[PsychoPy|psychopy]] installation folder. Create a python virtual environment with the [[PsychoPy|Psychopy]] package doesn't seems to work to launch experiment in it.
[[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 [[PsychoPy]] package doesn't seems to work to launch experiment in it.


[[PsychoPy|Psychopy]] have 4 different back-ends to handle video files : ffpyplayer, moviepy, opencv, vlc
[[PsychoPy]] has 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
*ffpyplayer : bug if there is no sound file or if it's corrupted
Ligne 59 : Ligne 59 :
*moviepy : a lot of errors
*moviepy : a 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.
*opencv : works even without audio file but if we use the static component to preload the video, the audio part launches briefly at the preload time.


*vlc : error during the initialization, it may need additional packages
*vlc : error during the initialization, it may need additional packages


([[PsychoPy|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)
([[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|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.
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).
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.
It's possible to retrieve the frame index of a playing movie component. It may not be useful to detect frame drop because it will always give an answer so it may be a parallel process which looks at the frame index at a specific interval.


=== LSL ===
=== LSL ===
Ligne 84 : Ligne 84 :
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.
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.
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 multi-casting.


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 connection broke off. This is useful to prevent lost data with connection 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 connection to the stream broke off (''documentation says that this function will drop the data in transmission or in the buffer'').
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 connection broke off. This is useful to prevent lost data with connection 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 connection 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 [https://fr.wikipedia.org/w/index.php?title=Pierre-Eudoxe_Dubalen&veaction=edit] </ref>
<references />

Dernière version du 23 mars 2026 à 13:55

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 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 its 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 a display port cable is not used.

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 synchronization of the screen. On Windows, this software, the Desktop Windows Manager (DWM), prevents 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

Troubleshooting

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 depend on the kind and the size of the stimulus.

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 PsychoPy package doesn't seems to work to launch experiment in it.

PsychoPy has 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 : a lot of errors
  • opencv : works even without audio file but if we use the static component to preload the video, the audio part launches briefly at the preload time.
  • vlc : error during the initialization, it may need additional packages

(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 playing movie component. It may not be useful to detect frame drop because it will always give an answer so it may be a parallel process which looks at 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 multi-casting.

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 connection broke off. This is useful to prevent lost data with connection 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 connection to the stream broke off (documentation says that this function will drop the data in transmission or in the buffer).