Skip to content

perf!: drop per-header optimize pragmas; move generic roadmap items upstream - #25

Merged
gabrielfrasantos merged 4 commits into
mainfrom
claude/peaceful-hawking-7sef6o
Oct 23, 2026
Merged

gabrielfrasantos merged 4 commits into
mainfrom
claude/peaceful-hawking-7sef6o

Conversation

@gabrielfrasantos

Copy link
Copy Markdown
Contributor

Summary

Code (breaking)

  • Removes the unscoped #pragma GCC optimize("O3", "fast-math") from every robotics header, mirroring perf!: stop setting optimization options per header and per function numerical-toolbox-cpp#348. GCC won't inline across differing optimization options, so these pragmas blocked inlining. Because they had no push/pop, they also turned on fast-math in every translation unit that included a robotics header.
  • Bumps the numerical-toolbox pin to 9b37e08, which contains #348.
  • AGENTS.md, CLAUDE.md, the Copilot instructions, the agents, roadmap/DEPLOYMENT.md and every spec's deployment note now forbid optimize pragmas and leave optimization flags to the consumer.

BREAKING CHANGE: robotics headers no longer force O3 and fast-math. Consumers that want them pass flags for whole translation units, e.g. -O2/-O3 -ffast-math -fno-finite-math-only.

Roadmap (specs only)

  • SE(3): the local spec is deleted. Specs now use upstream math::SE3Transform (NT53), which adopts this repo's linear-first (v; ω) / (f; n) ordering.
  • Moved whole upstream: M2, M3 and M9 (motion profiles → NT55, NT56, NT60) and M4 (friction → NT57). Their numbers are retired.
  • Reduced to the robot-specific part:
    • M33 is a thin wrapper over upstream math::CubicSpline (NT61) and now owns JointTrajectoryState.
    • M14 → NT62; M22 → NT63; M34 → NT58.
    • M13 and M23 → NT64. Pose IK keeps its manipulability damping as a damping policy; Stewart forward kinematics keeps its SE(3) retraction.
    • M21 → NT54.
  • M25 gains DistributeExact on NT65 (dense QP). On a spatial 8-cable robot, Pott's improved closed form failed on 90 of 4000 feasible wrenches sampled near the workspace boundary; a test case for this is included.
  • M27 keeps its own two-variable LP, because the QP solver needs a strictly convex cost.
  • M11 and M14 now factor the wide Jacobian directly.
  • ROADMAP.md gains an "Upstream prerequisites" table (NT53–NT65) with spec links and the items that use each. M14, M22 and M33 each drop one difficulty tier.

Dependency

Depends on embedded-pro/numerical-toolbox-cpp#353, which adds the wide-matrix SVD and the NT53–NT65 specs. The NT spec links point at upstream main and resolve once #353 merges; the pin then needs bumping to that merge commit.

Verification

  • cmake --preset host-single-Debug + build + ctest: 2/2 pass on the new pin; the baseline before the change was also 2/2.
  • All relative markdown links in ROADMAP.md, README.md, AGENTS.md, TESTING.md and roadmap/ resolve.
  • Every spec's Roadmap ref tier matches its ROADMAP.md difficulty.
  • The Qt simulator was not built (no Qt6 in this environment).

Generated by Claude Code

Mirrors embedded-pro/numerical-toolbox-cpp#348 and bumps the
numerical-toolbox pin to 9b37e08, which carries it.

Every robotics header applied an unscoped #pragma GCC optimize("O3",
"fast-math"). GCC does not inline across differing optimization
options, so toolbox helpers could not be inlined into consumer code,
and the unscoped pragma leaked fast-math into every translation unit
that included a robotics header.

- Drop the pragma from all robotics headers.
- AGENTS.md, CLAUDE.md, the Copilot instructions, the agents, the
  roadmap recipe and every spec's deployment note forbid optimize
  pragmas/attributes and leave the optimization level and
  floating-point model to the consumer, per translation unit.

BREAKING CHANGE: robotics headers no longer force O3 and fast-math.
Consumers that want them pass them for whole translation units, e.g.
-O2/-O3 -ffast-math -fno-finite-math-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mmp77ieEy16GxJL8KsLsVx
numerical-toolbox's SingularValueDecomposition now accepts Rows < Cols,
so ManipulabilityIndex (M11) and RedundancyResolution (M14) decompose
the task Jacobian itself instead of its transpose and no longer swap
the singular-vector factors by hand. Both need a numerical-toolbox pin
that includes the wide-matrix change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mmp77ieEy16GxJL8KsLsVx
The SE(3) spec existed twice: roadmap/kinematics/SE3Transform here and
roadmap/math/SE3Transform in numerical-toolbox-cpp, with opposite
6-vector orderings and the same id (M6). SE(3) is generic, so the
upstream spec is now the only one; it adopts this repo's linear-first
convention, twists (v; ω) and wrenches (f; n), and its PoseError.

- Delete roadmap/kinematics/SE3Transform and the M6 row.
- Specs use math::SE3Transform / math::Vector6 from
  numerical/math/SE3Transform.hpp and depend on NT53.
- ROADMAP.md gains an "Upstream prerequisites" table: generic items are
  referenced as NT<n>, numerical-toolbox's master-list number.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mmp77ieEy16GxJL8KsLsVx
Generic parts of this roadmap are now specified upstream in
numerical-toolbox-cpp; robotics items keep only the robot-specific
part and depend on NT<n>:

- Moved whole: M2 polynomial, M3 trapezoidal and M9 S-curve profiles
  (NT55, NT56, NT60, new upstream motion_profiles module) and M4
  friction compensation (NT57). Their specs and numbers are retired.
