Skip to content

Conversation

john-michaelburke
Copy link
Collaborator

This implements most of the functionality of the Signals Tab and also changes a decent amount of the code structure. I'm hoping to get input on the organization of this code thinking toward scaling to other tabs.

  • Rust code is broken out to a file per tab (1 so far) and intending all tabs to implement TabBackend trait in types.rs.
    • I think the structure in process_messages is somewhat conducive to drop in replacing the sequential approach with some asynchronous handling in the future.
    • One thing I have not really thought through is how to send messages from the frontend through to a backend tab struct. I am interested in some suggestions.
    • This Tracking Signals Tab does not have the functionality of turning on/off plots with checkboxes as this will require data sent from the frontend.
  • QML now broken up into nested tab structure.
  • Added a TrackingSignalsTab struct which implements most of the features from the original console but severed from the Observations tab interdependency.
  • Left the Velocity Tab untouched until we come to a consensus on design.

Screen Shot 2021-03-25 at 2 54 35 PM

@john-michaelburke john-michaelburke force-pushed the john-michaelburke/signals_tab branch 2 times, most recently from f88749c to bdeebab Compare March 26, 2021 00:24
@john-michaelburke john-michaelburke force-pushed the john-michaelburke/signals_tab branch from bdeebab to aeef1f4 Compare March 26, 2021 01:57
@john-michaelburke john-michaelburke force-pushed the john-michaelburke/signals_tab branch from 39ca1ad to 8481357 Compare March 26, 2021 06:49
jayvdb
jayvdb previously requested changes Mar 26, 2021
}
}
}
//TODO(@johnmichael.burke)[CPP-83]Fix this once implemented reverse communication with backend tabs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have two-way communication to kick off the connection to the Piksi, could we re-use this to populate a "shared state" data structure that would be able to record this kind of information? I agree that long term we should have some sort of framework around this, but it should be fairly simple to build a lock protected Dictionary that would allow the back-end to fetch bits of state like this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds reasonable to me

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright I have something working probably could be polished but let me know what you think!

@john-michaelburke john-michaelburke force-pushed the john-michaelburke/signals_tab branch from 36cc3a0 to 4de655d Compare March 26, 2021 21:05
@john-michaelburke
Copy link
Collaborator Author

I'm not able run this on Linux using cargo make prod-run I am able to run the console with cargo make run though, however with prod-run I see:

[cargo-make] INFO - Running Task: prod-run
Traceback (most recent call last):
  File "/home/ubuntu/dev/console_pp/src/main/python/main.py", line 28, in <module>
    import console_backend.server  # type: ignore  # pylint: disable=import-error,no-name-in-module
  File "/home/ubuntu/miniconda3/envs/console_pp/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'console_backend'

