hello-robot / stretch_web_teleop

Remote web teleoperation for the Stretch mobile manipulators from Hello Robot Inc.
Other
15 stars 1 forks source link

Homing Button #98

Closed hello-binit closed 2 months ago

hello-binit commented 3 months ago

Description

This PR adds the ability for a user to "home" the robot through the web interface. Since some of Stretch's encoders are relative, there's a homing sequence to find zero for those joints when Stretch wakes up. This PR addresses some of #60; it provides a way to home the robot, but doesn't grey-out un-homed joints, or implement a pre-scan behavior to give the robot confidence that jogging the joints won't cause the robot to topple itself over (this burden is currently placed on the operator).

Testing procedure

  1. Start with an un-homed robot. You can power cycle the robot, or a quick way is to call stretch_robot_dynamixel_reboot.py.
  2. In your Ament workspace, go to Stretch ROS2 and switch to the bugfix/priority_mode_stall branch. If PR https://github.com/hello-robot/stretch_ros2/pull/162 is merged, you can git pull on the default branch.
  3. In your Ament workspace, go to Stretch Web Teleop and switch to the feature/homing branch.
  4. In the same repo, cherry-pick a numpy fix onto the homing branch. The command is git cherry-pick -n 6dfcf32e50175dff5cfabaa2c581486660f1d143, followed by git reset. If PR https://github.com/hello-robot/stretch_web_teleop/pull/97 is merged, then this step may be unnecessary (depends on whether I've rebased this branch).
  5. colcon build the Ament workspace as usual
  6. Run the interface as usual

The homing button will appear. Click it and it should disappear after homing is complete.

Before opening a pull request

From the top-level of this repository, run:

To merge

Additional Screenshots

These screenshots are of the first attempt at this UI. It has since been replaced. Screenshot from 2024-08-29 19-19-41 Screenshot from 2024-08-29 19-19-52 Screenshot from 2024-08-29 19-20-20 Screenshot from 2024-08-29 19-20-54

hello-binit commented 2 months ago

Hey @hello-vinitha, thanks for your suggestions! I've updated the UI to be based on the Alert dialog, instead of the operator panels. I think the resulting UX is better. Here's the flow:

hello-binit commented 2 months ago

@hello-vinitha friendly ping!

hello-vinitha commented 2 months ago

@hello-binit I made the following changes in the latest commit and verified that it works as expected on 3030:

hello-binit commented 2 months ago

Sweet, everything works on 3004. Merging!