angelomorgado / CARLA-GymDrive

Autonomous driving episode generation for the Carla simulator in a gym environment. This framework makes it easy to create driving scenarios to train/test the agent.
MIT License
17 stars 7 forks source link

Not re-applying settings when changing world object #4

Closed the-big-bad-wolf closed 1 month ago

the-big-bad-wolf commented 1 month ago

I was in the process of trying to enable no-rendering mode when I noticed that as far as I can see, settings are not re-applied when loading a new map. I haven't tested it, but it seems to me that when you change map, the Carla server will run async even if you set synchronous_mode=True for the CarlaEnv object because default settings will be applied when Carla loads a new map.

What I did to fix it was to re-apply the no-rendering mode after loading the map in set_active_map() in the map_control class.

angelomorgado commented 1 month ago

I see? I only tested the no-rendering mode once so it's possible that, indeed, it might have such problems. However in the normal mode the settings stay consistent. But thanks for the feedback! I'll issue a fix as soon as possible.

angelomorgado commented 1 month ago

Fixed!