Skip to content

feat: expose joint_follow, the joint impedance channel - #13

Merged
thetooler merged 1 commit into
mainfrom
feat/joint-follow-entry
Oct 16, 2026
Merged

thetooler merged 1 commit into
mainfrom
feat/joint-follow-entry

Conversation

@thetooler

Copy link
Copy Markdown
Contributor

Summary

The firmware has had CMD_JOINT_FOLLOW (0x08) for some time and this SDK had no entry for
it. It sat in preexisting_gaps(), and the note there says what that registration means:
not "deliberately not exposed" but "not done yet". This adds the entry.

Changes

  • Arm::joint_follow(q, dq, kp, kd) sends 16N bytes and no tau: the feedforward (gravity,
    the joint limit wall) stays the firmware's business, computed every tick from the
    stiffnesses in the frame.
  • The command moves out of preexisting_gaps() into the coverage table. Three tables have to
    agree and each is asserted: the coverage table, the gaps table, and the coverage harness,
    whose two sentinels refuse a command no test sends and a public entry that is not registered.
  • The declaration records the cost of the channel: it enters a session in which the safety
    envelope's overspeed and position rules are waived, so the host becomes the only bound on
    the arm.

Testing

$ cmake -S . -B /tmp/cpp_test_build -DLITEARM_BUILD_TESTS=ON -DLITEARM_BUILD_EXAMPLES=ON
$ cmake --build /tmp/cpp_test_build -j
$ ctest --output-on-failure

100% tests passed, 0 tests failed out of 29

The following tests did not run:
	 22 - test_protocol_sync (Skipped)

Consumers: nexform-tech/litearm-ros2-control's joint_follow path needs this entry, and its
CI checks litearm-cpp out at its default branch. Its PR therefore stays red until this one
merges.

The firmware has had CMD_JOINT_FOLLOW (0x08) for some time and this SDK had no
entry for it. It was registered in preexisting_gaps() rather than in
firmware_only_cmds(), and the note there says what that registration means: not
"deliberately not exposed" but "not done yet", with a standing instruction that the
entry is not a resting place - either add it or rule that the absence is
intentional. This adds it.

Arm::joint_follow(q, dq, kp, kd) sends q + dq + kp + kd, 16N bytes, and no tau: the
feedforward is the firmware's, computed every tick from gravity and the joint limit
wall, and the frame carries only the stiffnesses. The gap table is empty again and
the coverage table has the command.

What the command is for, and what it costs, is on the declaration: it enters a
session in which the safety envelope's overspeed and position rules are waived, so
the host is the only bound. That is the point of it - it is the channel for real
time following without the rate limiting the other paths apply - and it is also the
thing to know before reaching for it.

Three tables had to agree and each is asserted: the coverage table, the gaps table,
and the coverage harness, whose two sentinels refuse a command no test sends and a
public entry that is not registered.
@thetooler
thetooler merged commit 75eeb3c into main Oct 16, 2026
1 check passed
@thetooler
thetooler deleted the feat/joint-follow-entry branch October 16, 2026 03:28
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions Bot added the released Shipped in a release label Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant