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

NodeStatus not received when custom DSDLs are loaded. #27

Open
dernatsch opened this issue Aug 31, 2022 · 2 comments
Open

NodeStatus not received when custom DSDLs are loaded. #27

dernatsch opened this issue Aug 31, 2022 · 2 comments

Comments

@dernatsch
Copy link

dernatsch commented Aug 31, 2022

When loading custom DSDL files in the startup dialog the NodeStatus monitor stops working. This is also true for an empty DSDL directory.

My analysis:
After specifying a folder for custom DSDLs the method load_dsdl is called a second time and it replaces the contents of the DATATYPES dict. Because the datatype objects contain closures they are generated anew. The problem arises when a new frame is received and the frames datatype and the NodeStatus datatype are compared. It seems the NodeStatus datatype used in the comparison originates from the first load of the DSDL files and the datatype of the received frame orinates from the DATATYPES dict. Because of the closures this comparison returns False even if both messages have the NodeStatus type.
There are multiple approaches to this problem that I can think of:

  • Not overwriting the contents of the DATATYPES dict when it already loaded a definition.
  • Basing the comparison of datatypes on the signature instead of the comparison of the python objects.
    Pseudo:
def __eq__(self, other):
    self.signature() == other.signature()
@dtran11
Copy link

dtran11 commented Oct 15, 2022

I see the same issue. Is this a problem with dronecan module or this gui project?

@FelixEL
Copy link

FelixEL commented Jul 20, 2024

this is a pydronecan problem. I confirm the same behavior where loading custom DSDL deactivates other definitions.

karu2003 pushed a commit to karu2003/gui_tool that referenced this issue Oct 28, 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

3 participants