When the tablet is attached, it can be hard for the remote operator to:
(a) know whether the tablet is in portrait or landscape mode;
(b) move the tablet to portrait or landscape mode (exactly, without a few-degree offset).
This PR addresses that. Essentially, every time a new joint state is received by the operator interface, it computes the tablet orientation. It always displays a button below the gripper view, "Switch to __ View", where ____ is either Portrait or Landscape, whichever is the opposite of the robot's current tablet orientation.
This PR also creates a tablet-specific stow configuration.
Testing procedure
[x] Switch the tool to the tablet by disconnecting the dex wrist and using stretch_configure_tool.py
[x] Start the interface, verify it has the correct orientation for the tablet (by verifying that the button shows the opposite orientation).
[x] Click the button, verify it toggles the orientation.
[x] Click the button again, verify it toggles the orientation.
[x] Use the button pad to roll the joint. Verify the button updates when the tablet is closer to the other orientation than its current one.
[x] Move to another pitch and yaw. Verify that toggling it still works.
[x] Stop the interface, and switch the tool to the Dex Wrist.
[x] Launch the interface, and verify that the toggle tablet orientation button does not appear below the gripper camera.
Future Work
It would be helpful to have similar "roll 90 degrees" actions for the gripper, but in that case there are more options than just portrait and landscape. For that case, we should put "roll clockwise/counter" buttons on the left/right of the gripper camera, similar to the head pan buttons, which rotates the wrist +/i 90 degrees, snapping to the nearest multiple of 90 degrees.
Description
When the tablet is attached, it can be hard for the remote operator to: (a) know whether the tablet is in portrait or landscape mode; (b) move the tablet to portrait or landscape mode (exactly, without a few-degree offset).
This PR addresses that. Essentially, every time a new joint state is received by the operator interface, it computes the tablet orientation. It always displays a button below the gripper view, "Switch to __ View", where ____ is either Portrait or Landscape, whichever is the opposite of the robot's current tablet orientation.
This PR also creates a tablet-specific stow configuration.
Testing procedure
stretch_configure_tool.py
Future Work
It would be helpful to have similar "roll 90 degrees" actions for the gripper, but in that case there are more options than just portrait and landscape. For that case, we should put "roll clockwise/counter" buttons on the left/right of the gripper camera, similar to the head pan buttons, which rotates the wrist +/i 90 degrees, snapping to the nearest multiple of 90 degrees.
Before opening a pull request
From the top-level of this repository, run:
pre-commit run --all-files
To merge
Squash & Merge