DynamicObjectCrossing scenario uses incorrect filter for Walker blueprints
See original GitHub issueDescription
DynamicObjectCrossing._spawn_adversary()
uses the following line to randomly select and spawn a “walker” actor:
walker = CarlaActorPool.request_new_actor('walker*', transform)
This filter ('walker*'
) inadvertently allows the (newly added?) 'controller.ai.walker'
actor type to be selected (randomly), which doesn’t expose the same API as a vehicle or walker, and leads to a crash when the HandBrakeVehicle
behavior is executed in the scenario’s behavior tree.
To Reproduce
- Setup to run Carla server version 0.9.6 with matching client installed/available on Python path.
- Clone the
scenario_runner
repo and checkout tagv0.9.6
(and make sure it is available on Python path). - Run the
DynamicObjectCrossing
scenario multiple times. - Eventually, you should hit an error like the following:
...
File "scenario_runner/srunner/scenariomanager/atomic_scenario_behavior.py", line 1180, in update
self._vehicle.apply_control(self._control)
AttributeError: 'WalkerAIController' object has no attribute 'apply_control'
During handling of the above exception, another exception occurred:
...
File "scenario_runner/srunner/scenariomanager/atomic_scenario_behavior.py", line 563, in terminate
self._control.throttle = 0.0
AttributeError: 'NoneType' object has no attribute 'throttle'
NOTE: Since this error is triggered at random, you may have to run the scenario a bunch of times to actually trigger the error. An alternate way is to simply query the blueprint library with the same filter ('walker*'
), and you will notice ('controller.ai.walker'
) included as one of the blueprints.
Expected behavior Scenario should execute without errors every time.
Platform
- OS: Ubuntu 16.04
- CARLA version: 0.9.6
- Python version: 3.5.2
- Version: 0.9.6
Solution
A simple solution that effectively solves this is to change the filter from 'walker*'
to 'walker.*'
:
walker = CarlaActorPool.request_new_actor('walker.*', transform)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Thank you for this amazingly described report. I’ll fix this with the next PR.
Hi, we started having internal discussions as well on this topic. For now however, the master branch shows always the most recent version designed to work with the latest CARLA (release). If you have some relevant changes, you might consider bringing it back to github via a pull request. Otherwise, you need to cherry-pick your changes (or the fixes you would like to have from github).
Reasons for the changes are to have a better architecture and organization for the next CARLA challenge iteration, and new OpenSCENARIO features 😃