Python code using Panda3D for modular, combinatorial, and scalable control of all aspects of the virtual reality (VR) geometry. This was achieved through the implementation of a Finite State Machine (FSM) architecture which deploys VR protocols within an experimental data acquisition and trial structure framework. VR protocols are pre-assigned to specific trials within data acquisition sessions, triggering the corresponding FSM requests at desired stages of the experiment. Because progression through the VR depends on fish speed, however, the code base was equipped with functions ensuring proper return to basal conditions of the VR geometry when necessary and, thus, proper transitions between requested states. Arbitrary VR protocols based on existing functionality are flexibly defined by the user through a configuration file without modification of the code base. Additionally, new routines can be easily incorporated into the code base without revisiting the VR control logic. Furthermore, functionality was developed to allow for VR geometry rearrangements to take place in the experiment before the animal perceives the virtual world. Thus, a single VR geometry model can be used to generate a variety of virtual worlds. Importantly, the code base also implements functionality to record all relevant VR events unfolding during the course of an experiment, generating a detailed log for subsequent data analysis. Finally, the code base offers the possibility to switch between LabVIEW and keyboard inputs for updating the virtual scene.
fmi-basel/DynCogRep-VR
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|