Geometric Representations & Collision Detection Kris Hauser I400/B659: Intelligent Robotics Spring 2014.

Slides:



Advertisements
Similar presentations
Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
Advertisements

Complete Motion Planning
Collision Detection CSCE /60 What is Collision Detection?  Given two geometric objects, determine if they overlap.  Typically, at least one of.
Collision Detection and Resolution Zhi Yuan Course: Introduction to Game Development 11/28/
Computer graphics & visualization Collisions. computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization.
Visibility Culling. Back face culling View-frustrum culling Detail culling Occlusion culling.
Computational Geometry & Collision detection
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
Proximity Computations between Noisy Point Clouds using Robust Classification 1 Jia Pan, 2 Sachin Chitta, 1 Dinesh Manocha 1 UNC Chapel Hill 2 Willow Garage.
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
Algorithmic Robotics and Motion Planning Dan Halperin Tel Aviv University Fall 2006/7 Dynamic Maintenance and Self-Collision Testing for Large Kinematic.
Haptic Rendering using Simplification Comp259 Sung-Eui Yoon.
Review Methods for convex polytopes See video demonstration
Collision Detection CSE 191A: Seminar on Video Game Programming Lecture 3: Collision Detection UCSD, Spring, 2003 Instructor: Steve Rotenberg.
GATE D Object Representations (GATE-540) Dr.Çağatay ÜNDEĞER Instructor Middle East Technical University, GameTechnologies & General Manager SimBT.
Bounding Volume Hierarchy “Efficient Distance Computation Between Non-Convex Objects” Sean Quinlan Stanford, 1994 Presented by Mathieu Brédif.
GPU Proximity Queries with Swept Sphere Volumes COMP Robotics Project Proposal Qi Mo.
Adaptive Dynamic Collision Checking for Many Moving Bodies Mitul Saha Department of Computer Science, Stanford University. NSF-ITR Workshop Collaborators:
UNC Chapel Hill M. C. Lin References Collision Detection between Geometric Models: A Survey, by M. Lin and S. Gottschalk, Proc. of IMA Conference on Mathematics.
CS 326 A: Motion Planning robotics.stanford.edu/~latombe/cs326/2004/index.htm Collision Detection and Distance Computation: Feature Tracking Methods.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Continuous Collision Detection David Knott COMP 259 class presentation.
Exact Collision Checking of Robot Paths Fabian Schwarzer Mitul Saha Jean-Claude Latombe Computer Science Department Stanford University.
Dynamic Maintenance and Self Collision Testing for Large Kinematic Chains Lotan, Schwarzer, Halperin, Latombe.
CS 326 A: Motion Planning robotics.stanford.edu/~latombe/cs326/2004/index.htm Collision Detection and Distance Computation.
OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,
Bounding Volume Hierarchies and Spatial Partitioning Kenneth E. Hoff III COMP-236 lecture Spring 2000.
NUS CS 5247 David Hsu Minkowski Sum Gokul Varadhan.
Efficient Distance Computation between Non-Convex Objects by Sean Quinlan presented by Teresa Miller CS 326 – Motion Planning Class.
Collision Detection and Distance Computation CS 326A: Motion Planning.
1 Advanced Scene Management System. 2 A tree-based or graph-based representation is good for 3D data management A tree-based or graph-based representation.
Efficient Distance Computation between Non-Convex Objects By Sean Quinlan Presented by Sean Augenstein and Nicolas Lee.
CS 326A: Motion Planning ai.stanford.edu/~latombe/cs326/2007/index.htm Collision Detection and Distance Computation.
CS 326A: Motion Planning ai.stanford.edu/~latombe/cs326/2007/index.htm Collision Detection and Distance Computation.
Collision Detection David Johnson Cs6360 – Virtual Reality.
CS B659: Principles of Intelligent Robot Motion Collision Detection.
12/4/2001CS 638, Fall 2001 Today Using separating planes/axes for collision testing Collision detection packages.
Efficient Maintenance and Self-Collision Testing for Kinematic Chains Itay Lotan Fabian Schwarzer Dan Halperin Jean-Claude Latombe.
Modeling and representation 1 – comparative review and polygon mesh models 2.1 Introduction 2.2 Polygonal representation of three-dimensional objects 2.3.
Computer Graphics 2 Lecture x: Acceleration Techniques for Ray-Tracing Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
1 Speeding Up Ray Tracing Images from Virtual Light Field Project ©Slides Anthony Steed 1999 & Mel Slater 2004.
Efficient Maintenance and Self- Collision Testing for Kinematic Chains Itay Lotan Fabian Schwarzer Dan Halperin Jean-Claude Latombe.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Collisions & Contact.
Week 13 - Monday.  What did we talk about last time?  Exam 2!  Before that…  Polygonal techniques ▪ Tessellation and triangulation  Triangle strips,
12/4/2001CS 638, Fall 2001 Today Managing large numbers of objects Some special cases.
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
Collaborative Visual Computing Lab Department of Computer Science University of Cape Town Graphics Topics in VR By Shaun Nirenstein.
CS B659: Principles of Intelligent Robot Motion Rigid Transformations and Collision Detection.
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
1 Energy Maintenance for Molecular Simulation kinematics + energy  motion + structure Main computational issue: Proximity computation.
UNC Chapel Hill M. C. Lin Introduction to Motion Planning Applications Overview of the Problem Basics – Planning for Point Robot –Visibility Graphs –Roadmap.
CS B553: A LGORITHMS FOR O PTIMIZATION AND L EARNING Global optimization 1.
Chapter 11 Collision Detection 가상현실 입문 그래픽스 연구실 민성환.
Presented by Paul Phipps
3D Object Representations 2011, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
David Luebke 3/5/2016 Advanced Computer Graphics Lecture 4: Faster Ray Tracing David Luebke
Interactive Continuous Collision Detection for Polygon Soups Xin Huang 11/20/2007.
A Fast Algorithm for Incremental Distance Calculation Ming C. Lin & John Canny University of California, Berkeley 1991 Presentation by Adit Koolwal.
3D Object Representations 2009, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
Minkowski Sums and Distance Computation Eric Larsen COMP
Bounding Volume Hierarchies and Spatial Partitioning
Collision Detection Spring 2004.
Bounding Volume Hierarchies and Spatial Partitioning
Deformable Collision Detection
3D Object Representations
Parts of these slides are based on
Computer Animation Algorithms and Techniques
Collision Detection.
Deformable Collision Detection
David Johnson Cs6360 – Virtual Reality
Presentation transcript:

