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

Sensors Status Panel #450

Closed
8 of 11 tasks
maxwellmlin opened this issue Sep 16, 2023 · 2 comments · Fixed by #480
Closed
8 of 11 tasks

Sensors Status Panel #450

maxwellmlin opened this issue Sep 16, 2023 · 2 comments · Fixed by #480
Assignees
Labels
gui Related to robot GUI
Milestone

Comments

@maxwellmlin
Copy link
Member

maxwellmlin commented Sep 16, 2023

Motivation

During competition/pool tests we need the ability to quickly check whether all sensors are functioning.

Requirements

  • Display connected/disconnected status of the following sensors:

    • DVL (/sensors/dvl/odom)
    • IMU (/vectornav/IMU)
    • Depth (/sensors/depth)
    • DepthAI Camera (/camera/front/rgb/preview/compressed)
    • Mono Camera (/camera/usb_camera/compressed)
    • Sonar (/sonar/status)
  • Ensure panel is robot agnostic (can easily add/remove sensors in the table)

Later

  • Acoustics
  • Joystick
  • Display publish rate (in Hz) of the last 30 seconds for each sensor

Notes

  • Create a MUI Table with 3 columns: Sensor Name (str), Topic Path (str), Sensor Publishing (bool).
  • The sensor is publishing if the latest message has a timestamp from less than 5 seconds ago.
    • Look at the definition of MessageEvent. You need to compare receiveTime.sec with renderState.currentTime.sec.
    • To read renderState.currentTime.sec, "currentTime" must be set as a watch event.
  • If the sensor is not publishing change the background color of the row to theme.palette.error.main1.

Local testing

  • Open this bag file using Foxglove. motion.launch is launched at about 10 seconds and killed at about 100 seconds. Ensure that Sensors Status Panel reflects this.

Footnotes

  1. First, import the default MUI theme. Then, use the appropriate color.

@maxwellmlin maxwellmlin added the gui Related to robot GUI label Sep 16, 2023
@maxwellmlin maxwellmlin added this to the Fall 2023 milestone Sep 16, 2023
@maxwellmlin
Copy link
Member Author

@Will-Denton Topics should be made for each sensor status

@maxwellmlin
Copy link
Member Author

maxwellmlin commented Oct 26, 2023

Sensors Status Panel needs to be made more compact.

  • Remove the panel title
  • Remove the topic dropdown
  • Remove the table header
  • Add the size="small" attribute to Table
  • Remove the minWidth: 650 styling
  • Remove the "Topic Name" column. Instead, communicate topic name via MUI Tooltips when hovering over the sensor name. Use placement="right".
  • Remove the "Sensor Publishing?" column. Instead, communicate sensor status via row colors. Use "green" for connected and "red" for disconnected.

@RaulGalvez288 RaulGalvez288 self-assigned this Nov 4, 2023
@maxwellmlin maxwellmlin linked a pull request Nov 4, 2023 that will close this issue
ChuChuCodes0414 added a commit that referenced this issue Nov 17, 2023
Closes #450.

Additionally, the following changes were implemented:

1. Adds the `foxglove/theme` directory which contains a custom MUI theme which should be adopted by all future extensions. `foxglove.py` compiles this theme into `node_modules` so that the theme can be imported in other packages.
2. **Improvements to `./foxglove.py` script**: You can now use `./foxglove.py i` instead of `./foxglove.py install`. Additionally, there is a dedicated build command if the user only wishes to build dependencies.
3. **Improvements to GitHub Actions**: We now build/install all extensions to ensure there are no compilation errors.

Co-authored-by: Nathanael Ren <[email protected]>
Co-authored-by: nathan <[email protected]>
Co-authored-by: RaulGalvez288 <[email protected]>
Co-authored-by: viethungle-vt1401 <[email protected]>
Co-authored-by: Mathew Chu <[email protected]>
Co-authored-by: 2Ahmad5 <[email protected]>
Co-authored-by: Maxwell Lin <[email protected]>
Co-authored-by: Satvik Matta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gui Related to robot GUI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants