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

Bypassing Sensor/Autonomy/Controller/Motion model system #370

Open
flaviut opened this issue Sep 25, 2019 · 1 comment
Open

Bypassing Sensor/Autonomy/Controller/Motion model system #370

flaviut opened this issue Sep 25, 2019 · 1 comment

Comments

@flaviut
Copy link
Contributor

flaviut commented Sep 25, 2019

I'm trying to add DIS (basically a standardized, networked way of saying "there's an entity here") support to Scrimmage, which basically means that I need to replace the red circled part with something custom:
plugin-order

The goal is to both send outgoing DIS messages for entities being simulated by Scrimmage, and also to accept DIS messages from other simulations and make those entities visible in Scrimmage.

Anyway, I'm looking to get some suggestions on how to do that. Right now, I'm looking at placing a function call after run_sensors(), and reading & writing to this->ents_. I'd use Entity.properties() to discriminate between the DIS entities and local entities.

Would this be a reasonable approach?

Fyi this work will be done internally at https://git.elsys.gtri.org/projects/DISSCRIMM, but I see no reason this discussion shouldn't be public so that others may benefit from it.

@SyllogismRXS
Copy link
Contributor

SyllogismRXS commented Oct 31, 2019

Instead of bypassing the Sensor, autonomy, controller, and motion model plugins, which would result in the loss of the functionality in some plugins, I would recommend that you create a DISReader that is implemented as a Entity interaction plugin that receives DIS messages from external systems and generates those entities in the scrimmage environment. Also, each entity that is fully controlled by the scrimmage environment should instantiate a DISWriter (autonomy) plugin that constructs the DIS message for its own state and sends it to the external DIS processes. While the DISWriter is an autonomy plugin, it doesn't perform any decision making for the entity, it just reports the state information to other DIS processes. This is possible within scrimmage because entities can use multiple autonomy plugins.

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

2 participants