director.segmentationroutines module¶
Routines and Fitting algorithms Fitting: means where ALL other non-object points have been removed, determining the transform frame of the object
Segment: means seperating clusters from a single cloud
-
class
director.segmentationroutines.
SegmentationContext
(groundHeightProvider, viewProvider)[source]¶ Bases:
object
Maintains an abstraction between the fitting scene and a robot Assumes point cloud is world aligned, with z up Provides access to (1) ground height, (2) location of the head frame, (3) view direction
Can be configured: (a) Default mode: populated continously by EST_ROBOT_STATE
- and (3) set seperately
- Autonomy: where (2) gives (3)
- Populated programmatically. e.g: - for unit testing - where ground plane from feet cannot be used
-
director.segmentationroutines.
applyEuclideanClustering
(dataObj, clusterTolerance=0.05, minClusterSize=100, maxClusterSize=1000000.0)[source]¶
-
director.segmentationroutines.
extractClusters
(polyData, clusterInXY=False, **kwargs)[source]¶ Segment a single point cloud into smaller clusters using Euclidean Clustering
-
director.segmentationroutines.
fitDrillBarrel
(drillPoints, forwardDirection, plane_origin, plane_normal)[source]¶ Given a point cloud which ONLY contains points from a barrell drill, standing upright and the equations of a table its resting on, and the general direction of the robot Fit a barrell drill
-
director.segmentationroutines.
intersectLineWithPlane
(line_point, line_ray, plane_point, plane_normal)[source]¶ Find the intersection between a line and a plane http://www.scratchapixel.com/lessons/3d-basic-lessons/lesson-7-intersecting-simple-shapes/ray-plane-and-ray-disk-intersection/
-
director.segmentationroutines.
labelOutliers
(dataObj, searchRadius=0.03, neighborsInSearchRadius=10)[source]¶