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

HWP Gripper Updates (Alarm group and restart processes) #737

Merged
merged 5 commits into from
Oct 2, 2024

Conversation

bbixler500
Copy link
Contributor

@bbixler500 bbixler500 commented Aug 27, 2024

Description

Adds two new tasks to the agent. alarm_group queries the specific type of generated alarm. This function will return a value of (False, 'B', 'C', 'D', 'E') depending on the current alarm state, where the letters correspond to specific groups of alarms. restart remotely restarts the processes which are running separately on beaglebone microcontrollers

Motivation and Context

Currently the agent is only able to query whether an alarm is present and does not have any way to distinguish different alarms from each other. The alarm_group task adds more specificity to what alarms are generated. As a seperate issue, any time there is a power cycle to the hwp enclosure, a remote user needs to manually ssh into the gripper beaglebone microcontroller and restart two processes. This is both a hassle and requires an expert's knowledge. The restart task condenses this process into a single button on OCS-Web which can be run by anyone.

How Has This Been Tested?

These two tasks have been tested to work with the satp2 hwp. Note that these changes require running the most recent version of the beaglebone code located in the sobonelib repo. There are likely still edge cases which I haven't fully considered, but these should be isolated to these two methods and should not effect the rest of the code.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link
Contributor

@ykyohei ykyohei left a comment

Choose a reason for hiding this comment

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

I followed the instruction described in README of sobonelib and confirmed that new functionalities (restart and alarm_group) also works for satp3. I think these are really helpful, thanks for your update. We should include alarm_group check in the grip function maybe in separate PR.

@jlashner
Copy link
Collaborator

jlashner commented Sep 4, 2024

Hi Bryce, this looks really nice and useful! One small suggestion I have... do you think we can add an entry to the alarm_group session data called like "decoded_alarm_state", which map to the five definitions you have in the docstring? Is the alarm group state something we should be regularly polling through the main process so we can monitor it in grafana?

Copy link
Collaborator

@jlashner jlashner left a comment

Choose a reason for hiding this comment

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

Thanks bryce! I think this looks good and am fine merging if it's been tested.

@bbixler500
Copy link
Contributor Author

Pinging @BrianJKoopman to see if we can get this merged

@BrianJKoopman
Copy link
Member

Pinging @BrianJKoopman to see if we can get this merged

Was waiting on confirmation of the latest version having been tested. If that's the case, happy to squash and merge.

@bbixler500
Copy link
Contributor Author

Yep I tested those changes with satp2 when I pushed them

@BrianJKoopman BrianJKoopman merged commit 33b1e1d into main Oct 2, 2024
5 checks passed
@BrianJKoopman BrianJKoopman deleted the hwp-gripper-alarmgroup branch October 2, 2024 18:49
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