You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/home/scenario_runner-0.9.15/srunner/scenariomanager/actorcontrols/actor_control.py", line 95, in init
self.control_instance = getattr(module_control, control_class_name)(actor, args)
AttributeError: module 'carla_autopilot' has no attribute 'CarlaAutopilot'
module 'carla_autopilot' has no attribute 'CarlaAutopilot'
Destroying ego vehicle 215
I found the issue that the value inputted needs to align with the name of the class being used to be imported.
for auto pilot control of the vehicle there is a class name carla_autopilot.py with the Class as CarlaAutoPilotControl
The following logic inside the actor_control.py control_class_name = control_py_module.split('.')[-1].title().replace('_', '')
loads the class name as CarlaAutopilot ((Take a note of the P in Pilot is small here) instead of CarlaAutoPilotControl
This causes the following line to import the correct module but unable to find the class self.control_instance = getattr(module_control, control_class_name)(actor, args)
The solution to this would be
Modify the module file name to carla_auto_pilot_control.py
And while adding the value in xosc file use "carla_auto_pilot_control"
OR
Add a the logic inside actor_control.py that will import modules and class independent of the absolute values entered in the xosc files
The text was updated successfully, but these errors were encountered:
Carla 0.9.15
Scenario-runner 0.9.14 and 0.9.15
if I change the following external_control to carla_autopilot as value I get the following error
File "/home/scenario_runner-0.9.15/srunner/scenariomanager/actorcontrols/actor_control.py", line 95, in init
self.control_instance = getattr(module_control, control_class_name)(actor, args)
AttributeError: module 'carla_autopilot' has no attribute 'CarlaAutopilot'
module 'carla_autopilot' has no attribute 'CarlaAutopilot'
Destroying ego vehicle 215
I found the issue that the value inputted needs to align with the name of the class being used to be imported.
for auto pilot control of the vehicle there is a class name carla_autopilot.py with the Class as CarlaAutoPilotControl
The following logic inside the actor_control.py
control_class_name = control_py_module.split('.')[-1].title().replace('_', '')
loads the class name as CarlaAutopilot ((Take a note of the P in Pilot is small here) instead of CarlaAutoPilotControl
This causes the following line to import the correct module but unable to find the class
self.control_instance = getattr(module_control, control_class_name)(actor, args)
The solution to this would be
And while adding the value in xosc file use "carla_auto_pilot_control"
OR
The text was updated successfully, but these errors were encountered: