Skip to content

refactor(ets): follow-ups to fixjoint (#740) #825

Open

Description

@petercorke

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:

  • fixjoint is the same code in ETS.py and ETS2.py. Move it once into BaseETS (ets/_ETS.py), with the tests shared, so a fix is made in one place.
  • Add a worked example to the docstring, under .. runblock:: pycon, showing a flipped joint, unit="deg", and a robot's ets() with a joint fixed. Add .. versionadded:: too. Done in docs(ets): add fixjoint examples and version markers #877.
  • Add fixjoint to the Modification tables on the ETS documentation pages (docs/source/ets_3d.rst and ets_2d.rst) and to the lists of members in the Details sections.
  • Reject a bool as the joint index. isinstance(True, int) is true, so fixjoint(True, 0.1) currently fixes joint 1. Done in fix(ets): reject boolean joint indices in fixjoint #836.
  • Check what happens to a joint with explicit jindex values that leave a gap after fixing (the surviving indices are kept, as for split), and say so in the docstring; this ties in with ETS/ETS2: one joint-index resolver; the all-or-none, unique guarantee breaks under concatenation and insert #803, where jindices that are not a permutation of 0..n-1 are not handled consistently.
  • Use it: an IK example that solves a 7-joint arm with one joint locked, in the IK documentation.

Activity

  1. daoshi1593 commented on Oct 18, 2026

    @daoshi1593
    Contributor

    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.

  2. petercorke commented on Oct 19, 2026

    @petercorke
    OwnerAuthor
  3. huxiaoyi-ovo commented on Oct 21, 2026

    @huxiaoyi-ovo
    Contributor

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions