Skip to content

[DO NOT MERGE] Integration: PR backlog - #269

Draft
taughz wants to merge 36 commits into
masterfrom
integration/2026-10
Draft

taughz wants to merge 36 commits into
masterfrom
integration/2026-10

Conversation

@taughz

@taughz taughz commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Do not merge this PR. It is a hub for integration testing the open PR backlog against internal RAI software. The branch stages the PRs listed below, one --no-ff merge commit per PR in merge order, so they can be tested together. Once that passes, the individual PRs are approved and merged to master in this order (ticking them off here), and this hub is closed.

The branch is rebuilt (force-pushed) whenever a contained PR changes or lands on master. Do not rebase it: that would flatten the per-PR merge commits.

Contained PRs (merge order)

High-priority PRs first, then the rest roughly oldest first, with related PRs kept adjacent. Simulated merges show no textual conflicts in this order.

petercorke and others added 30 commits October 13, 2026 11:33
pre-commit was added to [project].dependencies in #98 along with the
black hook, so every 'pip install spatialmath-python' also installs
pre-commit and its dependency tree (virtualenv, identify, cfgv, nodeenv,
...).  spatialmath never imports it.

This is not just bloat.  It makes the install fail anywhere a transitive
pin conflicts: virtualenv 21.14.7 requires packaging>=26.3, and Pyodide
(JupyterLite, in-browser) ships packaging 24.2, so
micropip.install('spatialmath-python') raises ValueError.  Downstream
JupyterLite notebooks of the Robotics, Machine Vision and bdsim toolboxes
are affected.

Move it to the dev extra, which the CI workflows already install, and
make the README's contributor instructions install it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Two docstrings containing LaTeX (\mat, \vec, \times) were not raw
strings, so compiling the package gives 'invalid escape sequence'
SyntaxWarnings, and in UnitQuaternion.OA the \t of \times and the \v
of \vec are valid escapes that put a tab and a vertical tab into the
rendered documentation.  The OA docstring was rewritten with these in
#195 and the conjugation one predates it.

Add a test that compiles every module with warnings recorded so a
non-raw docstring with a backslash fails CI.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t-a-runtime-dependency

# Conflicts:
#	pyproject.toml
…ap parameter docs

- angle_std: the formula had sin in both components of the mean vector, it is
  cos and sin; say what R is, that the result is the same as
  scipy.stats.circstd, and what happens as R tends to zero
- angle_mean: the parameter was documented as v but is theta, and the range
  had a stray bracket; the result is in [-pi, pi]; say that a cancelling set
  of angles has no defined mean
- angle_wrap: the parameter was documented as v but is theta

Documentation only.
The length of the mean of the unit vectors, R, is at most 1 but rounding can
make it 1 + eps, so -2 * log(R) was a tiny negative number and its square root
nan, with 'invalid value encountered in sqrt'.  For example angle_std of 100
copies of -2.9.  33 of 378 combinations of angle and sample count failed.
Clamp at zero.
…E2.Ad

Twist2.ad was a copy of Twist3.ad that was never adapted to 2D: it called
skew() on the scalar w and built 6x6 blocks, so it raised ValueError for any
Twist2. It was also a property while Twist3.ad is a method, and its
docstring example called unit().

Rewrite it as a method returning the 3x3 matrix of the Lie bracket,

    [[0, -w, vy], [w, 0, -vx], [0, 0, 0]]

and return a list for a sequence, as skewa() does. Add Twist2.Ad() and
SE2.Ad() (tr2adjoint2 existed but only as a base function) to match
Twist3.Ad and SE3.Ad.

Also correct the 2D-specific text in tr2adjoint2's docstring, which named
tr2jac2 and said 6x6.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The formula never rendered and would not have rendered correctly:

- ``.. math:`` has a single colon, so reST treated the block as a comment.
- \skew is not a macro defined in docs/source/conf.py (\sk and \vex are).
- the braces of \skew{...} were unbalanced.
- there was a stray trailing X, and Ad was set in italic.

Write it with the project's macros, and use \SE{n} rather than \SE3, which
only worked because \SE takes one argument. The 3D docstring also named
tr2jac and its sizes; name tr2adjoint and give 6x6 for SE(3), 3x3 for SO(3).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d limits

A negative scalar previously produced reversed limits (-3 -> [3,-3,...]),
silently inverting the axes. A scalar is symmetric about zero, so use abs().

Document that min > max in the 2/4/6 element forms is passed through and
matplotlib inverts the axis. Add test_expand_dims.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t has one

A figure on a headless backend, or one not managed by pyplot, has no
window; the function then does nothing and returns False.  RTB and MVTB
each had their own copy with different guards.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ating a second one

axes_logic reuses the current axes when the current figure has axes, but when
the current figure had none, as after a bare plt.figure(), it called
plt.figure() again.  Every "new plot" idiom (plt.figure() followed by a plot_xxx
call) therefore left an empty figure behind, most visible with the ipympl
backend where figures stay open in notebooks.

Put the axes in the empty current figure instead.  new=True still always makes a
new figure, a dimension mismatch still makes a new figure, and a current figure
that has axes is reused as before.

Add direct tests of axes_logic (there were none): the existing behaviour, and the
empty-current-figure cases.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
angvec2r returned the identity whenever the axis norm was ~0, whatever
the angle, so a non-zero rotation about no axis silently gave the
identity (angvec2tr, SO3/SE3.AngleAxis and AngVec inherit this).

Test the angle for zero instead, which is what the docstring already
described for `tol`: a zero angle (within tol eps) returns the identity
and ignores the axis; otherwise the axis is normalized with unitvec,
which raises ValueError for a zero-length axis.

Consistent with UnitQuaternion.AngVec in #266.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@taughz taughz self-assigned this Oct 20, 2026

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants