Collision Detection. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

Similar documents
Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

Collision Detection. These slides are mainly from Ming Lin s course notes at UNC Chapel Hill

Collision and Proximity Queries

CS 4649/7649 Robot Intelligence: Planning

CPSC / Sonny Chan - University of Calgary. Collision Detection II

Transformation. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

Lesson 05. Mid Phase. Collision Detection

Bounding Volume Hierarchies

Collision Detection with Bounding Volume Hierarchies

Collision Detection. Motivation - Dynamic Simulation ETH Zurich. Motivation - Path Planning ETH Zurich. Motivation - Biomedical Simulation ETH Zurich

Collision Detection II. These slides are mainly from Ming Lin s course notes at UNC Chapel Hill

Dynamic Collision Detection

Trajectory Optimization

Real-Time Collision Detection for Dynamic Virtual Environments

Using Bounding Volume Hierarchies Efficient Collision Detection for Several Hundreds of Objects

CAB: Fast Update of OBB Trees for Collision Detection between Articulated Bodies

Ray Tracing Acceleration. CS 4620 Lecture 20

video 1 video 2 Motion Planning (It s all in the discretization) Digital Actors Basic problem Basic problem Two Possible Discretizations

Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

Topics. Ray Tracing II. Intersecting transformed objects. Transforming objects

Spatial Data Structures

GEOMETRIC TOOLS FOR COMPUTER GRAPHICS

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Spatial Data Structures

Topics. Ray Tracing II. Transforming objects. Intersecting transformed objects

Acceleration Data Structures

Efficient Interference Calculation by Tight Bounding Volumes

Collision handling: detection and response

Intersection Acceleration

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Recall: Inside Triangle Test

Lecture 24 of 41. Collision Handling Part 1 of 2: Separating Axes, Oriented Bounding Boxes

Configuration Space of a Robot

Technical Section. Tribox bounds for three-dimensional objects

Self-Collision Detection. Planning for Humanoid Robots. Digital Human Research Center. Talk Overview

Overview. Collision Detection. A Simple Collision Detection Algorithm. Collision Detection in a Dynamic Environment. Query Types.

CS4733 Class Notes. 1 2-D Robot Motion Planning Algorithm Using Grown Obstacles

Overview. Collision detection. Collision detection. Brute force collision detection. Brute force collision detection. Motivation

Mobile Robot Path Planning: an Efficient Distance Computation between Obstacles using Discrete Boundary Model (DBM)

Advanced Ray Tracing

Planning in Mobile Robotics

Spatial Data Structures

Computational Geometry

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

improving raytracing speed

Collision Detection based on Spatial Partitioning

Definitions. Topology/Geometry of Geodesics. Joseph D. Clinton. SNEC June Magnus J. Wenninger

Ray Tracing Acceleration. CS 4620 Lecture 22

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Spatial Data Structures

Autonomous Navigation for Flying Robots

Spatial Data Structures

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13

References. Additional lecture notes for 2/18/02.

Example: The following is an example of a polyhedron. Fill the blanks with the appropriate answer. Vertices:

CS535 Fall Department of Computer Science Purdue University

Accelerated Raytracing

Visibility Graph. How does a Mobile Robot get from A to B?

Discrete Motion Planning

An iterative, octree-based algorithm for distance computation between polyhedra with complex surfaces 1

Computer Graphics Ray Casting. Matthias Teschner

Geometric Modeling Mortenson Chapter 11. Complex Model Construction

Self-Collision Detection and Prevention for Humanoid Robots. Talk Overview

This week. CENG 732 Computer Animation. Warping an Object. Warping an Object. 2D Grid Deformation. Warping an Object.

Geometric Modeling. Mesh Decimation. Mesh Decimation. Applications. Copyright 2010 Gotsman, Pauly Page 1. Oversampled 3D scan data

ECE276B: Planning & Learning in Robotics Lecture 5: Configuration Space

Virtual Reality in Assembly Simulation

CS 465 Program 4: Modeller

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016

Search Spaces I. Before we get started... ME/CS 132b Advanced Robotics: Navigation and Perception 4/05/2011

Shape Representation Basic problem We make pictures of things How do we describe those things? Many of those things are shapes Other things include

Voronoi Diagram. Xiao-Ming Fu

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

Spatial Data Structures. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Kinematics and Orientations

Outline. CGAL par l exemplel. Current Partners. The CGAL Project.

Accelerating Ray-Tracing

Geometry proxies (in 2D): a Convex Polygon

Logistics. CS 586/480 Computer Graphics II. Questions from Last Week? Slide Credits

DIMENSIONAL SYNTHESIS OF SPATIAL RR ROBOTS

Non-holonomic Planning

Metric Planning: Overview

Computer Graphics 7 - Rasterisation

High-Dimensional Computational Geometry. Jingbo Shang University of Illinois at Urbana-Champaign Mar 5, 2018

Applications. Oversampled 3D scan data. ~150k triangles ~80k triangles

Lecture 11: Ray tracing (cont.)

Tracking Minimum Distances between Curved Objects with Parametric Surfaces in Real Time

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling

Rasterization. COMP 575/770 Spring 2013

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

CS248. Game Mechanics

Navigation and Metric Path Planning

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics

Physically-Based Modeling and Animation. University of Missouri at Columbia

METR 4202: Advanced Control & Robotics

METR Robotics Tutorial 2 Week 2: Homogeneous Coordinates

Chapter 3. Geometric Representations and Transformations. Steven M. LaValle. University of Illinois. Copyright 2004

3D Modelling: Animation Fundamentals & Unit Quaternions

Simplified Voronoi diagrams for motion planning of quadratically-solvable Gough-Stewart platforms

Transcription:

RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Collision Detection Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering http://users.wpi.edu/~zli11

Euler Angle RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Euler angle Change the orientation of a rigid body to by Applying sequential rotations about moving axes

No Gimbal Lock RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Start End Yaw Pitch Roll

Euler Angle and Gimbal RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Applying Euler angle rotation behaves as if Changing the orientation of an object using real gimbal set a mechanism As a mechanism, gimbal set can have singularity Gimbal lock At this configuration, gimbal set can change the roll in many ways, but Cannot change the yaw of the plane, without changing the pitch at the same time Lose the control of one DOF for yaw

Gimbal Lock Singularity Problem RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Singularities Why does the ring for yaw and ring for roll do the same thing? Let s say this is our convention: Lets set β = 0 Multiplying through, we get: Simplify: α and γ do the same thing! We have lost a degree of freedom!

RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Gimbal Lock is a Singularity Problem Lose the control of Yaw

Get out of gimbal lock? RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 To Pitch, First need to get out of gimbal lock Rotate ring for yaw back and forth, while rotate the ring for pitch Unexpected curved Motion

RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Why Rotation Matrix and Quaternion Why rotation matrix and quaternion do not have gimbal lock? 3D Rotation quaternion, rotation matrix --- one to one 3D Rotation Euler angles --- not one-to-one Sometimes, the dimension of the Euler angle space drops to 2

Motivation Find a path in C-space Compute C obs Hard Check if a configuration is collision Easy Collision detection For a single configuration Along a path/trajectory

Collision Detection Speed is very important Need to check collision for large number of configurations For most planners, runtime for real-world task depends heavily on the speed of collision checking Tradeoff Speed Accuracy Memory usage Increase speed more memory, less accuracy

Crowd Simulation Figure from Kanyuk, Paul. "Brain Springs: Fast Physics for Large Crowds in WALLdr E." IEEE Computer Graphics and Applications 29.4 (2009).

Self-Collision Checking for Articulated Robot Self-collision is typically not an issue for mobile robots Articulated robots must avoid self-collision Parent-child link set proper joint angle limits With root or other branches e.g. Humanoid robot?

Self-Collision Checking For Humanoid Robot (J. Kuffner et al. Self-Collision and Prevention for Humanoid Robots. Proc. IEEE Int. Conf. on Robotics and Automation, 2002)

Outline RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Representing Geometry Methods Bounding volumes Bounding volume Hierarchy Dynamic collision detection Collision detection for Moving Objects Feature tracking, swept-volume intersection, etc.

2D Representation RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 2D robots and obstacles are usually represented as Polygons Composites of discs

3D Representation RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Many representations - most popular for motion planning are Triangle meshes Composites of primitives (box, cylinder, sphere) Voxel grids Triangle meshes Composite of primitives Voxel grid

RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 3D Representation: Triangle Meshes Triangle mesh A set of triangles in 3D that share common vertices and/or edges Most real-world shapes and be represented as triangle meshes Delaunay Triangulation A good way to generate such meshes (there are several algorithms)

Delaunay Triangulation Method Sample on the terrain Connect Sample points Which triangulation?

Delaunay Triangulation Goal Avoid sliver triangle Find the dual graph of Voronoi graph Voronoi Graph Delaunay Graph

RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Collision Checking: Intersecting Triangle Meshes The brute-force way Check for intersection between every pair of triangles

Collision Checking for Triangles RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Check if a point in a triangle Check if two triangles intersect

RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Collision Checking: Intersecting Triangle Meshes Triangle-Triangle intersection checks have a lot of corner cases; checking many intersections is slow See O'Rourke, Joseph. Computational geometry in C. Cambridge university press, 1994. for algorithms. Can we do better than all-pairs checking? talk about it later

RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 3D Representation: Triangle Meshes Triangle Meshes are hollow! Be careful if you use them to represent solid bodies One mesh inside another; no intersection

RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 3D Representation: Triangle Meshes Complexity of collision checking increases with the number of triangles Try to keep the number of triangles low Algorithms to simplify meshes exist but performance depends on shape

RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 3D Representation: Composites of Primitives Advantages: Can usually define these by hand Collision checking is much faster/easier Much better for simulation Disadvantages Hard to represent complex shapes Usually conservative (i.e. overestimate true geometry)

3D Representations: Voxel Grids RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Voxel Short for "volume pixel" A single cube in a 3D lattice Not hollow like triangle meshes Good for 'deep' physical simulations such as heat diffusion, fracture, and soft physics

3D Representations: Voxel Grids RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 How to make a voxel model from triangle mesh? Grid the space Grid resolution without losing important details Grid dimension just enough to cover the model efficiency Solidify a shell representing the surface Fill it in using a scanline fill algorithm

Bounding Volume Bounding Volume A closed volume that completely contains the object (set). If we don t care about getting the true collision, Bounding volumes represents the geometry (conservatively) Various Bounding Volumes Sphere Axis-Aligned Bounding Boxes (AABBs) Oriented Bound Boxes (OBBs)

Spheres BASED ON PROF. Jean-Claude Latombe CS326A Invariant to rotation and translations, Do not require being updated Efficient constructions and interference tests Tight?

AABBs RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Axis-Aligned Bounding Boxes (AABBs) Bound object with one or more boxes oriented along the same axis

AABBs RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 How can you check for intersection of AABBs?

AABBs BASED ON PROF. Jean-Claude Latombe CS326A Not invariant Efficient Not tight

OBBs RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 Oriented Bound Boxes (OBBs) are the same as AABBs except The orientation of the box is not fixed OBBs can give you a tighter fit with fewer boxes

OBBs RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 How do you check for intersection of OBBs? Hyperplane separation theorem In 2D? In 3D?

Compute OBBs 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 Y y RBE 550 MOTION PLANNING BASED ON DR. DMITRY BERENSON S RBE 550 X rotation described by matrix U x Possible improvements: use vertices of convex hull of the a i s or dense uniform sampling of convex hull

OBBs BASED ON PROF. Jean-Claude Latombe CS326A Invariant Less efficient to test Tight

Comparison of BVs BASED ON PROF. Jean-Claude Latombe CS326A Sphere AABB OBB Tightness - -- + Testing + + o Invariance yes no yes No type of BV is optimal for all situations

