Point Cloud Registration

Classes for point cloud registration.

IterativeRegistrationSolver

Abstract class for iterative point cloud registration algorithms.

class perception.IterativeRegistrationSolver

Bases: object

Abstract class for iterative registration solvers.

register(source_point_cloud, target_point_cloud, source_normal_cloud, target_normal_cloud, matcher, num_iterations=1, compute_total_cost=True, match_centroids=False, vis=False)

Iteratively register objects to one another.

Parameters:
  • source_point_cloud (autolab_core.PointCloud) – source object points
  • target_point_cloud (:obj`autolab_core.PointCloud`) – target object points
  • source_normal_cloud (autolab_core.NormalCloud) – source object outward-pointing normals
  • target_normal_cloud (autolab_core.NormalCloud) – target object outward-pointing normals
  • matcher (PointToPlaneFeatureMatcher) – object to match the point sets
  • num_iterations (int) – the number of iterations to run
  • compute_total_cost (bool) – whether or not to compute the total cost upon termination.
  • match_centroids (bool) – whether or not to match the centroids of the point clouds
Returns:

results containing source to target transformation and cost

Return type:

obj`RegistrationResult`

RegistrationResult

class perception.RegistrationResult(T_source_target, cost)

Bases: object

Struct to hold results of point set registration.

T_source_target

autolab_core.RigidTranform – transformation from source to target frame

cost

float – numeric value of the registration objective for the given transform

PointToPlaneICPSolver

class perception.PointToPlaneICPSolver(sample_size=100, cost_sample_size=100, gamma=100.0, mu=0.01)

Bases: perception.point_registration.IterativeRegistrationSolver

Performs Iterated Closest Point with an objective weighted between point-to-point and point-to-plane.

1 sample_size : int
number of randomly sampled points to use per iteration
cost_sample_size : int
number of randomly sampled points to use for cost evaluations
gamma : float
weight of point-to-point objective relative to point-to-plane objective
mu : float
regularizer for matrix inversion in the Gauss-Newton step
register(source_point_cloud, target_point_cloud, source_normal_cloud, target_normal_cloud, matcher, num_iterations=1, compute_total_cost=True, match_centroids=False, vis=False)

Iteratively register objects to one another using a modified version of point to plane ICP. The cost func is PointToPlane_COST + gamma * PointToPoint_COST. Uses a stochastic Gauss-Newton step where on each iteration a smaller number of points is sampled.

Parameters:
  • source_point_cloud (autolab_core.PointCloud) – source object points
  • target_point_cloud (:obj`autolab_core.PointCloud`) – target object points
  • source_normal_cloud (autolab_core.NormalCloud) – source object outward-pointing normals
  • target_normal_cloud (autolab_core.NormalCloud) – target object outward-pointing normals
  • matcher (PointToPlaneFeatureMatcher) – object to match the point sets
  • num_iterations (int) – the number of iterations to run
  • compute_total_cost (bool) – whether or not to compute the total cost upon termination.
  • match_centroids (bool) – whether or not to match the centroids of the point clouds
Returns:

results containing source to target transformation and cost

Return type:

obj`RegistrationResult`

register_2d(source_point_cloud, target_point_cloud, source_normal_cloud, target_normal_cloud, matcher, num_iterations=1, compute_total_cost=True, vis=False)

Iteratively register objects to one another using a modified version of point to plane ICP which only solves for tx and ty (translation in the plane) and theta (rotation about the z axis). The cost func is actually PointToPlane_COST + gamma * PointToPoint_COST Points should be specified in the basis of the planar worksurface.

Parameters:
  • source_point_cloud (autolab_core.PointCloud) – source object points
  • target_point_cloud (:obj`autolab_core.PointCloud`) – target object points
  • source_normal_cloud (autolab_core.NormalCloud) – source object outward-pointing normals
  • target_normal_cloud (autolab_core.NormalCloud) – target object outward-pointing normals
  • matcher (PointToPlaneFeatureMatcher) – object to match the point sets
  • num_iterations (int) – the number of iterations to run
  • compute_total_cost (bool) – whether or not to compute the total cost upon termination.
Returns:

results containing source to target transformation and cost

Return type:

obj`RegistrationResult`