exp_manager_test: Data Recorder can not refresh when initializing after stopping all modules from the experiment manager
Summary
On the experiment_manager branch:
The Data Recorder can not refresh when re-initializing the Data Recorder module after stopping all modules from the experiment manager. This is not a minimal working example but I don't have time to find one at this moment.
Steps to reproduce
Pre-process:
- Start/Play Carla in ‘Standalone Game’ mode
- Start JOAN and load experiment
Experiment:
1. Carla Interface: Connect and initialize
2. Experiment Manager: Select and activate first condition, Initialize all modules
Note: my experiment manager uses the Hardware manager, Steering Wheel controller manager, and Data Recorder. None of these have a default_settings.json file saved. They do have their settings saved via the experiment manager as an experiment condition.
3. Hardware Manager: Turn on SensoDrive
4. Carla Interface: Add and set up agent (or load settings), Spawn agent, Start
5. Experiment Manager: Start all
6. Carla Interface - EgoVehicle 1 settings: Check ‘Cruise Control’ and ‘Save’
End of trial:
7. Experiment Manager: Stop all (‘Auto transition after stop’ should be checked)
8. Carla Interface: Stop and destroy agent
Second/ consecutive trials:
9. Experiment Manager: Initialize all
OR
9. Data Recorder: Initialize
What is the current bug behavior?
Modules do not re-initialize for next trial
What is the expected correct behavior?
Modules, specifically DataRecorder, should re-initialize for next trial
Relevant logs and/or screenshots
Traceback (most recent call last):
File "C...\core\joanmoduledialog.py", line 84, in _button_initialize_clicked
self.module_action.initialize()
File "...\modules\datarecorder\action\datarecorderaction.py", line 112, in initialize
self.settings.refresh(self.settings.as_dict().get(str(JOANModules.DATA_RECORDER)).get('variables_to_save'))
File "...\modules\datarecorder\action\datarecordersettings.py", line 83, in refresh
self._set_new_entries_checked(self.variables_to_save, self.existing_variables_to_save)
File "...\modules\datarecorder\action\datarecordersettings.py", line 49, in _set_new_entries_checked
self._set_new_entries_checked(element.get(key), variables_element.get(key))
File "...\modules\datarecorder\action\datarecordersettings.py", line 49, in _set_new_entries_checked
self._set_new_entries_checked(element.get(key), variables_element.get(key))
File "...\modules\datarecorder\action\datarecordersettings.py", line 49, in _set_new_entries_checked
self._set_new_entries_checked(element.get(key), variables_element.get(key))
AttributeError: 'bool' object has no attribute 'get'
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)