refactor(ets): follow-ups to fixjoint (#740)
Follow-up to #740, which added ETS.fixjoint and ETS2.fixjoint (closes #724). The feature works and is tested; these are the tidy-ups found in review, none of them blocking.
Help wanted, all small:
- [ ]
fixjointis the same code inETS.pyandETS2.py. Move it once intoBaseETS(ets/_ETS.py), with the tests shared, so a fix is made in one place. - [x] Add a worked example to the docstring, under
.. runblock:: pycon, showing a flipped joint,unit="deg", and a robot'sets()with a joint fixed. Add.. versionadded::too. Done in #877. - [ ] Add
fixjointto the Modification tables on the ETS documentation pages (docs/source/ets_3d.rstandets_2d.rst) and to the lists of members in the Details sections. - [x] Reject a
boolas the joint index.isinstance(True, int)is true, sofixjoint(True, 0.1)currently fixes joint 1. Done in #836. - [ ] Check what happens to a joint with explicit
jindexvalues that leave a gap after fixing (the surviving indices are kept, as forsplit), and say so in the docstring; this ties in with #803, wherejindicesthat are not a permutation of0..n-1are not handled consistently. - [ ] Use it: an IK example that solves a 7-joint arm with one joint locked, in the IK documentation.
I'd like to take the boolean joint-index validation item in #825: reject True and False in ETS.fixjoint and ETS2.fixjoint, with focused CPU regression tests and unchanged integer-index behavior. I checked the current issue discussion and open PRs and did not find overlapping work on this item. I'll keep the other follow-ups out of scope.
Thanks for taking this on. It’s your!Peter.Sent from my iPhoneOn 19 Oct 2026, at 1:40 am, daoshi1593 @.***> wrote:daoshi1593 left a comment (petercorke/robotics-toolbox-python#825) I'd like to take the boolean joint-index validation item in #825: reject True and False in ETS.fixjoint and ETS2.fixjoint, with focused CPU regression tests and unchanged integer-index behavior. I checked the current issue discussion and open PRs and did not find overlapping work on this item. I'll keep the other follow-ups out of scope.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Hi Peter, I'd like to take the remaining fixjoint documentation follow-up in #825.
I'll add runnable examples for ETS.fixjoint() and ETS2.fixjoint(), covering flipped joints, degree-based values, and locking a joint in a robot's ETS, along with the versionadded directives.
I've already prepared the changes and verified that the full cross-platform test matrix passes. I'll keep this strictly documentation-only, separate from the boolean-index fix in #836.
Thanks!
I'd like to take the shared fixjoint implementation and tests item in #825. I checked the issue timeline and related PRs; the boolean validation and examples are already covered, and I'll leave the IK example and joint-index redesign to their existing work.
I'll move the common locking logic into BaseETS, retain the dimension-specific documentation, and share the regression cases between ETS and ETS2. The intended result is unchanged kinematics and public behaviour, including explicit indices, offsets, flips and joint limits. I'll use Codex and disclose the assistance and actual checks in the PR.