Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Changing entity context_type to something else than default "ROBOT" causes communication problems #28

Open
marija185 opened this issue Oct 15, 2019 · 4 comments

Comments

@marija185
Copy link

Hi @Luxxii
Yesterday I changed the entity context_type in config.json as described here:
https://firos.readthedocs.io/en/latest/install/configuration-files.html

My config.json now has the additional line with the parameter "context_type" as:

{
  "environment": "fof_lab",

  "fof_lab": {
  	"context_type": "CentralSP",
  	"server": {
etc...

In OCB now I can see:

"id":"map","type":"CentralSP", etc...

Now, what is interesting is that I can not receive the data from another docker container also using firos because there I have the default type "ROBOT", although I can see the data in a web browser under entities. If I rename the default type of the firos config.json of this other docker container to the same name "CentralSP", then the data are received!

To have more info how OCB looks of this other docker container, it begins with:

"id":"robot_0","type":"CentralSP", ...

The problem is that the type needs to be the same in all the containers that communicate through firos to each other. However, it would be nice if the type does not prevent the communication of different types.

best regards,
Marija

@Luxxii
Copy link

Luxxii commented Oct 15, 2019

Hi @marija185 this behavior is intended. FIROS uses this context_type to distinguish between other FIROS instances to only communicate with the FIROS-instance, which also uses the same context_type.

Note: Multiple FIROS instances (E.g.: 20 or more ) can run simultaneously on only ONE Contextbroker. To avoid Message-Collisions, the type-attribute is "abused" here, so that the FIROS-Instance can cleanly distinguish, which Message it should subscribe/publish on the Context-Broker.

I talked with @DLuensch and @ptrdtznr and we have a solution (#32 ). This needs to be implemented first. Basically, the feature i described above is not used somewhere to our knowledge. So we will omit it and restructure the Appearance of the Entities inside the OCB. This should solve the Problem.

Just allowing custom types is not that easy to implement in FIROS. To subscribe or publish on the ContextBroker, the values: id, type need to be known prior..

best regards,
Dominik

@marija185
Copy link
Author

Hi @Luxxii, thank you for the answer!
By now we will use a default type "ROBOT" since this works!

best regards,
Marija

Luxxii added a commit that referenced this issue Nov 19, 2019
This has something todo with #28

robots.json is now called topics.json (since we subscribe/publish on Topics!) #29
In addition to that topics.json is now redesigned. #31

Empty whitelist now does what it should #30

We now have a similar structure as described in #32
@Luxxii
Copy link

Luxxii commented Nov 19, 2019

Hi @marija185 Most of the problems have been tackled inside the Development branch. However, it is currently not finished. The context-type has been removed completely and inside the OCB, the messages are now looking as described in #32 . I will inform you, after we have finished :)

@marija185
Copy link
Author

Hi @Luxxii!
Thank you for informing me! I am happy to test a new version when it will be ready.
:)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants