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

Problem with project migration to new API #3047

Closed
den-gr opened this issue Jan 13, 2024 · 1 comment
Closed

Problem with project migration to new API #3047

den-gr opened this issue Jan 13, 2024 · 1 comment

Comments

@den-gr
Copy link
Contributor

den-gr commented Jan 13, 2024

I try to migrate some parts of https://github.com/fedpet/Experiment-2019-Smartcam project to current Alchemist API and I get this problem:
Exception in thread "main" java.lang.IllegalArgumentException: Unknown keys [time-distribution, conditions, actions] for the provided JavaType descriptor

Full stacktrace: https://scans.gradle.com/s/h22s5m6qnx7gu

yaml configuration:

incarnation: protelis

variables:
  CameraSpeed: &CameraSpeed
    formula: 3
  EnvironmentSize: &EnvironmentSize
    type: ArbitraryVariable
    parameters: [500]
  FoVAngle: &FoVAngle
    formula: 60
  FoVDistance: &FoVDistance
    formula: 30
  RotationSpeed: &RotationSpeed
    formula: 36

environment:
  type: ContinuousPhysics2DEnvironment
deployments:
  - type: Point
    parameters: [10, 10]
    programs:
      - time-distribution: 2
        type: ChemicalReaction
        actions:
          - type: CameraSee
            parameters: [ *FoVDistance, *FoVAngle, vision ]
          - type: HeadTowardTarget
            parameters: [ heading, *RotationSpeed ]
          - type: MoveToTarget
            parameters: [ destination, *CameraSpeed ]
          - time-distribution: 2
            type: Event
            conditions:
              - type: MoleculeHasConcentration
                parameters: [ doZigZag, true ]
            actions:
              - type: ZigZagMove
                parameters: [ 999999, *CameraSpeed ]
      - time-distribution: 2
        type: Event
        conditions:
          - type: MoleculeHasConcentration
            parameters: [ doSpin, true ]
        actions:
          - type: Spin
            parameters: [ *RotationSpeed ]
      - time-distribution: 1
        program: ff_linpro
      - program: send
@den-gr
Copy link
Contributor Author

den-gr commented Jan 15, 2024

Problem with indentation of:

...
- time-distribution: 2
  type: Event
  conditions:
    - type: MoleculeHasConcentration
      parameters: [ doZigZag, true ]
  actions:
    - type: ZigZagMove
      parameters: [ 999999, *CameraSpeed ]
...

@den-gr den-gr closed this as completed Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant