Repository navigation
docs: correct the singular-pose claim, three API notes and two examples - #23
Merged
Merged
Conversation
A walkthrough was run on real hardware, following only what this
repository documents. Several steps either fail outright or mislead;
this corrects the documentation without changing any code.
Quick start: the arm boots into the EMERGENCY latch, so enable() was
rejected with ERR{0x10,0x06} before a single motion. Add the reset()
that clears it, replace the fully extended joint pose -- a singular
pose no Cartesian motion can be planned out of -- with one whose
joints all stay clear of their limits, and drive the Cartesian moves
from the measured TCP instead of a hand-written pose with no IK
solution.
Also documents serial permissions, the save_params() and
clear_faults() preconditions, the state frame's mode and flags, the
ROS 2 pytest failure, and links the troubleshooting guide, which had
no entry point from the README.
Follow-up to the onboarding walkthrough in #18, which covers the quick start, the install steps and the serial permissions. What is left here is the part that walkthrough did not reach. The blocking one is TROUBLESHOOTING.md:144, which says a cartesian move from the fully-extended home pose "always" fails with err=1. Measured on hardware: a 1-4 mm step is accepted and reconstructs the arm by 13-60 deg while the tool moves 1-3 mm. The gate catches large steps, not small ones, so "always" sends the reader the wrong way about the one pose that is actually dangerous. examples/03_move_p.py described its default as "a small step you can step back from". From the zero pose the same 1 cm target reconstructs the arm by 86.88 deg (J1 74 deg, J3 52 deg) and the script still prints move_p arrived. The mechanism is firmware-side: move_p reaches the bus through kin_runner_request_move_p, which has no adjacent-solution gate, while move_l/move_c/move_path go through cart_plan.c and reject a jump beyond CART_MAX_IK_STEP (0.35 rad). Both this example and examples/06_cartesian.py now leave the singularity before issuing a cartesian command. Three API claims corrected in docs/DEVELOPER_GUIDE.md and README.md: * wait=False skips only the wait for the arm to settle. Both values block for the plan reply, so poll_cart() never yields a result from one -- its real use is recovering a call whose ACK timed out. * enable() returns before the state stream reflects it: 2.0-2.7 ms to return against 7.0-7.8 ms for the flag to turn true, so reading enabled on the next line always shows False. Also recorded in the docstring. * the cartesian snippet used three absolute poses with rpy=(pi,0,0), an orientation that solves only about half the time; it now offsets the measured pose. Testing: LITEARM_LIVE=1 pytest -> 659 passed. Both examples and the revised snippet run against the arm: 03_move_p.py --go EXIT=0, 06_cartesian.py --go EXIT=0 (n_wp 5/7/9/6).
X-F-R
force-pushed
the
docs/first-contact-corrections
branch
from
October 10, 2026 09:50
eaaff53 to
dac30ee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to the onboarding walkthrough in #18, which already covers the quick start, the
install steps and the serial permissions. This is the part that walkthrough did not reach.
Base is
docs/fix-new-user-onboardingso the diff shows only these changes. The diffagainst
mainincludes #18 as well.The blocking one:
TROUBLESHOOTING.md:144says a cartesian move from the fully-extendedhomepose "always" fails witherr=1. Measured on hardware, a 1-4 mm step isaccepted and reconstructs the arm by 13-60 deg while the tool moves 1-3 mm. The gate
catches large steps, not small ones, so "always" sends the reader the wrong way about the
one pose that is actually dangerous. Same finding as #19 §1.
examples/03_move_p.pydescribed its default as "a small step you can step backfrom". From the zero pose the same 1 cm target reconstructs the arm by 86.88 deg
(J1 74 deg, J3 52 deg) and the script still prints
move_p 到位. The mechanism is on thefirmware side and the example cannot fix it:
move_preaches the bus throughkin_runner_request_move_p(kin_runner.c:196), which has no adjacent-solution gate atall, while
move_l/move_c/move_pathgo throughcart_plan.c:1029and reject ajump beyond
CART_MAX_IK_STEP = 0.35 rad. At a healthy pose the same call is 5 deg ofmotion, so this is "do not start from the singularity", not "move_p is broken".
Changes
TROUBLESHOOTING.md,TROUBLESHOOTING.zh-CN.md— replace the "always" claim with themeasured boundary, and add the measured ratio as a discriminator.
docs/DEVELOPER_GUIDE.md,docs/DEVELOPER_GUIDE.zh-CN.md— §5.1 and §5.3:wait=Falseskips only the wait for the arm to settle. Both values block for theplan reply, so
poll_cart()never yields a result from one; its real use isrecovering a call whose ACK timed out.
cart._request_and_waitcalls_cart.waitunconditionally, which confirms it.
enable()returns before the state stream reflects it: 2.0-2.7 ms to returnagainst 7.0-7.8 ms for
get_state().enabledto turn true, so reading it on thenext line always shows
False.src/litearm/arm.py— theenable()docstring carries the same measurement. This isthe only source change in this PR; it is a docstring, not behaviour.
README.md,README.zh-CN.md— the API reference cartesian snippet used threeabsolute poses with
rpy = (pi, 0, 0). That orientation solves only about half thetime in a 135-pose sweep (51-53% against 100% for
(0, 0, pi)); the snippet nowoffsets the measured pose. (The quick start and install sections are docs: fix the onboarding gaps found by a new-user walkthrough #18's, untouched
here.)
examples/03_move_p.py— docstring corrected; the example bends a joint beforeissuing
move_p.examples/06_cartesian.py— same first step. From the zero pose all three of itscartesian entry points are refused (
err=1): safe, but the example never ran.Testing
Documentation and two example scripts, plus one docstring.
The 3 failures are pre-existing on
mainand unrelated to this PR:test_every_firmware_literal_err_code_is_registered,test_symbolic_site_manifest_matches_firmware,test_bench_model_axis_matches_sdk_constant. They need alitearm-stm32checkout to runat all, and #21 fixes them.
Both examples and the revised snippet run against the arm:
Issues
Refs #19 — the
TROUBLESHOOTING.md:144half of that report. The other half (overlappingcartesian commands losing replies) is untouched: it is firmware-side and this PR does not
address it.