Strain-wave gear¶
A strain-wave gear, also called a harmonic drive, is the compact high-ratio reducer in most robot arms' joints. It has three parts. A thin steel cup with 60 teeth round its open end (the flexspline) sits inside a fixed ring with 62 internal teeth. An elliptical cam inside the cup (the wave generator) spreads it into an ellipse, so its teeth mesh with the ring's at the two ends of the long axis only. As the cam turns, the two meshing zones travel round the ring, and since the ring has two more teeth, each cam turn moves the cup back by two teeth: a reduction of 30:1.
The close-up follows one meshing zone through a full cam turn, at every step, cut through the middle of the teeth. Over the cam's long axis (the yellow stripe) the cup is pushed out (red) and its teeth sit deep in the ring's tooth spaces; to either side the push fades and the teeth come out of mesh. A quarter turn away, out of view, the cup is drawn in (blue), clear of the ring.
Here the gear lies on its side, like a robot joint. A motor turns the cam, and a 20 cm rod bolted to the cup's hub lifts a 2.5 kg weight plate that hangs from a hook at its end. The plate is let go 5 degrees aside, so it swings as it rises. In three cam turns the rod lifts 35.9 degrees, against 36 for an exact 30:1.
The main view colours the cup by its strain. The inset looks at the gear head-on, cut and coloured like the close-up above. The green mark on the cup starts level with the rod, beside the green tick on the ring: it falls behind the yellow stripe on the cam, turning the other way, at a thirtieth of its speed.
The run is 1140 steps: 60 for the cam to slide into the cup, then three turns at
one degree a step. It takes about 15 minutes on an Apple-silicon Mac.
--no-viewer prints the cam's angle, the rod's lift and the reduction measured
from the cup's hub every 10 steps instead of opening the viewer.
The cup¶
The cup is a subspace body: a frame that carries its turn, plus its 48 lowest vibration modes with the hub held, which carry the elliptical wave and the cup's flexing. The modes are computed once, before the run, from the cup's own hex mesh. Only the teeth and the bore under them can touch anything, so they alone are the cup's contact surface:
material = trusty.StableNeoHookean(youngs_modulus=YOUNGS, poisson_ratio=POISSON)
basis = cup_basis(mesh, hub, args.modes)
cup = trusty.subspace.add_hex_body(world, mesh, material, density=DENSITY, basis=basis,
surface_proxy=trusty.subspace.SurfaceProxy(*gear.contact_surface(mesh)))
trusty.subspace.set_cubature(world, cup, trusty.subspace.fit_cubature(world, cup))
trusty.contact.set_self_contact(world, cup, False)
The ring¶
The ring is a near-rigid affine body held by a
fixed joint. Its teeth are not standard
involutes: they are shaped to clear the path the cup's teeth take as the wave
carries them in and out of mesh, and the script loads them from
examples/data/strain_wave_gear_ring.npz.
ring = trusty.affine.add_affine_body(world, *gear.circular_spline(), density=DENSITY,
stiffness=RIGID)
trusty.affine.add_fixed_joint(world, ring, (0, 0, 0), (0.01, 0, 0), (0, 1, 0),
stiffness=RIGID)
The cam¶
The cam turns on a carriage that slides along the gear's axis. Two joint drives move it: one pushes the cam into the cup over the first 60 steps, and the other, the motor, then turns it. The cam presses on the cup's bore only through contact; the carriage is excluded from contact.
V, F = gear.wave_generator()
cam = trusty.affine.add_affine_body(world, V + [0, 0, START_GAP], F, density=DENSITY,
stiffness=RIGID)
h = 0.5 * gear.hub_radius
carriage = trusty.affine.add_affine_body(world, *box_surface((-h, -h, START_GAP - h),
(h, h, START_GAP + h)),
density=DENSITY, stiffness=RIGID)
rail = trusty.affine.add_prismatic_joint(world, carriage, (0, 0, START_GAP), (0, 0, 1),
stiffness=RIGID)
spindle = trusty.affine.add_revolute_joint(world, cam, (0, 0, 0), (0, 0, 1), body_j=carriage,
stiffness=RIGID)
slide = trusty.actuators.add_joint_drive(world, rail, stiffness=SLIDE_DRIVE)
turn = trusty.actuators.add_joint_drive(world, spindle, stiffness=TURN_DRIVE)
trusty.contact.exclude_body_from_contact(world, carriage)
The output¶
The cup's hub is pinned to a flange that turns on a revolute joint. A drive on that joint acts as a brake while the cam slides in, and is destroyed when it starts to turn:
flange = trusty.affine.add_affine_body(world, *gear.output_flange(), density=DENSITY,
stiffness=RIGID)
bearing = trusty.affine.add_revolute_joint(world, flange, (0, 0, 0), (0, 0, 1),
stiffness=RIGID)
brake = trusty.actuators.add_joint_drive(world, bearing, stiffness=BRAKE)
spokes = hub.reshape(-1, 3)[::len(hub) // 3 // HUB_PIN_SPOKES].ravel()
trusty.constraints.add_pin(world, cup, spokes.tolist(), to=flange,
stiffness=HUB_PIN * len(hub) / len(spokes))
trusty.contact.exclude_body_from_contact(world, flange)
The rod is fixed to the flange, and the plate hangs from it on a spherical joint:
# A steel rod under the flange, reaching out along -x. A hook looped round the rod near
# its end holds the plate through its hole, free to swing.
top = -gear.length - gear.wall
half = ROD_SIDE / 2
z = top - half
rod = trusty.affine.add_affine_body(
world, *box_surface((-ARM_LENGTH - 0.01, -half, top - ROD_SIDE), (0.01, half, top)),
density=DENSITY, stiffness=RIGID)
trusty.affine.add_fixed_joint(world, rod, (0, 0, top), (0.01, 0, 0), (0, 0.01, 0),
body_j=flange, stiffness=RIGID)
hook = np.array([-ARM_LENGTH, 0.0, z])
V, F = weight_plate(args.weight, hook)
c, s = np.cos(PLATE_SWING), np.sin(PLATE_SWING)
V = hook + (V - hook) @ np.array([[c, s, 0], [-s, c, 0], [0, 0, 1]])
weight = trusty.affine.add_affine_body(world, V, F, density=args.weight / closed_volume(V, F),
stiffness=RIGID)
trusty.affine.add_spherical_joint(world, weight, tuple(hook), body_j=rod, stiffness=RIGID)
for body in (rod, weight):
trusty.contact.exclude_body_from_contact(world, body)