Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions BuildInstructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ docker compose run --rm --build wslg
```

RViz and the Joint State Publisher window open. Move the `joint_1` to `joint_5`
sliders to move the arm, and use the diagnostics panel's mock controls to try
normal and fault states. Everything is simulated. Press **Ctrl+C** in PowerShell to
stop.
sliders to move the arm; it stops where it would hit itself or the ground, and the
sliders jump back to where it stopped. Use the diagnostics panel's mock controls to
try normal and fault states. Everything is simulated. Press **Ctrl+C** in PowerShell
to stop.

To sweep each joint in turn instead, add the launch command:

Expand Down Expand Up @@ -250,7 +251,8 @@ From the repository root:

Keep this Terminal open. Within a few seconds, RViz opens with the **WayBionic
Engineering Monitor** showing **Current State: NORMAL**, and the Joint State
Publisher shows the `joint_1` to `joint_5` sliders. Press **Control+C** to stop.
Publisher shows the `joint_1` to `joint_5` sliders. The arm stops where it would hit
itself or the ground. Press **Control+C** to stop.

To check the ROS nodes, run this in a second Terminal from the repository root,
while the first one is running:
Expand All @@ -259,8 +261,8 @@ while the first one is running:
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ./scripts/macos.sh run ros2 node list
```

The list must include `/joint_state_publisher`, `/robot_state_publisher` and
`/rviz2`.
The list must include `/joint_state_guard`, `/joint_state_publisher`,
`/robot_state_publisher` and `/rviz2`.

Always use `scripts/macos.sh`: it selects the macOS SDK and Cyclone DDS and loads
the workspace. Don't source `install/setup.bash` from zsh, or run `colcon` or
Expand Down Expand Up @@ -415,7 +417,8 @@ Then open the arm in RViz:
ros2 launch waybionic_bringup ground_station.launch.py
```

RViz and the Joint State Publisher window open; move the sliders to move the arm.
RViz and the Joint State Publisher window open; move the sliders to move the arm,
which stops where it would hit itself or the ground.
Press **Ctrl+C** to stop.

In every new Ubuntu terminal, source both environments before running ROS
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Then open the arm in RViz:

| Folder | Contents |
| --- | --- |
| `waybionic_description` | The arm's URDF and meshes, generated from the SolidWorks assembly by `scripts/cad/`. Regenerate it after CAD changes rather than editing it. |
| `waybionic_description` | The arm's URDF and meshes, generated from the SolidWorks assembly by `scripts/cad/`, with joint limits where the CAD parts touch. Regenerate it after CAD changes rather than editing it. |
| `waybionic_bringup` | `ground_station.launch.py`, the RViz layouts and the launch tests |
| `waybionic_teleop` | Controller teleop, the collision checks, and the MKS drive node, simulated or real |
| `waybionic_can` | The MKS CAN protocol, CAN simulation and the UNO R4 carrier firmware |
Expand Down
66 changes: 54 additions & 12 deletions docs/operator_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,31 +247,73 @@ chicken head is refused; before Start has been pressed, demo mode is:

### Joint limits and collision checks

The current arm URDF has provisional joint limits, and the collision checks model
each link as a box. Don't change a wrist bound or power the motors until Mechanical
identifies the URDF joint and measures its signed travel from upright zero,
including any cable or gear stop.

Every group stops a move before any part of the arm comes within 10 mm of the table
or folds into the arm's own base. You can see the boxes by ticking
**Collision Enabled** on RViz's RobotModel display. The tool's box is a placeholder
around the RViz jaws, which reach 30 mm past `tool_link`, until the real tool is
modelled; a longer tool needs a longer box.
The arm URDF's joint limits are where its CAD parts touch, found by turning each
joint from the upright pose and checking the exact meshes
(`scripts/cad/exact_limits.py`):

| Joint | Limit, either way | Where it stops |
| --- | --- | --- |
| `joint_1` base yaw | 360 degrees | Nothing touches; the cabling isn't modelled |
| `joint_2` shoulder | 109.65 degrees | The straight arm meets the ground under the base |
| `joint_3` elbow | 148.93 degrees | The forearm meets the shoulder's motor mount |
| `joint_4` wrist pitch | 94.67 degrees | The tool mount meets the cap on the forearm, at the worst wrist roll |
| `joint_5` wrist roll | 360 degrees | Nothing touches; the cabling isn't modelled |

Don't power the motors until Mechanical confirms each joint's signed travel from
upright zero on the built arm, including any cable or gear stop.

Then check each limit with the arm powered, before the real arm runs with them. Set the
lowest speed (D-pad down twice), keep the emergency stop within reach, and move one joint
at a time toward each limit: stop about 5 degrees short of it, then creep up to it. Stop at
once if a part touches, a cable pulls tight or a drive reports a following error. Where the
real arm has less room than the table says, write the angle down and lower that limit
before the arm is used. Yaw and roll are 360 degrees because nothing models the cabling:
check that the cables allow a full turn each way.

Every group stops a move where any part of the arm would go below the table or into
the arm's own base and shoulder.

- Against the table, each link's lowest point comes from the convex hull of its CAD
parts (`waybionic_hull` in the URDF), so the arm stops where its real parts reach
the table.
- Against the base and shoulder, the checks use a box around each CAD part, or a
cylinder where a part, or one side of it, is round about a joint axis: the base's
lid, the tool mount and the lower half of the wrist housing. You can see them by
ticking **Collision Enabled** on RViz's RobotModel display.
- Those shapes are too coarse where the forearm folds against the shoulder or the
base, so there the elbow follows tables of its limits against the shoulder angle,
measured from the CAD (`waybionic_fold` in the URDF, from
`scripts/cad/joint_clearance.py`). The base's table holds at every yaw.
- The tool's box is a placeholder around the RViz jaws, which reach 30 mm past
`tool_link`, until the real tool is modelled; a longer tool needs a longer box.
- The joint sliders use the same check. `joint_state_guard` moves the arm toward the
sliders' pose, checking at least every half degree of each joint, stops at the
last pose before any part would touch, and moves the sliders back to it. If the arm's
description has collision data it cannot use (a malformed hull or fold table, or lost
shapes), the sliders do nothing and the guard logs an error; only the old arm and the
placeholder, which have no collision shapes by design, pass through unchecked.
- When a move stops, the diagnostics panel names the part, for example
`At limit: forearm_link: table`.
- If the arm stands on a raised mount, set `table_height` in
`waybionic_teleop/config/xbox_teleop.yaml` to the table's height above the bottom
of the base. `collision_clearance` in the same file sets the 10 mm margin.
of the base. `collision_clearance` in the same file keeps a gap to the table, and
`self_collision_clearance` to the base and shoulder. Both are 0, so the arm stops
where its parts touch; raise them for a margin on the real arm.
- If the arm is already touching something, the only moves allowed are ones that
back out of it. A move that presses any contact further in is refused, even if it
would ease another contact at the same time.
- A `robot_description` without a collision box for the base, shoulder, upper arm,
- A `robot_description` without collision shapes for the base, shoulder, upper arm,
forearm, wrist, wrist roll or tool leaves teleop disabled, and the diagnostics
panel names the missing links.
- Reloading the description while teleop is enabled disables teleop and holds the
arm, and the drives stop, so release Start and press it again.

After any change to the CAD, the limits or the collision shapes, run
`scripts/cad/check_collision_model.py`. It tests about 300,000 poses that the checks
call clear (random poses, poses with a joint at a limit, and the poses where moves
stop) against the exact CAD meshes, and fails if two parts or the tool's box
intersect, or a part goes below the ground.

### If the controller stops responding on Windows

If the arm stops responding or keeps moving after you release the sticks, and the
Expand Down
Loading