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
- Open Inspect, on its /joint_states view.
- Send the arm to
rest, the folded pose, with its button under the joints. - Now send it
home, and watchvelocity. The joint with furthest to go sets the pace, and none passes 1.7434.
Joints · SO-101 follower
Limits from the description; speed capped at 1.7434 rad/s, the servo's datasheet derated. Poses from the profile.
Inspector
Code
The repository's own code behind what you do here appears once you move the arm.
Do it
Read the datasheet block.
grep -n -A14 "^servos:" src/threevn_robot_description/config/so101_follower.yamlExpect:
stall_torque_nm: 1.912andno_load_speed_rads: 4.712, withprovenance: datasheetand a comment on why sellers disagree.Read the derating, and work out the two limits by hand.
grep -n -A7 "^limit_derate:" src/threevn_robot_description/config/so101_follower.yamlExpect:
effort: 0.68andvelocity: 0.37. So 1.912 × 0.68 and 4.712 × 0.37. Write both answers down.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, theneffort="1.3002" velocity="1.7434": your two answers, rounded. The position limits are the same on both lines.Break it. In
so101_follower.yaml, raiselimit_derate.effortto1.2and run the suite.make testExpect:
test_limits_never_exceed_what_the_servo_can_deliverfails, and so doestest_upstreams_placeholder_limits_are_replaced. The first is the rule; the second notices that the limit is climbing back toward upstream's placeholder.Revert, and confirm green.
git checkout src/threevn_robot_description/config/so101_follower.yaml make test
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.