Geometric Representations & Collision Detection Kris Hauser I400/B659: Intelligent Robotics Spring 2014

3D models in robotics Design Simulation Robot collision detection (i.e. prediction) Proximity calculation Map building Object recognition Grasp planning Etc..

Common Representations Primitives Raw data Point clouds Depth image Polygon soup Surfaces Polygon mesh Parametric curves Subdivision surfaces Implicit surface Volumes Voxels Distance transforms Quad/octree

Aspects to consider How accurately does the geometry need to be represented? What operations need to be performed on the geometry? (Recognition? Matching? Simulation? Collision detection? Visualization? Distance computation?) How quickly? How accurately? Storage and transmission limitations? How easily / reliably / accurately / quickly can the source data (e.g., raw sensor data, CAD models) be converted to the desired format?

Visualization Primitives Raw data Point clouds Depth image Polygon soup Surfaces Polygon mesh Parametric curves Subdivision surfaces Implicit surface Volumes Voxels Distance transforms Quad/octree Easy to convert to polygons Convert to polygons (somewhat expensive) Use specialized rasterization techniques

Easy Conversions From primitives/surfaces to: Polygon soups : discretization Point clouds: sampling Depth images: rasterization From volumes to surfaces: Simple: output a box for each occupied cell (coarse) Marching cubes: walk along the volume until a surface is hit, output a piece of the surface in the volume (accurate)

