-
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
cleanup gripper agent #487
Conversation
… scheme. Agent interfaces with a beaglebone microcontroller to perform functions. File src/gripper_server.py and files located in the pru/ directory will be moved to the beaglebone home directory. During operation two beaglebone processes will be ongoing. One process in the "src" directory "python3 gripper_server.py" and one process in the "pru" directory "sudo ./run.sh". The "src" process sets up a server to receive control commands from the agent. The "pru" process continually sends the agent encoder and limit switch data packets. The compiled code is included along with the uncompiled C code.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…isor agent. Rearranged structure of agent processes to better utilize the OCS framework. Added two files in the pru directory which were accidentally missing.
for more information, see https://pre-commit.ci
…onelib" repository
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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.
Thanks for the structure clean up effort @jlashner! I mostly have documentation requests.
I feel pretty strongly about the need to have examples of the session.data
in the docstrings, but the structure here of passing whatever comes back from the GripperServer
in sobonelib
straight to session.data
makes that perhaps a bit awkward since changes in sobonelib
might result in changes in the returned data structure that are documented here.
EDIT: Oh, and please resolve the test failure and pre-commit warnings.
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.
Thanks for addressing all those comments @bbixler500. There's still one missing session.data
example (I left the comment unresolved in the last review.) And also there's the mock that's still causing issues build the docs. Lastly, there are still a failing test, it looks related to the ibootbar states.
…socs into gripper_agent_cleanup
Let me know if I can help with the tests. Everything else looks good. |
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.
Thanks for fixing the tests!
* Created hwp gripper agent * Updates from comments * Removed unused import * Uncommented input decorators * Protect local src imports when building docs * Fix permissions on Dockerfile * Added and modified files to account for the change in gripper control scheme. Agent interfaces with a beaglebone microcontroller to perform functions. File src/gripper_server.py and files located in the pru/ directory will be moved to the beaglebone home directory. During operation two beaglebone processes will be ongoing. One process in the "src" directory "python3 gripper_server.py" and one process in the "pru" directory "sudo ./run.sh". The "src" process sets up a server to receive control commands from the agent. The "pru" process continually sends the agent encoder and limit switch data packets. The compiled code is included along with the uncompiled C code. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Changes to make the agent work in the SAT1 setup. Still WIP * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added energency shutdown functionality by interfacing with the supervisor agent. Rearranged structure of agent processes to better utilize the OCS framework. Added two files in the pru directory which were accidentally missing. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * removed files unrelated to OCS and moved them into the "simonsobs/sobonelib" repository * Changes for socs update compatibility * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * small change * Remove dockerfile * Removed unused imports and variables * Added hwp_gripper.rst file * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * removed more unused imports * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added docstrings * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Moved control commands from agent.py into drivers/gripper_client.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added additional comments to explain the purpose of certain variables * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix syntax error * Fix Gripper docs page builds * Mock supervisor agent imports for docs builds * Add hwp gripper agent to docs index * Changed shutdown procedure to account for changes in supervisor agent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added additional limit switch functionality and renamed method `grip_mode` to `grip_is_cold` * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Simple changes in response to PR * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * minor changes and renames * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Changed communication from UDP to TCP and improved logging messages sent to agent * Combined function of GripperBuilder.py and GripperCollector.py into single file gripper_collector.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updated hwp_gripper.rst * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Moved pru packet collection out of the gripper agent and added additional functions to query actuator positions and limit states * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * cleanup gripper agent and make compatible with PRU monitor * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Changes to get gripper agent working on sat1 * Changed name of gripper class and fixed typo in supervisor monitor * Modified shutdown procedure and increased command timeout * Added monitoring of the bias power supply iboot bar * Disabled emergency grip procedure. Removed no data shutdown trigger. Added exception handling to state monitor * fixed typo * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * misc gripper agent updates * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added example session data, and fixed spelling mistakes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added session.data description and changed structure of iboot outlet setting * trying to fix unit test * still trying to fix unit test * still trying to fix unit test * still trying to fix unit test * Remove other hwp_supervisor mock * still trying to fix unit test * still trying to fix unit test * still trying to fix unit test * still trying to fix unit test --------- Co-authored-by: Charles Hill <[email protected]> Co-authored-by: Brian Koopman <[email protected]> Co-authored-by: Bryce Bixler <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Kevin Crowley <[email protected]> Co-authored-by: Kevin Crowley <[email protected]> Co-authored-by: Bryce Bixler <[email protected]>
* Created hwp gripper agent * Updates from comments * Removed unused import * Uncommented input decorators * Protect local src imports when building docs * Fix permissions on Dockerfile * Added and modified files to account for the change in gripper control scheme. Agent interfaces with a beaglebone microcontroller to perform functions. File src/gripper_server.py and files located in the pru/ directory will be moved to the beaglebone home directory. During operation two beaglebone processes will be ongoing. One process in the "src" directory "python3 gripper_server.py" and one process in the "pru" directory "sudo ./run.sh". The "src" process sets up a server to receive control commands from the agent. The "pru" process continually sends the agent encoder and limit switch data packets. The compiled code is included along with the uncompiled C code. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Changes to make the agent work in the SAT1 setup. Still WIP * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added energency shutdown functionality by interfacing with the supervisor agent. Rearranged structure of agent processes to better utilize the OCS framework. Added two files in the pru directory which were accidentally missing. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * removed files unrelated to OCS and moved them into the "simonsobs/sobonelib" repository * Changes for socs update compatibility * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * small change * Remove dockerfile * Removed unused imports and variables * Added hwp_gripper.rst file * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * removed more unused imports * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added docstrings * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Moved control commands from agent.py into drivers/gripper_client.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added additional comments to explain the purpose of certain variables * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix syntax error * Fix Gripper docs page builds * Mock supervisor agent imports for docs builds * Add hwp gripper agent to docs index * Changed shutdown procedure to account for changes in supervisor agent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added additional limit switch functionality and renamed method `grip_mode` to `grip_is_cold` * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Simple changes in response to PR * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * minor changes and renames * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Changed communication from UDP to TCP and improved logging messages sent to agent * Combined function of GripperBuilder.py and GripperCollector.py into single file gripper_collector.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updated hwp_gripper.rst * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Moved pru packet collection out of the gripper agent and added additional functions to query actuator positions and limit states * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * cleanup gripper agent and make compatible with PRU monitor * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Changes to get gripper agent working on sat1 * Changed name of gripper class and fixed typo in supervisor monitor * Modified shutdown procedure and increased command timeout * Added monitoring of the bias power supply iboot bar * Disabled emergency grip procedure. Removed no data shutdown trigger. Added exception handling to state monitor * fixed typo * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * misc gripper agent updates * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added example session data, and fixed spelling mistakes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added session.data description and changed structure of iboot outlet setting * trying to fix unit test * still trying to fix unit test * still trying to fix unit test * still trying to fix unit test * Remove other hwp_supervisor mock * still trying to fix unit test * still trying to fix unit test * still trying to fix unit test * still trying to fix unit test --------- Co-authored-by: Charles Hill <[email protected]> Co-authored-by: Brian Koopman <[email protected]> Co-authored-by: Bryce Bixler <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Kevin Crowley <[email protected]> Co-authored-by: Kevin Crowley <[email protected]> Co-authored-by: Bryce Bixler <[email protected]>
A few changes to the gripper-agent to address some things mentioned by Brian in the PR comments and to make it more compatible with the PRU monitor sobonelib changes.
This needs testing