Skip to content

EmodiedEntity init is called before successful place #206

Description

@dcat52

When placing agents (EmbodiedEntities) is it reasonable to restructure the code so that things happen in the following order:

  1. Entity initiated (to be able to have object shape)
  2. Entity attempted to be placed
  3. Collision Check (to see if the place is valid)
  4. If collision exists, remove entity and return to step 1.
  5. Execute Entity init function.

Currently, steps 1-4 exist in that order but step 5 occurs as a part of step 1.

Benefits of this:

  • Logging statements within the init function do not output for agents that were removed (Ex: when logging the agent IDs, it looks like multiple agents with the same IDs are created).
  • Actions agents perform in init that interact with nearby agents do not occur and then the agent is removed (Ex: transmitting data in the init as if the agents had been nearby for some time [TBD if transmitted messages in init are queued for the first step]).

Negative effects of this:

  • Agents with actuators that affect the dimensions of the entity are actuated prior to collision check (Ex. agent defaults to arm extended based on initial location, this would be good for collision checks [TBD if this entity movements affect collision checks]).

Other considerations of this:

  • Perhaps a configurationInit would fix the cons and then the later general init would solve this. This would potentially break existing experiments using this logic.
  • If the 2nd comment in the pros occurs, that should be considered a bug. But that could probably be fixed separately too.
  • If the 2nd comment in the pros doesn't occur or is fixed, documentation of this ordering may be sufficient of a solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions