Adapt to pgraph-python 1.0: plot() option names and the single Vertex class
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #741 @tandede による — マージされずにクローズ
評価
調査の方向性
Read pyproject.toml, mobile/PRMPlanner.py, mobile/PoseGraph.py, and mobile/LatticePlanner.py. Update the pgraph dependency and the listed calls and vertex classes, keeping PoseGraph.plot's public vopt and eopt keywords while forwarding them under the new names. Done when RTB uses pgraph-python 1.0 APIs without deprecation warnings; linked pull request #741 shows this work is already underway.
索引モデルが issue の本文から書いたものです。
説明
pgraph-python 1.0 renames the options of Graph.plot() and has a single Vertex class. RTB keeps working unchanged, but its calls will emit DeprecationWarnings. This issue is to adapt RTB, and to make PoseGraph forward its own option names so that RTB users never see them.
What changes in pgraph
plot() option names, which were cryptic and inconsistent (the old names keep working, with a DeprecationWarning, and passing both old and new is a TypeError):
| 0.6.5 | 1.0 |
|---|---|
vopt |
vertex_opt |
eopt |
edge_opt |
text (dict, or False to hide) |
text_opt (dict) and labels (bool) |
colorcomponents |
color_components |
force2d |
force_2d |
| (new) | arrow_opt: arrowhead options; a directed graph now draws arrowheads, and parallel edges and loops are drawn |
UVertex and DVertex are deprecated names for one Vertex class (a vertex has no direction of its own; the graph decides).
Changes in RTB
| File | Now | Change to |
|---|---|---|
mobile/PRMPlanner.py:312 |
self.graph.plot(text=False, vopt=vertex, eopt=edge, ax=ax) |
self.graph.plot(labels=False, vertex_opt=vertex, edge_opt=edge, ax=ax) |
mobile/PoseGraph.py:340 |
plot(colorcomponents=False, force2d=True, **kwargs) |
color_components=False, force_2d=True |
mobile/PoseGraph.py:448 |
eopt=eopt, force2d=True, colorcomponents=False |
edge_opt=eopt, force_2d=True, color_components=False |
mobile/PoseGraph.py:28 |
class PGVertex(pgraph.UVertex) |
pgraph.Vertex |
mobile/LatticePlanner.py:2,48 |
from pgraph import ... DVertex, class LatticeVertex(DVertex) |
Vertex |
PoseGraph.plot has its own public vopt= / eopt= keywords (lines 334-339 and 429-447). Please keep accepting those, so RTB's API does not change, but forward them to vertex_opt / edge_opt so RTB users see no deprecation warnings that they cannot act on.
PRMPlanner.plot already has the clearer vertex= / edge=, so only the call to graph.plot changes.
Ordering
The new names exist only from pgraph 1.0, and RTB's pyproject.toml lists plain pgraph-python with no lower bound. Use pgraph-python>=1.0.0 in the same change, otherwise PRMPlanner.plot raises TypeError: unexpected keyword 'labels' against an older pgraph.
Not affected
I surveyed RTB for the other 1.0 changes and found nothing else: no use of DGraph degree, connectivity or average_degree; no assignment to Edge.v1/v2; no UGraph(<positional>); no pickle or copy of graph objects; and graph.edges() is only iterated, so a list in place of a set is fine.
- 主要言語
- C++
- スター
- 3.5k
- フォーク
- 639
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 73
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
petercorke/robotics-toolbox-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
petercorke/robotics-toolbox-python#709 ·
メンテナーはふだん 1 日以内に返信
-
tech-debt
難易度 2/5 1時間未満 初心者へのやさしさ 25/100
petercorke/robotics-toolbox-python#789 ·
メンテナーはふだん 1 日以内に返信
-
mobile: the occupancy grid should draw the planner background, and planners should agree on units対応中かも @kVinsom が 1 日前に担当しました。 オープンtech-debt
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
petercorke/robotics-toolbox-python#785 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
tech-debt
難易度 5/5 1週間以上 初心者へのやさしさ 22/100
petercorke/robotics-toolbox-python#773 ·
メンテナーはふだん 1 日以内に返信
-
CI: a PR influx is serialised by 'require up to date' plus a 12 minute CI; consider a merge queueオープンtech-debt
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
petercorke/robotics-toolbox-python#758 ·
メンテナーはふだん 1 日以内に返信
petercorke/robotics-toolbox-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
NVIDIA-RTX/NRI#277 ·
メンテナーはふだん 1 日以内に返信
-
os:Linux
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
acceptable_buffer_backends: unknown backend names are silently ignored対応中かも @mini-1235 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
ros2/rmw_fastrtps#945 ·
メンテナーはふだん 1 日以内に返信