Harder Conversions From point clouds / soups to surfaces / volumes: a challenge Fill cells that contain points (coarse) Implicit function fitting Silhouette carving Lots of other methods… no “perfect” way to deal with missing data From surfaces to volumes : Fill cells that contain surface (coarse) Euclidean distance transform: wavefront propagation from surface cells (closed surfaces, accurate)

Resolution issues Accuracy, space, & computation complexity determined by resolution h Suppose object size W Point clouds, polygon meshes: O((W/h) 2 ) space Voxels: O((W/h) 3 ) space Downsampling Mesh simplification

Geometric queries Collision detection: When A and B are at hypothetical poses T A and T B, would they collide? Distance calculation When A and B are at hypothetical poses T A and T B, how far are they apart? Time-of-first contact When A and B move along paths T A (t) and T B (t), at what time do they first collide?

Geometric primitives Points, Rays, Lines, Segments, Triangles, Spheres, Ellipses, Boxes Collision detection, distance detection fast operations (O(1)) Ex: segment – sphere collision detection / distance calculation r

Managing large scenes O(n 2 ) pairs of objects – how to check collisions?

Collision Detection Methods Many different methods In particular: Grid method: good for many simple moving objects of about the same size (e.g., many moving discs with similar radii) Closest-feature tracking: good for moving polyhedral objects Bounding Volume Hierarchy (BVH) method: good for few moving objects with complex and diverse geometry

Grid Method  Subdivide space into a regular grid cubic of square bins  Index each object in a bin d

Grid Method d Running time is proportional to number of moving objects Useful also to compute pairs of objects within some distance (vision, sound, …)

Closest-Feature Tracking (M. Lin and J. Canny. A Fast Algorithm for Incremental Distance Calculation. Proc. IEEE Int. Conf. on Robotics and Automation, 1991)  The closest pair of features (vertex, edge, face) between two polyhedral objects are computed at the start configurations of the objects  During motion, at each small increment of the motion, they are updated  Efficiency derives from two observations:  The pair of closest features changes relatively infrequently  When it changes the new closest features will usually be on a boundary of the previous closest features

Closest-Feature Test for Vertex- Vertex Vertex

Application: Detecting Self-Collision in Humanoid Robots (J. Kuffner et al. Self-Collision and Prevention for Humanoid Robots. Proc. IEEE Int. Conf. on Robotics and Automation, 2002)

BVH with spheres: S. Quinlan. Efficient Distance Computation Between Non-Convex Objects. Proc. IEEE Int. Conf. on Robotics and Automation, BVH with Oriented Bounding Boxes: S. Gottschalk, M. Lin, and D. Manocha. OBB-Tree: A Hierarchical Structure for Rapid Interference Detection. Proc. ACM SIGGRAPH '96, Combination of BVH and feature-tracking: S.A. Ehmann and M.C. Lin. Accurate and Fast Proximity Queries Between Polyhedra Using Convex Surface Decomposition. Proc Eurographics, Vol. 20, No. 3, pp , Adaptive bisection in dynamic collision checking: F. Schwarzer, M. Saha, J.C. Latombe. Adaptive Dynamic Collision Checking for Single and Multiple Articulated Robots in Complex Environments, manuscript, Bounding Volume Hierarchy Method

 Enclose objects into bounding volumes (spheres or boxes)  Check the bounding volumes first  Decompose an object into two Bounding Volume Hierarchy Method

 Enclose objects into bounding volumes (spheres or boxes)  Check the bounding volumes first  Decompose an object into two  Proceed hierarchically Bounding Volume Hierarchy Method

 Enclose objects into bounding volumes (spheres or boxes)  Check the bounding volumes first  Decompose an object into two  Proceed hierarchically Bounding Volume Hierarchy Method

BVH is pre-computed for each object Bounding Volume Hierarchy Method

BVH in 3D

Collision Detection Two objects described by their precomputed BVHs A B C D EF G A B C D EF G

Collision Detection A Search tree A A pruning

Collision Detection A CCBCBBCBCB Search tree A A A B C D EF G

Collision Detection CCBCBBCBCB A Search tree pruning A B C D EF G

