JdeRobot / BehaviorMetrics

Autonomous driving neural network comparison tool
https://jderobot.github.io/BehaviorMetrics/
GNU General Public License v3.0
56 stars 49 forks source link

Fixing the load and reload button #675

Open ArthurWANGZHE opened 6 months ago

ArthurWANGZHE commented 6 months ago

I fond that the load and reload buttons in the ui intereface are currently not working. I plan to fix this issue

sergiopaniego commented 6 months ago

I've assigned this issue to you and updated the label. To give you more context, these buttons work when the simulator is Gazebo since that was the primary simulator at the beginning of this project. It is no longer the primary simulator and we do the majority of development using CARLA since it is the standard simulator for autonomous driving. The functionality for each of these buttons is slightly different so if you fix any of them you may generate the PR for that specific one. Reload -> Restore all the components in the simulation. The optimal way would be to restore the positions of each element without reloading the simulator completely. Load -> For this case, we need to reload the simulator client completely.

ArthurWANGZHE commented 6 months ago

Hi! I have made some progress. Now I can reload swicth the brain between "brain_deep_learning" and "brain_slow_and_turn" using reload button. However, I have encountered some trouble while trying to reload other brains. The errors are as follows:

20: Reloading brain... /home/arthur/BehaviorMetrics/behavior_metrics/brains/CARLA/brain_carla_segmentation_based_imitation_learning.py
Waiting for vehicle with role_name 'ego_vehicle'
Waiting for vehicle with role_name 'ego_vehicle'

20: Reloading brain... /home/arthur/BehaviorMetrics/behavior_metrics/brains/CARLA/brain_carla_autopilot.py
Brain could not be loaded!
vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)