And on Windows I see a different error (prod-run vs run doesn't see to matter:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "c:\users\jason\miniconda3\envs\console_pp\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "c:\users\jason\miniconda3\envs\console_pp\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\jason\dev\console_pp\src\main\python\main.py", line 67, in receive_messages
    TRACKING_SIGNALS_TAB[Keys.LABELS][:] = m.trackingStatus.labels
  File "capnp\lib\capnp.pyx", line 1038, in capnp.lib.capnp._DynamicStructReader.__getattr__
  File "capnp\lib\capnp.pyx", line 1036, in capnp.lib.capnp._DynamicStructReader.__getattr__
  File "capnp\lib\capnp.pyx", line 1032, in capnp.lib.capnp._DynamicStructReader._get
capnp.lib.capnp.KjException: capnp\layout.c++:2389: failed: expected expectedPointersPerElement <= pointerCount; Message contained list with incompatible element type.
stack: 7ffbde6b0254 7ffbde697f99 7ffbde69837d 7ffbde7a5c59 7ffbde7a532f 7ffbdb21b794 7ffbdb216d17 7ffbdb217c7e 7ffbdb1f0973 7ffbdb1f07a6 7ffbdb21c881 7ffbdb21978d 7ffbdb21b773 7ffbdb21978d 7ffbdb21b773 7ffbdb217b9c 7ffbdb2169eb 7ffbdb1f0973 7ffbdb23ee62 7ffbdb23ede9 7ffc26aa1bb1 7ffc27337033 7ffc291e2650

That looks like the issue fixed in my last PR. I only recently merged in main to this branch. Can you try fetch/pulling the latest of this branch and giving it a shot

@silverjam
Copy link
Contributor

And on Windows I see a different error (prod-run vs run doesn't see to matter:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "c:\users\jason\miniconda3\envs\console_pp\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "c:\users\jason\miniconda3\envs\console_pp\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\jason\dev\console_pp\src\main\python\main.py", line 67, in receive_messages
    TRACKING_SIGNALS_TAB[Keys.LABELS][:] = m.trackingStatus.labels
  File "capnp\lib\capnp.pyx", line 1038, in capnp.lib.capnp._DynamicStructReader.__getattr__
  File "capnp\lib\capnp.pyx", line 1036, in capnp.lib.capnp._DynamicStructReader.__getattr__
  File "capnp\lib\capnp.pyx", line 1032, in capnp.lib.capnp._DynamicStructReader._get
capnp.lib.capnp.KjException: capnp\layout.c++:2389: failed: expected expectedPointersPerElement <= pointerCount; Message contained list with incompatible element type.
stack: 7ffbde6b0254 7ffbde697f99 7ffbde69837d 7ffbde7a5c59 7ffbde7a532f 7ffbdb21b794 7ffbdb216d17 7ffbdb217c7e 7ffbdb1f0973 7ffbdb1f07a6 7ffbdb21c881 7ffbdb21978d 7ffbdb21b773 7ffbdb21978d 7ffbdb21b773 7ffbdb217b9c 7ffbdb2169eb 7ffbdb1f0973 7ffbdb23ee62 7ffbdb23ede9 7ffc26aa1bb1 7ffc27337033 7ffc291e2650

That looks like the issue fixed in my last PR. I only recently merged in main to this branch. Can you try fetch/pulling the latest of this branch and giving it a shot

I pulled in this merge before running, but just updated the branch to be sure and I'm still seeing this issue.

@john-michaelburke john-michaelburke force-pushed the john-michaelburke/signals_tab branch 2 times, most recently from 6f38968 to 19a44ff Compare March 28, 2021 20:56
@john-michaelburke
Copy link
Collaborator Author

And on Windows I see a different error (prod-run vs run doesn't see to matter:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "c:\users\jason\miniconda3\envs\console_pp\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "c:\users\jason\miniconda3\envs\console_pp\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\jason\dev\console_pp\src\main\python\main.py", line 67, in receive_messages
    TRACKING_SIGNALS_TAB[Keys.LABELS][:] = m.trackingStatus.labels
  File "capnp\lib\capnp.pyx", line 1038, in capnp.lib.capnp._DynamicStructReader.__getattr__
  File "capnp\lib\capnp.pyx", line 1036, in capnp.lib.capnp._DynamicStructReader.__getattr__
  File "capnp\lib\capnp.pyx", line 1032, in capnp.lib.capnp._DynamicStructReader._get
capnp.lib.capnp.KjException: capnp\layout.c++:2389: failed: expected expectedPointersPerElement <= pointerCount; Message contained list with incompatible element type.
stack: 7ffbde6b0254 7ffbde697f99 7ffbde69837d 7ffbde7a5c59 7ffbde7a532f 7ffbdb21b794 7ffbdb216d17 7ffbdb217c7e 7ffbdb1f0973 7ffbdb1f07a6 7ffbdb21c881 7ffbdb21978d 7ffbdb21b773 7ffbdb21978d 7ffbdb21b773 7ffbdb217b9c 7ffbdb2169eb 7ffbdb1f0973 7ffbdb23ee62 7ffbdb23ede9 7ffc26aa1bb1 7ffc27337033 7ffc291e2650

That looks like the issue fixed in my last PR. I only recently merged in main to this branch. Can you try fetch/pulling the latest of this branch and giving it a shot

I pulled in this merge before running, but just updated the branch to be sure and I'm still seeing this issue.

@silverjam I'm not sure what could be happening. Everything seems to run fine run/prod-run on my windows nuc and linux vm. I believe they are running as intended on the self hosted runners as well, will know for sure once they pass the benchmarks.

@john-michaelburke john-michaelburke force-pushed the john-michaelburke/signals_tab branch 5 times, most recently from f52d628 to d340267 Compare March 29, 2021 02:04
@silverjam
Copy link
Contributor

I pulled in this merge before running, but just updated the branch to be sure and I'm still seeing this issue.

@silverjam I'm not sure what could be happening. Everything seems to run fine run/prod-run on my windows nuc and linux vm. I believe they are running as intended on the self hosted runners as well, will know for sure once they pass the benchmarks.

Looks like it was an issue with how the console_backend module was being installed, see #22 for details.

@john-michaelburke john-michaelburke force-pushed the john-michaelburke/signals_tab branch from d340267 to 0fefd9d Compare March 29, 2021 17:05
@john-michaelburke john-michaelburke force-pushed the john-michaelburke/signals_tab branch from e6140dc to 431f780 Compare March 29, 2021 20:05
@john-michaelburke
Copy link
Collaborator Author

PTAL @silverjam @jayvdb

@john-michaelburke john-michaelburke force-pushed the john-michaelburke/signals_tab branch from 1e33277 to 9734885 Compare March 29, 2021 22:32
GLO_L10F,
GLO_L20F,
BDS2_B1_I,
BDS2_B2_I,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this label is enabled/disabled, there is no effect. Same with QZS_L1CA. Seems like it might be related to the data stream not containing these signals, in which case they should be greyed out?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct this is due to no streams from those satellites coming in. I think that is a decent idea to grey them out. I'll create a ticket to add it later on. This is the same behavior in the original console.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@silverjam silverjam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's try to resolve @jayvdb's concerns then get this merged, for future PRs it would be great if we can implement some kind of simple unit tests

@jayvdb jayvdb dismissed their stale review March 30, 2021 01:52

concerns addressed

@john-michaelburke john-michaelburke merged commit 970732c into main Mar 30, 2021
@john-michaelburke john-michaelburke deleted the john-michaelburke/signals_tab branch March 30, 2021 02:02
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

Successfully merging this pull request may close these issues.

4 participants