If two leaves of the BVH’s overlap (here, G and D) check their content for collision Collision Detection CCBCBBCBCB A Search tree GEGEGDGDFEFEFDFD A B C D EF G G D

Variant A CCBCBBCBCB Search tree A A A B C D EF G A CACABABA

Collision Detection Pruning discards subsets of the two objects that are separated by the BVs Each path is followed until pruning or until two leaves overlap When two leaves overlap, their contents are tested for overlap

Search Strategy and Heuristics  If there is no collision, all paths must eventually be followed down to pruning or a leaf node  But if there is collision, it is desirable to detect it as quickly as possible  Greedy best-first search strategy with f(N) = d/(r X +r Y ) [Expand the node XY with largest relative overlap (most likely to contain a collision)] rXrX rYrY d X Y

Recursive (Depth-First) Collision Detection Algorithm Test(A,B) 1.If A and B do not overlap, then return 1 2.If A and B are both leaves, then return 0 if their contents overlap and 1 otherwise 3.Switch A and B if A is a leaf, or if B is bigger and not a leaf 4.Set A 1 and A 2 to be A’s children 5.If Test(A 1,B) = 1 then return Test(A 2,B) else return 0

Performance Several thousand collision checks per second for 2 three- dimensional objects each described by 500,000 triangles, on a 1-GHz PC

Distance Computation M > M, prune

Greedy Distance Computation Greedy-Distance(A,B,M) 1.If min-dist(A,B) > M, then return M 2.If A and B are both leaves, then return distance between their contents 3.Switch A and B if A is a leaf, or if B is bigger and not a leaf 4.Set A 1 and A 2 to be A’s children 5.M  min(max-dist(A 1,B), max-dist(A 2,B), M) 6.d 1  Greedy-Distance(A 1,B,M) 7.d 2  Greedy-Distance(A 2,B,M) 8.Return Min(d 1,d 2 ) M (upper bound on distance) is initialized to infinity

Approximate Distance Approx-Greedy-Distance(A,B,M,  ) 1.If (1+  )min-dist(A,B) > M, then return M 2.If A and B are both leaves, then return distance between their contents 3.Switch A and B if A is a leaf, or if B is bigger and not a leaf 4.Set A 1 and A 2 to be A’s children 5.M  min(max-dist(A 1,B), max-dist(A 2,B), M) 6.d 1  Approx-Greedy-Distance(A 1,B,M,  ) 7.d 2  Approx-Greedy-Distance(A 2,B,M,  ) 8.Return Min(d 1,d 2 ) M (upper bound on distance) is initialized to infinity

Desirable Properties of BVs and BVHs BVs: Tightness Efficient testing Invariance BVH:  Separation  Balanced tree ?

Spheres Invariant Efficient to test But tight?

Axis-Aligned Bounding Box (AABB)

 Not invariant  Efficient to test  Not tight

Oriented Bounding Box (OBB)

 Invariant  Less efficient to test  Tight Oriented Bounding Box (OBB)

Comparison of BVs SphereAABBOBB Tightness---+ Testing++o Invarianceyesnoyes No type of BV is optimal for all situations

Desirable Properties of BVs and BVHs BVs: Tightness Efficient testing Invariance BVH:  Separation  Balanced tree ?

Desirable Properties of BVs and BVHs BVs: Tightness Efficient testing Invariance BVH:  Separation  Balanced tree

Construction of a BVH Top-down construction At each step, create the two children of a BV Example: For OBB, split longest side at midpoint

Computation of an OBB [Gottschalk, Lin, and Manocha, 96]  N points a i = (x i, y i, z i ) T, i = 1,…, N  SVD of A = (a 1 a 2... a N )  A = UDV T where  D = diag(s 1,s 2,s 3 ) such that s 1  s 2  s 3  0  U is a 3x3 rotation matrix that defines the principal axes of variance of the a i ’s  OBB’s directions  The OBB is defined by max and min coordinates of the a i ’s along these directions  Possible improvements: use vertices of convex hull of the a i ’s or dense uniform sampling of convex hull x y X Y rotation described by matrix U