主要内容

姿势

Create 2-D pose graph

描述

A姿势object stores information for a 2-D pose graph representation. A pose graph contains nodes connected by edges. Each node estimate is connected to the graph by edge constraints that define the relative pose between nodes and the uncertainty on that measurement.

To construct a pose graph iteratively, use the添加斑点功能以添加相对姿势估计并将其连接到具有指定边缘约束的现有节点。姿势节点必须相对于姿势节点指定。使用信息矩阵指定测量的不确定性。

图显示了节点姿势之间的相对姿势。每个顺序姿势通过边缘连接。姿势相对于上一个节点指定为x,y,theta。

在两个非顺序节点之间添加边缘会创建一个loop closure在图中。多个边缘或multiedges还支持在节点对之间,其中包括循环封闭。金宝app要添加其他边缘约束或循环闭合,请使用该节点ID指定添加斑点功能。When optimizing the pose graph, theoptimizePoseGraphfunction finds a solution to satisfy all these edge constraints.

Figure showing loop closures and multiedges as constraints between nodes. Loop closures connect to previous non-sequential nodes. Multiedges are multiple constraints between the same node pair.

To add landmark point nodes, use theaddPointLandmark功能。此函数将节点指定为xy-points without orientation estimates. Landmarks must be specified relative to a pose node.

Figure showing a landmark position as an xy point relative to two nodes with an edge between each node. to.

ThelidarSLAM对象执行基于激光雷达的同时定位和映射,该定位和映射基于2D姿势图的优化。

有关3D姿势图,请参见poseGraph3D对象或Landmark SLAM Using AprilTag Markers例子。

Creation

描述

example

Posegraph = Posegraph创建一个2D姿势图对象。使用姿势使用添加斑点to construct a pose graph iteratively.

Posegraph = Posegraph('MaxNumEdges',maxEdges,'MaxNumNodes',maxNodes)在生成代码时指定姿势图中允许的边缘和节点的上限。仅在生成代码时才需要此语法。

Properties

expand all

此属性仅阅读。

姿势图中的节点数量,指定为正整数。每个节点代表姿势测量或点标志性测量。要指定节点之间的相对姿势,请使用添加斑点。To specify a landmark pose, useAddlandmarkPose。要获取所有节点的列表,请使用edgeNodePairs

此属性仅阅读。

姿势图中的边数,指定为非负整数。每个边缘连接姿势图中的两个节点。包括环闭合边缘和地标边缘。

此属性仅阅读。

循环关闭数量in pose graph, specified as a nonnegative integer. To get the edge IDs of the loop closures, use theloopcluseedgeidsproperty.

此属性仅阅读。

循环闭合边缘ID,指定为边缘ID的向量。

此属性仅阅读。

地标节点IDS,指定为每个节点的ID的向量。

Object Functions

addPointLandmark 将地标点节点添加到姿势图
添加斑点 Add relative pose to pose graph
复制 创建姿势图的副本
edgeNodePairs Edge node pairs in pose graph
edgeconstraints Edge constraints in pose graph
edgeResidualErrors 计算姿势图边缘残差错误
findedgeid Find edge ID of edge
nodeEstimates Poses of nodes in pose graph
拆除 Remove loop closure edges from graph
show Plot pose graph

例子

全部收缩

根据节点和边缘约束优化姿势图。此示例中使用的姿势图来自英特尔研究实验室数据集and was generated from collecting wheel odometry and a laser range finder sensor information in an indoor lab.

加载包含2D姿势图的英特尔数据集。检查姿势object to view the number of nodes and loop closures.

loadIntel-2D posegraph.matpgdisp(pg)
姿势with properties: NumNodes: 1228 NumEdges: 1483 NumLoopClosureEdges: 256 LoopClosureEdgeIDs: [1228 1229 1230 1231 1232 1233 1234 1235 1236 ... ] LandmarkNodeIDs: [1x0 double]

Plot the pose graph with IDs off. Red lines indicate loop closures identified in the dataset.

表演(PG,'IDS','离开');标题('Original Pose Graph')

图包含一个轴对象。The axes object with title Original Pose Graph contains 3 objects of type line.

Optimize the pose graph. Nodes are adjusted based on the edge constraints and loop closures. Plot the optimized pose graph to see the adjustment of the nodes with loop closures.

更新PG = OptimizeposeGraph(PG);图显示(更新PG,'IDS','离开');标题('Updated Pose Graph')

图包含一个轴对象。带有标题更新姿势图的轴对象包含3个类型行的对象。

参考

[1] Grisetti,G.,R。Kummerle,C。Stachniss和W. Burgard。“基于图基的大满贯的教程。”IEEE Intelligent Transportation Systems Magazine。Vol. 2, No. 4, 2010, pp. 31–43. doi:10.1109/mits.2010.939925.

Extended Capabilities

版本历史

Introduced in R2019b