- M33 is a thin joint-space wrapper over math::CubicSpline (NT61, with
  the Thomas solve NT59) and now owns JointTrajectoryState.
- M14 binds the task Jacobian to solvers::DampedPseudoInverse (NT62).
- M22 feeds regressor rows to IncrementalQrLeastSquares (NT63).
- M34 adapts ABA to SemiImplicitEuler (NT58) and RungeKutta4.
- M13 and M23 run their damped Newton iterations on
  LevenbergMarquardt (NT64): pose IK keeps its manipulability damping
  as a damping policy, Stewart FK its SE(3) retraction.
- M21 wraps joint angles with WrapToPi (NT54).
- M25 gains DistributeExact on ActiveSetQp (NT65) for the workspace
  boundary, where the improved closed form fails (spatial 8-cable
  fixture: 90 of 4000 boundary-biased feasible wrenches); M27 keeps its
  two-variable stage LPs, which a strictly convex QP cannot express.

ROADMAP.md lists NT53–NT65 with spec links and consumers; M14, M22 and
M33 drop one tier now that the numerics live upstream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mmp77ieEy16GxJL8KsLsVx
@github-actions

Copy link
Copy Markdown

✅⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 7 0 0 0.51s
✅ CPP clang-format 35 0 0 0 0.49s
✅ CPP cppcheck 35 0 0 0.74s
✅ DOCKERFILE hadolint 1 0 0 0.48s
✅ JSON jsonlint 8 0 0 0.08s
✅ JSON prettier 8 2 0 0 0.31s
✅ MARKDOWN markdownlint 116 0 0 0 1.54s
✅ MARKDOWN markdown-table-formatter 116 0 0 0 0.17s
⚠️ SPELL lychee 150 13 0 2.03s
✅ YAML prettier 12 0 0 0 0.41s
✅ YAML yamllint 12 0 0 0.48s

Detailed Issues

⚠️ SPELL / lychee - 13 errors
📝 Summary
---------------------
🔍 Total..........112
🔗 Unique..........55
✅ Successful......89
⏳ Timeouts.........0
🔀 Redirected.......5
👻 Excluded.........9
❓ Unknown..........0
🚫 Errors..........13
⛔ Unsupported.....13

Errors in .github/workflows/static-analysis.yml
[403] https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$ (at 37:21) | Rejected status code: 403 Forbidden

Errors in ROADMAP.md
[404] https://github.com/embedded-pro/numerical-toolbox-cpp/blob/main/roadmap/controllers/FrictionCompensation/implementation.md (at 47:89) | Rejected status code: 404 Not Found
[404] https://github.com/embedded-pro/numerical-toolbox-cpp/blob/main/roadmap/estimators/offline/IncrementalQrLeastSquares/implementation.md (at 53:89) | Rejected status code: 404 Not Found
[404] https://github.com/embedded-pro/numerical-toolbox-cpp/blob/main/roadmap/math/AngleUtilities/implementation.md (at 44:89) | Rejected status code: 404 Not Found
[404] https://github.com/embedded-pro/numerical-toolbox-cpp/blob/main/roadmap/math/CubicSpline/implementation.md (at 51:89) | Rejected status code: 404 Not Found
[404] https://github.com/embedded-pro/numerical-toolbox-cpp/blob/main/roadmap/math/TridiagonalSolver/implementation.md (at 49:89) | Rejected status code: 404 Not Found
[404] https://github.com/embedded-pro/numerical-toolbox-cpp/blob/main/roadmap/motion_profiles/PolynomialProfile/implementation.md (at 45:89) | Rejected status code: 404 Not Found
[404] https://github.com/embedded-pro/numerical-toolbox-cpp/blob/main/roadmap/motion_profiles/SCurveProfile/implementation.md (at 50:89) | Rejected status code: 404 Not Found
[404] https://github.com/embedded-pro/numerical-toolbox-cpp/blob/main/roadmap/motion_profiles/TrapezoidalProfile/implementation.md (at 46:89) | Rejected status code: 404 Not Found
[404] https://github.com/embedded-pro/numerical-toolbox-cpp/blob/main/roadmap/optimization/LevenbergMarquardt/implementation.md (at 54:89) | Rejected status code: 404 Not Found
[404] https://github.com/embedded-pro/numerical-toolbox-cpp/blob/main/roadmap/solvers/ActiveSetQp/implementation.md (at 55:89) | Rejected status code: 404 Not Found
[404] https://github.com/embedded-pro/numerical-toolbox-cpp/blob/main/roadmap/solvers/DampedPseudoInverse/implementation.md (at 52:89) | Rejected status code: 404 Not Found
[404] https://github.com/embedded-pro/numerical-toolbox-cpp/blob/main/roadmap/solvers/SymplecticIntegrators/implementation.md (at 48:89) | Rejected status code: 404 Not Found

Hint: Followed 5 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.
Hint: You can configure accepted/rejected response codes with `-a` or `--accept`

Notices

⚠️ Your configuration references items that have been removed from MegaLinter and are ignored: REPOSITORY_GITLEAKS, REPOSITORY_KICS. See Removed linters to find their replacements.

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.1.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,CPP_CPPCHECK,CPP_CLANG_FORMAT,DOCKERFILE_HADOLINT,JSON_JSONLINT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@sonarqubecloud

Copy link
Copy Markdown

@gabrielfrasantos
gabrielfrasantos merged commit b054159 into main Oct 23, 2026
9 checks passed
@gabrielfrasantos
gabrielfrasantos deleted the claude/peaceful-hawking-7sef6o branch October 23, 2026 14:34
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.

2 participants