bug:factorGraph object function addFactor returns less one than normal return value

3 ビュー (過去 30 日間)
this is minor bug, addFactor should return 1-based positive integer node index value,but in matlab R2022b return 0-base index value.
f = factorTwoPoseSE3([1 2])
f =
factorTwoPoseSE3 with properties: NodeID: [1 2] Measurement: [0 0 0 1 0 0 0] Information: [6×6 double]
g = factorGraph;
nodeId = addFactor(g,f)
nodeId = 0

採用された回答

cui,xingxing
cui,xingxing 2023 年 1 月 7 日
編集済み: cui,xingxing 2023 年 1 月 7 日
The factorGraph series of functions was introduced in the recent R2022a release. Many of the descriptions of this series of functions are not stable and reliable, and addFactor returns factorID, which is based on a 0-base index, making it counter-intuitive.
Personally, to avoid unexpected results, I recommend using the poseGraph family of functions to solve your problem until Mathworks has officially updated the factorGraph description. As of now the affected versions are R2022a,R2022b.
references Issues:
  1. bug: factorGraph does not work for relative measurement angles
  2. factorGraph:Unclear document function factorTwoPoseSE3/SE2 with input parameter 'Measurement'

その他の回答 (1 件)

Zheng Dong
Zheng Dong 2023 年 1 月 5 日
編集済み: Zheng Dong 2023 年 1 月 6 日
Hi Cui,
Referring to the doc page for addFactor, the return value of addFactor is factorID not nodeID, and factorID will start from 0. I am sorry for the confusion here.
Thanks,
Zheng
  3 件のコメント
Zheng Dong
Zheng Dong 2023 年 1 月 6 日
Hi Cui,
Please check my updated answer.
Thanks
Zheng
cui,xingxing
cui,xingxing 2023 年 1 月 7 日
編集済み: cui,xingxing 2023 年 1 月 7 日
Thanks for the update to clarify, but I personally still think it's weird that factorID is 0-based. I see a lot of official examples where factorID and nodeID are mixed together and don't overlap and affect each other, which confuses me!
I'm tempted to abandon it in favour of the original poseGraph until the official factorGraph update is available, as it's much more understandable and accessible. I hope TMW will take care of the new functions introduced!@Zheng Dong

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLocalization Algorithms についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by