Skip to content

Implement LView logging deleted entities #46

@kfriedrichs

Description

@kfriedrichs

All _getXXUpdates() functions (e.g., _getObjUpdates()) have no way of
recognizing deleted objects/targets/grippers: they check the received update
and compare to the internally saved last state, then compile a reduced
update out of any entities that differ between update and saved state.

  • Detecting an entity was removed is easy, the _getXXUpdates() functions
    would simply have to check whether some of the entities in the saved state
    are missing in an update.

But the log consists of EXISTING entities with their updated properties.
How to log a no-longer-existing entity?

  • One option would be to introduce a special type of log entry for this.
  • Or every entry could have the 'event' key (the 'registeredLocalEvents'
    already have that) stating the type, like 'update' or 'deletion'.
    For example:
[
    2183, <- timestamp
    {
     "event": "update", <- type of update
     "grippers": {
       "fVHMwdLePCE2Vlq5AAAB": {
         "x": 9.5,
         "y": 10
       }
     }
    }
],
[
   2701,
   {
     "event": "deletion",
     "grippers": {
       "fVHMwdLePCE2Vlq5AAAB": { <- could also be reduced to id of entity
         "x": 9.5,
         "y": 10
       }
     }
   }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions