-
Notifications
You must be signed in to change notification settings - Fork 13
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
Adds grip and ungrip fns to hwp-supervisor with safety checks #708
Conversation
and safety checks
Will take a look soon. In the meantime, merging in the latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this quickly, we will test this.
- We would like to have --acu-min/max-roll (or boresight, bs?) for gripper operation.
- We would like to monitor acu.roll_current/commanded_position for gripper operation.
- Can current hwp-supervisor and ocs provide information to acu that the gripper functions are running, so that acu can restrict its operation?
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Hi Kyohei, I added the boresight checks and exposed the supervisor control state in several places so it can be checked by the ACU. I think the following is the one with the least amount of latency (~1 sec)...
However I don't think this completely resolves the problem, since there is still a race condition if ACU movement and Grip/Ungrip are called at the same time (or within ~1 sec of each other)... there are ways that I can reduce the latency at which the control state session info is updated, but if this is something we really care about, we may want to thing about using a filesystem mutex to prevent simultaneous gripper/acu control (since I believe both agents are running on the same node). @mhasself do you think this may be worth doing or do you think that's overkill? |
I would prefer to use an OCS-based handshake rather than some other system (e.g. filesystem). That would mean:
That seem good? The ACU agent modifications are not too difficult, but we will need a testing platform for a few hours. |
I think that seems good, but should probably go into a separate PR so that we can have some basic form of protection in the meantime. @ykyohei do you think we can test this version of the branch at site? |
Fine with me but you could put in that "block_ACU_motion" flag right away, if it's not already in here somewhere. (But not insist on hand-shake completion.) Then ACU Agent can evolve + start implementing the block-out; then you can come back and implement the handshake fully to eliminate the race condition. |
Hi Matthew, in the latest commit I added the Hope this is enough for now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made minor debugs, and I believe the safety checks are working but I have some requests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks mostly OK to me, just a question about behavior when acu is None
.
for more information, see https://pre-commit.ci
…hwp_supervisor_grip
Hi @ykyohei and @BrianJKoopman, I think I addressed the remaining issues in the latest commits, with the exception of the force_grip option, which I want to double check this is something we actually need and want before implementing. Now, the ACU instance ID will always default to "acu", and checks will only be skipped if the If we could test this on an instrument that would be great! |
Thank you so much Jack, I tested this and safety checks look working. |
Yes that's right, the ACU blocking will not work until its implemented on the ACU side. Thanks for testing! Though testing worked successfully, I am realizing that there is not currently a good way to test this without risk of it not working and potentially putting the telescope in danger. I think for this reason I should add a "--dry" mode where gripper and hwp operations are not actually conducted, we just log statements. I think lets merge this PR and then I will implement this separately. |
Adds grip and ungrip fns to hwp-supervisor with safety checks.
This PR adds two additional operations to the HWP supervisor to grip/ungrip the HWP
Description
For these two actions, the HWP and ACU states are first checked based on kyohei's daq-discussion.
If checks pass, the gripper agent grip/ungrip operations will be called.
Motivation and Context
This is to centralize the gripping procedure and to implement safety checks.
How Has This Been Tested?
This has not been tested yet. @ykyohei any chance we can test at site sometime soon?
Types of changes
Checklist: