Professional Documents
Culture Documents
Chittawadigi 2013
Chittawadigi 2013
Abstract— Cylinder, a common geometric entity has a Exact collision detection between two cylinders in the 3D
discontinuity at the joining of cylindrical surface and circular- Cartesian space, either for broad phase or narrow phase
disks. Hence, collision detection between two cylinders in space testing has been reported by few. Eberly [3] considered
is a difficult task and few have reported formulations to solve Separating Axis Tests (SAT) to determine overlap of two
it. In this paper, a novel analytical methodology is proposed to cylinders along certain directions (each of the cylinder axes, a
detect collision or intersection between two cylinders. The vector connecting the centers of the cylinders and vectors on
configuration, i.e., position and orientation, between the a plane perpendicular to each of cylinder axes and passing
cylinders was represented using the four Denavit-Hartenberg through their respective centers). It also required optimization
(DH) parameters plus two extra parameters. Dual Number of a function over a spherical surface. A method was
Algebra was used to extract these six parameters. Tests proposed by Ketchel and Larochelle [4] using line geometry
involved in collision detection between the cylinders were
to detect if two cylinders intersect, by determining the
between the lines and rectangles in a plane, thus considerably
simplifying the problem of collision detection. As an
common normal between the cylinder axes and the points
illustration, an one-DOF arm modeled as a cylinder with where the normal intersects the axes. Based on the condition
cylindrical shaped obstacles were modeled and tested for their of these points lying inside respective cylinders, different
collisions. The results were validated with an analytical method tests were proposed. However, detailed logical derivation
available in the literature and a commercial software. was not reported. Choi [5] reported cylinder as a Composite
Quadric Model (CQM), where cylindrical surface (quadric) is
I. INTRODUCTION bounded by a circular edge and plane on either side,
The term ‘cylinder’ typically refers to the volume bound collectively referred as boundary elements. As CQMs are
by a right-circular cylindrical surface and two circular disks semi-algebraic entities, firstly, algebraic methods were used
as end-caps. Along with spheres, cuboids, cones, etc., to compute contact points between all possible pairs of
cylinders are one of the main geometric primitives used in boundary elements. Secondly, the contact points were
Computer Graphics, Computer Aided Geometric Design and verified if they lay on the actual CQMs. Biermann et al. [6]
related areas. In applications related to Robotics, medical and used optimization techniques to determine the distance
surgical simulations, simulation of various processes, between different entities of cylinders (cylindrical surface,
intersection of different geometric objects in the environment circular edge and circular face). A concept of Minkowski
needs to be determined for realistic simulation, which is Portal Refinement (MPR) was used in XenoCollide [7] to
referred as ‘Collision Detection’. represent convex shapes, including cylinder, using a support
function and collision between two cylinders was reported
Collision detection, by itself is a very large field and using an iterative technique. XenoCollide has been
researchers have proposed different formulations for implemented in libccd [8], an open-source collision library
geometric objects of various shapes [1]. To simplify the for convex bodies. Kodam et al. [9] used cylinder-cylinder
process, typically, geometric objects (shapes) are enclosed intersection in Discrete Element Method (DEM) to simulate
inside simpler bounding volumes such as spheres, Axis the dynamics of particulate systems. They recognized six
Aligned Bounding Box (AABB), Oriented Bounding Box contact scenarios between bands (cylindrical surfaces), faces
(OBB), etc. and a broad phase test is done between the (circular faces) and edges (circular edges) and gave analytical
bounding volumes. If these volumes intersect, narrow phase expressions to determine the occurrence and type of contact.
testing is done between the actual geometry (shape) [2]. However, the axisymmetric nature of cylinders was not
Cylinder, though a very commonly used geometric entity, is exploited by them. Guo et al. [10] reported limitations with
usually not considered as a bounding volume because methodologies proposed by Kodam et al. [9] in certain
collision detection between two cylinders is reported [3] to be configurations of cylinders and proposed several additional
expensive. Instead, a capsule (cylinders with hemi-spherical tests and modifications to be incorporated for accurate tests
ends) has been suggested to be used as bounding volumes. between finite cylinders. The cylinder-cylinder collision
Note that the latter tests are quite simple. module in Teikitu Gaming System [11] also uses separating
axis tests but it is based on heuristic solutions and no formal
* This research was funded by BARC/ BRNS, Mumbai, India, under the derivation is available in open literature. An analytical
project, “Setting up of a Programme for Autonomous Robotics” at formulation was reported in [12] to find the proximity of two
IIT Delhi, India. cylinders in 3D space. Each cylinder comprised of four
R. G. Chittawadigi is an M.S. (Research) student in the Department of geometric primitives and shortest distance between five
Mechanical Engineering, Indian Institute of Technology Delhi, New Delhi, combinations of these primitives was used to conclude if two
India (e-mail: rajeevlochan.iitd@gmail.com).
S. K. Saha is a professor in the Department of Mechanical Engineering, cylinders collide or not. However, four of these were solved
Indian Institute of Technology Delhi, New Delhi, India (phone: +91 11 in closed form, whereas the fifth combination required
26591135; fax: +91 11 26582058; e-mail: saha@mech.iitd.ac.in). solution of an eighth-order polynomial equation.
where is called the resultant vector and is called the B. DH Parameters Based Transformation
moment vector, which are related as
To represent a coordinate frame with respect to another,
(3) six coordinates or parameters are required, of which three
correspond to the relative position (e.g., position vector) and
In (3), is the position vector of any point P on the line remaining three for their relative orientation (e.g., Euler
shown in Fig. 1(a). Operations on dual vectors are performed angles). Melchiorri [19] reported that four Denavit-
similar to those on Cartesian vectors. For example, dot- and Hartenberg (DH) [13] parameters, typically used in geometric
cross-products of two dual vectors, also referred to as line modeling of serial robots, and additional two parameters can
dot- and cross-products [14], are defined by also be used as the required six parameters, referred here as
. . (4) six DH (SDH) parameters. As illustrated in Fig. 2, the four
IV IV
DH parameters between frames and ,
. . . relates a line ( IV ) relative to frame . The extra
(5) parameter c is required to locate the origin of frame
along IV and parameter φ to orient V (parallel to IV ) with
. The six DH parameters are described in Table I.
In the same way, the Euclidean norm of a dual vector is
given by TABLE I. DESCRIPTIONS OF SIX DH PARAMETERS
. Parameters Description
(6)
b Distance between and I along
where and are the Euclidean norms of the dual θ Angle between and II about I
I
vector and vector , respectively. Dual unit vector is a Distance between II and III along II
defined as a dual vector whose Euclidean norm is equal to
unity [18], i.e.,
α Angle between III and IV about III
c Distance between IV and V along IV
(7) φ Angle between V and along V
5354
V V IV IV
,
IV
I II
,
V V
,
II V
III II
I II V
IV
I III III
IV
II
II III
III ,
I
,
III IV I
,
5355
B
Volume of
intersection
B
A B
A
B
A
5356
T
; (17) 2 (30)
T
; (18) 4 4 (31)
T
; (19) 2 2 2 2 (32)
T
; (20) 6 2 2 2
where , and are half-breadth and half-extent 4 4 4 4 (33)
of , respectively.
2 2 (34)
The condition for touching at the boundary exists if two
2 2
rectangles just touch each other. It can be established by
constraining a vertex of one rectangle to lie on an edge of the 2 2
other. This can be derived as algebraic equation in u. The
tests are done for 32 possible combinations of edges and Equation (29) can be solved using the analytical technique
vertices, of which two are illustrated here. Tests on remaining reported in [21]. Note that only two solutions of u are real
combinations are similar. and geometrically feasible. If one or both of the real solutions
of u lie(s) in the interval defined in (24), the Z coordinate of
1) Vertex on Edge vertex is determined to find if lies on the edge
The condition for vertex to lie on edge is and not beyond it. Hence collision is concluded.
obtained by equating the Z components of vertex and
Note that by substituting u = 0 and a = 0 in (13-20), the
in using (13) and (20), as illustrated in Fig. 8(a), i.e.,
coordinates of the projected rectangles and , introduced
(21) in Fig. 6 can be determined.
which is rearranged as B Frame B
(22) B A
(23)
After solving (23), one or both of the real solutions of u are
Figure 9. Condition for vertex to lie on edge
tested to lie in the interval defined by
| min , max , (24) IV. APPLICATION
For value(s) of u lying in the interval of (24), the Y For broad phase collision tests between robot links and
component of is tested if it lies on the edge and not objects in the environment, Oriented Bounding Box (OBB)
beyond it. If so, it is concluded that the projected rectangles was used in [22], whereas Axis Aligned Bounding Box
and intersect and hence the cylinders and (AABB) was used in [23]. If they collide, actual geometric
intersect and tests for the remaining combinations of vertices shapes of the robot links are then tested for collision. As most
and edges are not required. of the robot links are not rectangular blocks but cylindrical in
shape, the broad phase tests are too conservative. Hence, to
2) Vertex on Edge overcome this, the links are considered as cylinders
The condition for vertex to lie on edge , as (bounding volume), as also reported in the literature, e.g., [4].
shown in Fig. 9, is obtained by equating Y components of
and using (14) and (20), i.e., In this paper, as a proof-of-concept, cylindrical shaped
link for one-DOF arm and cylindrical obstacles were
cos sin (25) modeled in Autodesk Inventor software, as shown in Fig. 10.
Which, unlike (21), has term of . Substituting f ≡ 1, g ≡ The proposed analytical method was implemented as an
cos and h ≡ sin in (25), a general form is addin module inside the software using Visual C#. The joint
given by was rotated programmatically and the collision tests between
the arm and the obstacles were determined using the
0 (26) proposed methodology. The tests were also performed using
the methodology in [4] and collision detection module of
From cylinders’ geometry, Fig. 8(b-c), two equations are
Autodesk Inventor. The results of the collision tests, i.e., the
(27) boolean (true or false) value, matched perfectly for each
increment in joint angle, thus, validating the proposed
(28) methodology. Note that Autodesk Inventor uses a 3rd party
Combining (26-28), a quartic equation in u is then obtained commercial library by D-Cubed [24] for collision detection.
as follows: No detailed mathematical formulation on D-Cubed is
available in open literature. On the other hand, the authors of
0 (29) [4] used MATLAB environment for the implementation of
where the coefficients of the equation are their algorithm.
5357
relies on planar geometries, thereby, making the collision
Joint Axis tests fairly straightforward, unlike those reported in the
Obstacle 1
Obstacle 2 literature which are based on either 3-dimensional spatial
geometries or iterative procedure. Based on the CPU times of
three different algorithms used to test the collision of the task
shown in Fig. 10, the proposed algorithm has been proven to
Arm
Obstacle 3 be accurate and most efficient.
5358