Bounding Volume Hierarchy (BVH) Bounding Volume Hierarchy method Enclose objects into bounding volumes (spheres or boxes) Check the bounding volumes first Decompose an object into two BASED ON PROF. Jean-Claude Latombe CS326A

Bounding Volume Hierarchy (BVH) Bounding Volume Hierarchy method Enclose objects into bounding volumes (spheres or boxes) Check the bounding volumes first Decompose an object into two Proceed hierarchically BASED ON PROF. Jean-Claude Latombe CS326A

Bounding Volume Hierarchy (BVH) Construction Not all levels of hierarchy need to have the same type of bounding volume Highest level could be a sphere Lowest level could be a triangle mesh Ideal BVH Separation Balanced tree BASED ON PROF. Jean-Claude Latombe CS326A

Construction of a BVH BASED ON PROF. Jean-Claude Latombe CS326A Strategy Top-down construction At each step, create the two children of a BV Example For OBB, split longest side at midpoint

Collision Detection using BVH BASED ON PROF. Jean-Claude Latombe CS326A A A B C B C D E F G D E F G Two objects described by their precomputed BVHs

Collision Detection using BVH BASED ON PROF. Jean-Claude Latombe CS326A A B C Search tree AA D E F G BB BC CB CC A A

Collision Detection with BVH BASED ON PROF. Jean-Claude Latombe CS326A A B C Search tree AA D E F G BB BC CB CC FD FE GD GE If two leaves of the BVH s overlap (here, G and D) check their content for collision G D

BASED ON PROF. Jean-Claude Latombe CS326A Search Strategy If there is collision It is desirable to detect it as quickly as possible Greedy best-first search strategy with Expand the node XY with largest relative overlap (most likely to contain a collision) Many ways to compute distance d f(n) = d/(r X +r Y ) r X d r Y Y X

BASED ON PROF. Jean-Claude Latombe CS326A Static vs. Dynamic VS Collision Detection Static checks Dynamic checks

Usual Approach to Dynamic Checking 1) Discretize path at some fine resolution ε 2) Test statically each intermediate configuration BASED ON PROF. Jean-Claude Latombe CS326A 3 < ε 2 3 1 3 2 ε too large collisions are missed ε too small slow test of local paths 3

BASED ON PROF. Jean-Claude Latombe CS326A Testing Path Segment vs. Finding First Collision PRM planning Detect collision as quickly as possible Bisection strategy Physical simulation, haptic interaction Find first collision Sequential strategy

Collision Checking for Moving Objects Feature Tracking Swept-volume intersection BASED ON PROF. Jean-Claude Latombe CS326A

Feature Tracking BASED ON PROF. Jean-Claude Latombe CS326A Compute the Euclidian distance of two polyhedra Problem setup Each object is represented as a convex polyhedron (or a set of polyhedra) Each polyhedron has a field for its faces, edges, vertices, positions and orientations features The closest pair of features between two polyhedra The pair of features which contains the closest points Given two polyhedra, find and keep update their closest features (see [1]) [1] M. Lin and J. Canny. A Fast Algorithm for Incremental Distance Calculation. Proc. IEEE Int. Conf. on Robotics and Automation, 1991

BASED ON PROF. Jean-Claude Latombe CS326A Feature Tracking Strategy 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

Swept-volume Intersection BASED ON PROF. Jean-Claude Latombe CS326A ε too large collisions are missed ε too small slow test of local paths

Swept-volume Intersection BASED ON PROF. Jean-Claude Latombe CS326A ε too large collisions are missed ε too small slow test of local paths

Comparison BASED ON PROF. Jean-Claude Latombe CS326A Bounding-volume (BV) hierarchies Discretization issue Feature-tracking methods Geometric complexity issue with highly non-convex objects Swept-volume intersection Swept-volumes are expensive to compute. Too much data.

Readings BASED ON PROF. Jean-Claude Latombe CS326A Principles CH7 Review of Probability Theory https://drive.google.com/file/d/0b7swe0phmbzbu1fqcnnortfzow M