Printing SE3 with symbolic equations
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
調査の方向性
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
- スター
- 641
- フォーク
- 102
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 4
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rai-opensource/spatialmath-python のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
rai-opensource/spatialmath-python#32 · コメント 4 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 50/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
-
bug
rai-opensource/spatialmath-python#165 · コメント 2 件 · 担当者 1 名 ·
-
rai-opensource/spatialmath-python#143 · コメント 8 件 · 担当者 1 名 ·
rai-opensource/spatialmath-python の issue をすべて見る
似ている issue
-
link-check link-check:sphinx-theme
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100