Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Make hardwired tolerances configurable via a tol parameter (in units of eps)

未關閉
#268 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
45/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
python
領域
backend

研究方向

Start by auditing the package for literal tolerances and calls that rely on lower-level defaults, then trace how tolerance flows through base, SO3, SE3, and UnitQuaternion; the issue names UnitQuaternion.AngVec, SO3.AngleAxis, SE3.AngleAxis, and angvec2tr as examples. Add tol where a tolerance affects results, preserving current defaults and documenting it. Add a test for each changed function showing that tol takes effect.

由索引模型根據 Issue 內容生成。

描述

enhancement

Summary

Any function that applies a hardwired numerical tolerance should expose it as a tol parameter, expressed in units of machine epsilon (eps), so that callers can tighten or loosen it for their application.

Convention

The base module already follows this pattern in places, for example unitvec, iszero, iszerovec, isunitvec and angvec2r: tol is a multiple of eps (default 20), and a quantity is treated as zero when abs(x) < tol * eps. This issue is to apply it consistently.

Scope

  • Audit the package for literal tolerances (e.g. 1e-6, 1e-12), and for calls that rely on the default tolerance of a lower-level function.
  • Where a tolerance affects the result, add a tol parameter in units of eps, with a default that preserves current behaviour, and document it in the docstring.
  • Where the tolerance is used deep inside a base function, pass tol through every intermediate function, so a caller of a high-level method such as an SO3 or UnitQuaternion constructor can still control it. This may require adding the parameter to several functions in a call chain.

Example

UnitQuaternion.AngVec (see #266) now tests the angle with smb.iszero(theta), which uses the default tolerance. A caller cannot change it. It should accept tol and pass it to iszero, and the same applies to SO3.AngleAxis, SE3.AngleAxis and angvec2tr, which call angvec2r (which already has tol, see #267) but do not expose it.

Notes

  • Keep defaults unchanged so there is no behaviour change for existing code.
  • Add a test per changed function showing that tol takes effect.

🤖 Generated with Claude Code

主要語言
Python
星號
648
分支
108
平均合併
9 天 19 小時
30 天內合併 PR
9

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

rai-opensource/spatialmath-python 的其他 Issue

查看 rai-opensource/spatialmath-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。