Theme
Stage 2 · lesson 6 of 6 · 25 min

Limits come from the datasheet

You will: Derive effort and speed limits from the motors that must deliver them, and prove no joint exceeds them.

Builds on A robot is a tree.

A joint's limits are not only where it may go. They also say how hard it may push — effort — and how fast it may turn. Both come from the motor that has to deliver them: here, six Feetech STS3215 bus servos, whose figures sit in the profile's servos: block with provenance: datasheet.

The reason is the whole point of a simulator in this project. An effort limit above the servo's stall torque lets the simulated arm perform motions the real one cannot. The motion succeeds in Gazebo and stalls on the bench — the sim-to-real gap this platform exists to catch before it costs a servo.

The SO-101 makes that concrete. Upstream's URDF declares effort="10" and velocity="10" on every joint. Those are placeholders: 10 N·m is about five times the 1.9 N·m an STS3215 stalls at. Left alone, the simulated arm would lift what the real one cannot. So the overlay replaces both with figures derived from the datasheet, and a test fails if any joint is configured beyond what its servo can deliver.

Both are derated. The official bill of materials runs these 7.4 V servos from a 5 V supply, and torque and speed fall roughly with voltage, so the usable share is about 5 / 7.4. Speed is derated further, because a datasheet's no-load speed is a best case that a loaded motor never reaches. The supply derating is an estimate, marked as one in the profile. These servos report their own load and speed, so the first session on the physical arm is planned to measure it.

This test checks configuration against capability. It cannot tell you whether the arm can hold itself up — that needs masses, lengths and gravity. The simulator measures that, and the arm holds every named pose inside its derated limit of 1.30 N·m.

In the simulation

The lab moves every joint no faster than the limit this lesson derives, 4.712 × 0.37 = 1.7434 rad/s, so a long move takes as long in the page as on the arm.

Kinematic: joints move at their real speed limit, but there is no gravity, no load and no physics. That is what the steps below are for.

The SO-101 loads as you reach it.

In this lesson

  1. Open Inspect, on its /joint_states view.
  2. Send the arm to rest, the folded pose, with its button under the joints.
  3. Now send it home, and watch velocity. The joint with furthest to go sets the pace, and none passes 1.7434.

Do it

  1. Read the datasheet block.

    grep -n -A14 "^servos:" src/threevn_robot_description/config/so101_follower.yaml
    

    Expect: stall_torque_nm: 1.912 and no_load_speed_rads: 4.712, with provenance: datasheet and a comment on why sellers disagree.

  2. Read the derating, and work out the two limits by hand.

    grep -n -A7 "^limit_derate:" src/threevn_robot_description/config/so101_follower.yaml
    

    Expect: effort: 0.68 and velocity: 0.37. So 1.912 × 0.68 and 4.712 × 0.37. Write both answers down.

  3. Compare upstream's limits with the ones that run.

    grep -m1 "<limit" vendor/so101/so101.urdf
    make urdf 2>/dev/null | grep -m1 "<limit"
    

    Expect: effort="10" velocity="10" upstream, then effort="1.3002" velocity="1.7434": your two answers, rounded. The position limits are the same on both lines.

  4. Break it. In so101_follower.yaml, raise limit_derate.effort to 1.2 and run the suite.

    make test
    

    Expect: test_limits_never_exceed_what_the_servo_can_deliver fails, and so does test_upstreams_placeholder_limits_are_replaced. The first is the rule; the second notices that the limit is climbing back toward upstream's placeholder.

  5. Revert, and confirm green.

    git checkout src/threevn_robot_description/config/so101_follower.yaml
    make test
    
You will know it worked when: You derived the SO-101's effort and velocity limits by hand, found them in the running description, and watched the suite reject a derating above 1.

When it goes wrong

A motion works every time in simulation and stalls on the real arm.

Why: The simulated joint was allowed more torque than the real servo has. Upstream's effort="10" is exactly this.

Fix: Derive effort from the datasheet, and let test_so101_profile.py hold the line.

The limits look right but the arm is weaker than predicted on the bench.

Why: The derating assumes a 5 V supply. A different supply, or a seller's figure for a different voltage, changes the real number.

Fix: Measure it. The servos report their own load, so a bench session can replace estimated with measured.

Terms

Stall torque
The most torque a motor produces, at zero speed. Commanding more than this cannot work on the real hardware.
Derating
Deliberately using less than a datasheet's best-case figure, to allow for load, voltage and wear.

Every term in the course: glossary.

Check yourself

Answer in your head first, then open it.

Upstream's effort of 10 N·m is too high. Why is that a simulation bug rather than a hardware one?

The real servo simply cannot exceed its stall torque. The simulator can, so it validates motions the arm will never perform.

Why is the effort derated by 0.68 when the datasheet already gives a stall torque?

The datasheet figure is for 7.4 V and the official build supplies 5 V. Torque falls roughly with voltage, and 5 / 7.4 is about 0.68. It is an estimate until someone measures it.

Stretch

Estimate the torque shoulder_lift needs to hold the arm straight out horizontally. Use the masses in the description (`make urdf | grep "

Hint

The upper arm is about 0.116 m from shoulder to elbow and the forearm about 0.135 m from elbow to wrist. Treat each link's mass as sitting at its middle, and put the wrist and gripper masses at the wrist.

Going deeper