Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'snapToGroundDefault' #269

Open
3 tasks done
abol-karimi opened this issue May 21, 2024 · 1 comment
Open
3 tasks done

KeyError: 'snapToGroundDefault' #269

abol-karimi opened this issue May 21, 2024 · 1 comment
Labels
status: needs more info Requesting more info type: bug Something isn't working

Comments

@abol-karimi
Copy link

System Details

  1. Python version: 3.8.0
  2. Scenic version: main branch on 05-20-2024
  3. Platform: docker://nvidia/vulkan:1.1.121-cuda-10.1--ubuntu18.04
  4. Simulator Version: CARLA dev branch on 04-29-2024

Detailed Description

  1. Scenic has a bug
  2. scenic.scenarioFromFile(..., mode2D=True)
  3. Error log:
  File "/home/scenariogen/Scenic/src/scenic/syntax/translator.py", line 142, in scenarioFromFile
    return _scenarioFromStream(
  File "/home/scenariogen/Scenic/src/scenic/syntax/translator.py", line 177, in _scenarioFromStream
    return constructScenarioFrom(namespace, scenario)
  File "/home/scenariogen/Scenic/src/scenic/syntax/translator.py", line 683, in constructScenarioFrom
    dynScenario._prepare(delayPreconditionCheck=True)
  File "/home/scenariogen/Scenic/src/scenic/core/dynamics/scenarios.py", line 162, in _prepare
    self._setup(None, *self._args, **self._kwargs)
  File "/home/scenariogen/ScenarioGeneration/src/scenariogen/simulators/carla/SUT.scenic", line 38, in _setup
    if config['ego-module']:
  File "/home/scenariogen/Scenic/src/scenic/syntax/veneer.py", line 665, in new
    return cls._withSpecifiers(specifiers)
  File "/home/scenariogen/Scenic/src/scenic/core/object_types.py", line 240, in _withSpecifiers
    properties, consts = cls._resolveSpecifiers(newspecs)
  File "/home/scenariogen/Scenic/src/scenic/core/object_types.py", line 439, in _resolveSpecifiers
    specifiedValues = spec.getValuesFor(context)
  File "/home/scenariogen/Scenic/src/scenic/core/specifiers.py", line 55, in getValuesFor
    val = valueInContext(self.value, obj)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 226, in valueInContext
    return value.evaluateIn(context)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 57, in evaluateIn
    value = self.evaluateInner(context)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 131, in evaluateInner
    return self.value(context)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 218, in value
    return func(*subvalues, **kwsubvals)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 216, in <genexpr>
    subvalues = (valueInContext(arg, context) for arg in args)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 226, in valueInContext
    return value.evaluateIn(context)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 57, in evaluateIn
    value = self.evaluateInner(context)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 131, in evaluateInner
    return self.value(context)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 218, in value
    return func(*subvalues, **kwsubvals)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 216, in <genexpr>
    subvalues = (valueInContext(arg, context) for arg in args)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 226, in valueInContext
    return value.evaluateIn(context)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 57, in evaluateIn
    value = self.evaluateInner(context)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 131, in evaluateInner
    return self.value(context)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 218, in value
    return func(*subvalues, **kwsubvals)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 216, in <genexpr>
    subvalues = (valueInContext(arg, context) for arg in args)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 226, in valueInContext
    return value.evaluateIn(context)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 57, in evaluateIn
    value = self.evaluateInner(context)
  File "/home/scenariogen/Scenic/src/scenic/core/lazy_eval.py", line 131, in evaluateInner
    return self.value(context)
  File "/home/scenariogen/Scenic/src/scenic/simulators/carla/model.scenic", line 132, in <lambda>
    snapToGround: globalParameters.snapToGroundDefault
  File "/home/scenariogen/Scenic/src/scenic/syntax/veneer.py", line 983, in __getattr__
    return self.__getitem__(name)  # allow namedtuple-like access
  File "/home/scenariogen/Scenic/src/scenic/syntax/veneer.py", line 974, in __getitem__
    return self._internal_map[name]
KeyError: 'snapToGroundDefault'

Steps To Reproduce

Contact me on Scenic's slack for reproducing the error.

Issue Submission Checklist

  • I am reporting an issue, not asking a question
  • I checked the open and closed issues, forum, etc. and have not found any solution
  • I have provided all necessary code, etc. to reproduce the issue
@abol-karimi abol-karimi added status: triage Issue needs to be assessed type: bug Something isn't working labels May 21, 2024
@Eric-Vin
Copy link
Collaborator

Thanks for the report Abel! Whenever you get the chance, could you provide some info to reproduce this? It doesn't appear to be happening with some small examples on my machine.

@Eric-Vin Eric-Vin added status: needs more info Requesting more info and removed status: triage Issue needs to be assessed labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs more info Requesting more info type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants