Merge pull request #1396 from carla-simulator/fix/localPlanner
Fix cleanup local_planner when used by other modules
This commit is contained in:
commit
5bbb705f99
|
@ -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
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue