Merge pull request #1396 from carla-simulator/fix/localPlanner

Fix cleanup local_planner when used by other modules
This commit is contained in:
germanros1987 2019-03-16 19:32:06 -07:00 committed by GitHub
commit 5bbb705f99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -6,6 +6,7 @@
* Added `id` property to waypoints, uniquely identifying waypoints up to half centimetre precision
* Added OpenDrive's road offset `s` as property to waypoints
* Fixed python client DLL error on Windows
* Fixed cleanup of local_planner when used by other modules
## CARLA 0.9.4

View File

@ -79,9 +79,15 @@ class LocalPlanner(object):
self.init_controller(opt_dict)
def __del__(self):
self._vehicle.destroy()
if self._vehicle:
self._vehicle.destroy()
print("Destroying ego-vehicle!")
def reset_vehicle(self):
self._vehicle = None
print("Resetting ego-vehicle!")
def init_controller(self, opt_dict):
"""
Controller initialization.