MATLAB 도움말 센터
Import factor graph from g2o log file
Since R2022a
graph = importFactorGraph(filename)
graph = importFactorGraph(filename) imports a factor graph from the specified G2o file filename.
graph
filename
example
collapse all
Import factor graph from the huskyGazebo2DPG.g2o file.
huskyGazebo2DPG.g2o
fg = importFactorGraph("huskyGazebo2DPG.g2o")
fg = factorGraph with properties: NumNodes: 152 NumFactors: 357
Get the node type of the first pose node.
type = nodeType(fg,1)
type = "POSE_SE2"
Get all of the pose nodes of the same type.
poseIDs = nodeIDs(fg,NodeType=type)
poseIDs = 1×152 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
Fix the first node so it is an anchor during optimization and then optimize the factor graph with default solver options.
fixNode(fg,0); optimize(fg); poses = nodeState(fg,poseIDs);
Plot the poses of the factor graph as an SE(2) transformations.
poseTFs = se2(poses,"xytheta"); plotTransforms(poseTFs,FrameSize=0.5); xlabel("x(m)") ylabel("y(m)") title("Imported Factor Graph")
Name of the G2o log file to import a factor graph from, specified as a string scalar or character vector. The specified G2o log file must contain either only 'EDGE_SE2' and 'VERTEX_SE2' tokens, or only 'EDGE_SE3:QUAT' and 'VERTEX_SE3:QUAT' tokens.
'EDGE_SE2'
'VERTEX_SE2'
'EDGE_SE3:QUAT'
'VERTEX_SE3:QUAT'
factorGraph
Factor graph imported from the G2o file, returned as a factorGraph object.
Introduced in R2022a
factorGraphSolverOptions
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의