bug:factorGraph object function nodeState return always ZERO state after addFactor non-zero values?

It's strange that when i add some non-zero factor state into factorGraph object, before optimizition, use nodeState function to get look state values,but them always return [0,0,0, 1,0,0,0] state, this behavior is very different from poseGraph nodeState.
for example:
f = factorTwoPoseSE3([1 2],Measurement=[10,20,30,1,0,0,0]);
g = factorGraph();
addFactor(g,f);
% use nodeState to get state value
state1 = g.nodeState(1)
state1 = 1×7
0 0 0 1 0 0 0
state2 = g.nodeState(2)
state2 = 1×7
0 0 0 1 0 0 0
you see, state2 is not i expected, it would be reasonable to be [10,20,30,1,0,0].

답변 (1개)

Hi Cui,
Sorry for the confusion. This behavior is expected. The node state will only be updated after you optimize the factorGraph. It is different from poseGraph.
Thanks,
Zheng

카테고리

도움말 센터 및 File Exchange에서 Localization Algorithms에 대해 자세히 알아보기

제품

릴리스

R2022b

질문:

2023년 1월 5일

댓글:

2023년 1월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by