Jacobians & Velocity Control, step 3
Resolved-rate control
Command the gripper's velocity: invert the Jacobian 100 times a second and draw a circle in the air.
Builds on Feedback: P and PD control and Direction, distance & the dot product, from the free Foundations.
Write and run this step in the simulator with ProSteering by velocity
Many tasks are easiest to state as a gripper velocity: "slide left at 5 cm/s" or "follow this curve". The Jacobian turns that into joint speeds:
is , so it has no ordinary inverse. The pseudo-inverse (np.linalg.pinv) picks the smallest that produces . arm.jacobian(q) gives you the exact from Step 2.
The arm takes position targets, so every control tick you integrate those speeds into a commanded configuration:
This is resolved-rate control.
Feedback
Each tick is a straight-line guess at a curved motion, so pure feed-forward slowly drifts off the path. Add a correction towards where you should be:
Compare against , not the measured position. The joint servos trail the command by about 30 ms. They all trail by about the same amount, so the lag delays the path without bending it. Feeding the measured position back would pull that lag into your loop.
The circle
The circle has radius cm around in the vertical – plane, with and :
Your task
Fill in rate_step and the feed-forward velocity. phase("approach") servos to the start point using feedback alone. phase("draw") then makes one revolution in 4 s through the yellow rings. The Plots tab shows the gripper's distance from the centre.
To pass, stay within 5 mm of the circle and of the plane , and go at least 90% of the way round.