Printing SE3 with symbolic equations
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
The issue identifies the SE3 printing example, SE3_matrix.A, and NumPy formatting APIs, but no source file or test. Locate the SE3 printing entry point, reproduce the symbolic-matrix example, and verify that printed columns align to the longest term without changing the shown numeric formatting.
由索引模型根據 Issue 內容生成。
描述
Hello,
I noticed that matrices with long symbolic equations are printed very shrink.
I found my own priting method and I suggest to align them by the longest term like this:
def print_SE3(SE3_matrix : SE3):
SE3_numpy = SE3_matrix.A
max_item_length = SE3_numpy.astype(np.string_).dtype.itemsize
print(np.array2string(SE3_numpy,max_line_width=np.inf,precision=3,suppress_small=True,formatter = {'all':lambda x: f"{str(x):{max_item_length}}"}))
or:
def print_SE3(SE3_matrix : SE3):
SE3_numpy = SE3_matrix.A
max_item_length = SE3_numpy.astype(np.string_).dtype.itemsize
with np.printoptions(precision=3, suppress=True, linewidth = np.inf, formatter = {'all':lambda x: f"{str(x):{max_item_length}}"}):
print(SE3_numpy)
Results without print_SE3:
-1.0*sin(theta2)*cos(theta1) 1.0*sin(theta1) 1.0*cos(theta1)*cos(theta2) (d3 + l2)*cos(theta1)*cos(theta2)
-1.0*sin(theta1)*sin(theta2) -1.0*cos(theta1) 1.0*sin(theta1)*cos(theta2) (d3 + l2)*sin(theta1)*cos(theta2)
1.0*cos(theta2) 0 1.0*sin(theta2) l1 + (d3 + l2)*sin(theta2)
0 0 0 1
Results with print_SE3:
[[-1.0*sin(theta2)*cos(theta1) 1.0*sin(theta1) 1.0*cos(theta1)*cos(theta2) (d3 + l2)*cos(theta1)*cos(theta2)]
[-1.0*sin(theta1)*sin(theta2) -1.0*cos(theta1) 1.0*sin(theta1)*cos(theta2) (d3 + l2)*sin(theta1)*cos(theta2)]
[1.0*cos(theta2) 0 1.0*sin(theta2) l1 + (d3 + l2)*sin(theta2) ]
[0 0 0 1 ]]
I know that this function could be better so the inner columns should have less separation but I think it's good first step towards the good change.
- 主要語言
- Python
- 星號
- 642
- 分支
- 102
- 平均合併
- 59 分鐘
- 30 天內合併 PR
- 2
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
rai-opensource/spatialmath-python 的其他 Issue
-
enhancement
難度 2/5 1-3 小時 新手友好度 65/100
rai-opensource/spatialmath-python#32 · 4 則留言 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 72/100
rai-opensource/spatialmath-python#231 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 50/100
rai-opensource/spatialmath-python#177 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 42/100
rai-opensource/spatialmath-python#171 ·
維護者通常 1 天內回覆
-
trinterp() returns invalid rotations in transform matrix可能已有人在做 @tweng-bdai 於 589 天前認領。 未關閉bug
rai-opensource/spatialmath-python#165 · 2 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 rai-opensource/spatialmath-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 88/100
BasedHardware/omi#20271 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 92/100
openai/openai-cookbook#3153 ·
維護者通常 1 天內回覆
-
cvss-severity:high devguard l3montree-cybersecurity/devguard/devguard pkg:golang/github.com/l3montree-dev/devguard risk:low state:open
難度 2/5 1-3 小時 新手友好度 65/100
l3montree-dev/devguard#3146 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
-
bug confirmed issue
難度 2/5 1-3 小時 新手友好度 76/100
open-webui/open-webui#31849 · 2 則留言 ·
維護者通常 1 天內回覆