You are on page 1of 6

ICACSIS 2013 ISBN: 978-979-1421-19-5

Development of Augmented Reality (AR) for


Machining Simulation of 3-axis CNC Milling
Gandjar Kiswanto, Dedy Ariansyah
Laboratory of Manufacturing Technology and Automation
Department of Mechanical Engineering - Universitas Indonesia
Kampus Baru UI – Depok 16424
Email : gandjar_kiswanto@eng.ui.ac.id

Abstract - Machining simulation to verify the such as Virtual Machining (VMach) in machining
correctness of numerical control (NC) program process. Some reviews were carried out and thus find
before physically downloaded and executed to a out that the development of VMT and VMach have
real machine tool is a common practice in many expanded over the years, from simple simulation (e.g.
industries. Many simulation system that previously tool-path generation, NC-code verification, and
enhanced and applied based on 3D graphics in material removal simulation) to complex predictions
virtual reality (VR) environment, require (e.g. tool deflection, surface errors, and surface
measuring of completely dimension of a real roughness) [1][5].
machine tool before modeling of a complete A system name VR Computer Numerical Control
machine tool. Besides, a large number of (CNC) was developed [2] to support virtual training.
machining rules and theories must be modeled This kind of technology mimics the real machining
correctly as well as simulate complex machining operation with models and simulations allowing the
process require prior expertise knowledges. This interaction with high sense of reality but produces no
paper proposes machining simulation system output such as materials and physical products instead
which is easier to set up and operate through it can produce assistive information to the user.
integrating with the Augmented Reality (AR). By However, this VR CNC system requires the
integrating AR, machining simulation can be measuring of completely dimension of a real CNC
performed on a real machine tool without the before modeling of a complete machine tool in virtual
needs to model the machine itself, machining rules, machining environment which is time consuming. In
and theories thus provides more accurate NC addition, a large number of machining rules and
program. The developed system can assist the user theories must be modeled correctly as well as simulate
for positioning collision-free set up which is complex machining process require prior expertise
commonly occurs especially when conducting knowledge. Unlike the research that making use VR
complex motion during machining process. A more technology to support the VMT and VMach, this
detailed discussion related to AR development for paper proposes the development of Augmented
machining simulation is presented in the paper. Reality (AR) to support the VMach. The proposed
system utilize AR that supplements reality with
Keywords: Machining simulation, Augmented virtual information. Ideally, it appears to the user as if
Reality, collision-free set up the virtual 3-D objects actually exist in the real
environment [3]. Therefore, the real machining
I. INTRODUCTION environment is supplemented with necessary
information (cutting tools, workpiece, fixtures, and
The benefits of Virtual Reality (VR) implemented in etc.) rather than completely replacing it with synthetic
manufacturing system have been rapidly recognized environment. Through AR, the user need not to
and researched over the years. Meanwhile the modeling the whole component of a machine tools
advances of computer technology and existing of and predicting it’s capabilities in virtual system to
graphics card accelerator are making the VR conduct the machining process, instead a user can see
technology increasingly more attractive and realistic the real machining environment as well as conducting
with result that many potential application in machining simulation on real machine tool efficiently
manufacturing system can be integrated to provide a without having to worry about possibilities of
useful means for products to be manufactured machine and tool breakages.
efficiently. The integration of VR technology to the Compared to VR, AR offers higher sense of reality
one of the manufacturing system that gained interest to the user, reducing computation time and efforts as
in research community is development of Virtual well as increasingly more accurate to evaluate and
Machine Tool (VMT) systems. A large amount of validate the behaviour of the system since only a few
work has been conducted either for the purpose of virtual objects are modeled and geomterically
designing a complete machine tools or in more updated.
specific by simulating machine tool’s capabilities

/13/$13.00 ©2013 IEEE 143


ICACSIS 2013 ISBN: 978-979-1421-19-5
Workpiece
Selection
Fixture
Real cutting tool
Selection

Processing Unit Virtual workpiece


and fixture
Augmented Reality Module

Workpiece Fixture Workpiece


database database Selection and

Rendering Virtual Object


Visualization
Database & System Fixture
Management Selection and
visualization
Single Operator & Screen
Vision-based Material
Marker
Removal
based spatial display
Tracking and
Multiple Registration Visualization
Marker

Real Machining
Environment
Camera

Vertical
axis
Marker

Horizontal
axis

Fig. 1. System architecture of AR CNC

The integration of AR technology to CNC in five-axis CNC milling. The Structure of the paper
machine tools especially in 3-axis milling machine is arranged as follows. Section 2 discusses the
tools had been realized many years ago. The authors developed system architecture of AR CNC and
[6] developed the machining simuation by combining integrating AR technology to the real machine tool.
reality with virtual information through AR Section 3 presents the implementation of AR
technology to show the possibilities and feasibilities technology in machining process. Finally, discussion
of this fusion with objectives to enhance of further researchs and concluding remarks are given
manufacturing quality and efficiency, and also realise in Section 4.
manufacturing automation. With the improved
bounding boxes method, the Material Removal Rate II. DEVELOPED SYSTEM ARCHITECTURE OF AR CNC
(MRR) estimation can be calculated thus near real-
time MRR is visualized. The tracking system in Fig. 1. shows the developed system architecture of
prepared and unprepared environment which have AR CNC. This developed system consists of four
been one of the challenges issue encountered in functional modules: a real 3-axis CNC milling,
building the AR system is implemented by using camera and marker as vision-based tracking,
marker and KLT feature tracker respectively. Many processing unit, and display device using screen-based
years later the authors improved the machining video see-through display. In this proposed system,
simulation system for traning purpose by making the ARToolkit [9] library was utilized to build the AR
interaction of real cutter with virtual workpiece, system by using fiducial marker. As compared with
cutting force prediction and collision detection, sensor-based tracking, vision-based tracking is more
improving the computational time in tracking system convenient since preparation of sensors and related
[7] as well as developing the hybrid feature tracking devices will decrease the flexibility of the system. To
system [8]. build the integration of AR on a real machine tool,
In this paper, we endeavour to explore the benefits markers with different pattern have to be attached
of AR technology which is used not only for properly in the real machining environment to register
previously reported purposes, but also for helping the the virtual workpiece, fixture, and cutter. However, it
fixture or workpiece clamping set up which has been realised that the use of single marker is not
commonly collide with the real cutter during actual sufficient for certain applications which involve the
cutting process according to the NC program complex movements of real objects that might
especially include the complex motion of cutting tool potentially occlude the marker from the view of
in five-axis CNC milling. Besides, multiple markers camera. Thus, multiple markers was used to resolve
was implemented due to the limitation of marker- and anticipate the limitation of single marker where
based tracking in which the virtual objects will only the virtual objects will only appear when the tracking
appear when the tracking mark are in view. In mark is fully in view, whereas the marker is
addition, the use of marker-based tracking system was potentially occluded by cutting tools and tool holder
developed to realise the integration of AR technology during machining process. Screen-based video see-

144
ICACSIS 2013 ISBN: 978-979-1421-19-5

through display was selected for display device due to between one marker and another are known, the pose
the limited size of screen when using head-worn of one marker can be reliably estimated by another
display and hand-held display as well as it exhausted visible markers allowing the user displays the virtual
the user especially when the user must work and wear objects anytime as long as one of the markers is fully
the display device at the same time during the in view.
simulation. It also represents probably the most cost
efficient AR approach, since only camera video and B. Virtual Objects Selection
standard PC equipment are required. As preparing the actual machining process, the user
This AR CNC can simulates machining process by needs to define the workpiece and typical fixture to
firstly selecting various shape of virtual workpieces clamp the workpiece before performing the machining
and fixtures used during machining operation and process. The various shape of workpieces and fixtures
augment them according to the pose of marker located were modeled virtually and available in the workpiece
on a real machine tools in a real scene. The cutting and fixture database. The size of virtual objects are
process between the real cutting tool and virtual freely modeled according to the defined dimension.
workpiece based on the Numerical Control (NC) The main goal of virtual objects selection is allowing
program will then be displayed to the users using a the user to match the requirements of machining
video see-through scene rendering mechanism in a simulation that can be performed on any CNC
real-time. The virtual fixture helps to verify the NC machines.
program which is commonly include the collision
with tool holder and cutting tools during machining C. Material Removal Visualization
process. The first important thing to build machining
simulation by means of AR technology is to do
A. Marker-based Tracking synchronization of real machine tool movement with
One of the key requirement for creating AR the updated virtual object during simulation in
application is a tracking system that capable to recorded or live video feed. This such synchronization
measure accurately the position and the orientation of is created through the interaction of real cutter and
the observer’s location in space. The tracking system virtual workpiece. The idea for creating interaction
used in ARToolkit relies upon computer vision (CV) between real cutter and virtual workpiece is to define
algorithm by analyzing the images captured from when or where they collide each other. To define the
camera in live video feed to calculate the pose. By collision, the intersection between real cutter and
placing special fiducial markers with unique pattern at virtual workpiece has to be calculated by previously
known locations in the environment, the marker can tracking and reconstructing machine coordinate
be easily detected and identified in video live feed and system (MCS) into tool coordinates system (TCS) and
hence the pose estimation can be calculated. To workpiece coordinates system (WCS) in AR
achieve the augmentation of virtual objects in a real environment near real-time. To construct TCS and
scene the position and orientation of marker relative WCS, we used two predefined marker with different
to the camera have to be recovered which can be pattern that was glued to the tool holder and
represented by 6 independent variables or six degrees worktable. This method yields two different
of freedom (6 DoF) tracking systems (3 translational coordinates system which represent TCS and WCS so
coordinates and 3 rotational angles) or (Tcm) through that relative position between real cutter and virtual
image processing. Therefore, the user can freely workpiece can be tracked dynamically in live video
augment the virtual objects in accordance to the stream near real-time. After that the position of the
marker coordinates relative to the camera coordinates cutter tip center with respect to the TCS must be
in a real scene. approximated by doing precalibration. The cutter
position in TCS is then transformed into WCS using
ܺܿ ܴ11 ܴ12 ܴ13 ܶ‫݉ܺ ݔ‬ linear transformation matrix. By doing so, the
ܻܿ ܴ21 ܴ22 ܴ23 ܶ‫ܻ݉ ݕ‬ collision can be detected along the tool path. If the
൦ ൪=൦ ൪൦ ൪
ܼܿ ܴ31 ܴ32 ܴ33 ܶ‫ܼ݉ ݖ‬ cutter position lies within the volume of workpiece,
1 0 0 0 1 1 then the collision occurs, and hence intersection
points can be calculated to generate tool swept
ܺ݉ ܺ݉ volume. The tool swept volume for each NC-path is
ܴ3‫ݔ‬3 ܶ3‫ݔ‬1 ܻ݉ ܻ used to substract part of the virtual workpiece.
= ቂ ቃ ൦ ൪ = ܶܿ݉ ൦ ݉൪ (1)
0 0 0 1 ܼ݉ ܼ݉ The second is modeling scheme method to
1 1 represent the virtual workpiece and simulate material
Camera calibration which is usually conducted before removal process in machining simulation. These
the initialization phase to obtain appropriate modeling scheme can be categorized into two
parameter intrinsics of camera to compensate lens approaches: direct solid modeling and spatial
distortion is not discussed here. On the other hand, the partitioning. Each of these approaches has been
user can use multiple markers to realise more complex widely adopted to create machining simulation with
applications. Once the relation 6 DoF coordinates varying ranges of applicability and degrees of success.

145
ICACSIS 2013 ISBN: 978-979-1421-19-5

The major disadvantage of the direct solid modeling


approach to machining simulation is the
computational complexity of regularised Boolean set
operations [4], meanwhile spatial partitioning
approach decompose a solid object into a collection of
basic geometry elements, thus simplifying the Z
processes of regularised Boolean set operation. There
are many kind of basic geometry elements
implemented to discretise the solid object including z-
buffer data structure, dexel data structure, and ray
representation. However, they are not capabe to be
used to address multidimensional milling verification
for workpieces of comparable complexity and
accuracy [4], therefore voxel representation were used Y X
in this paper. The grids size of voxel representation is
dynamically modified according to octree data level
(a)
management. Surfaces that are not affected by cutter
position remain representated in large grids to speed
up the rendering information during simulation.

III. IMPLEMENTATION OF AR CNC

The proposed system was initially developed and


applied in 3-axis CNC milling machine. There are
numerous type of 3-axis CNC milling machine tools
that have been widely available commercially and
used in many industries and institutions. Each of them
has it’s own machine tool characteristics ranging from
type of fixture, tool holder, degree of freedom, size of
machine, power, and etc. The proposed system to
simulate machining process can be conducted on any
kind of machine tools. It provides the various shape of
workpieces and fixtures to be selected and thus match
the requirements to perform machining simulation. (b)
Fig. 2 . Single marker implementation with various shape of
A. Workpiece and Fixtures Set up virtual workpiece: (a) cube, (b) cylinder, and various shape of
clamping fixture: (a) Jigged, (b) T-slot clamping
Before performing machining simulation, the
workpiece and fixture are set up by locating them to Fig. 2. shows the workpiece and fixture set up with
the correct location. Since the virtual objects are different shape of virtual workpieces and virtual
located according to the position and orientation of fixtures with respect to the marker.
the related marker, the movements of the mechanical
unit of CNC machines have to be taken into
consideration when attach the markers on CNC
machines. Due to the ease of implementing marker-
based tracking, this fiducial markers can be attached
to any location according to the movement
configuration of mechanical component in any CNC
machines. In this experiment, the AR CNC system
was applied to the 3-axis CNC milling machine with
2-axis (x and y axis) translation from worktable and 1-
axis (z axis) translation from the tool holder as shown
in Fig. 2a. Since the simulation of machining process
is achieved according to the movement of the real
cutting tool and the virtual workpiece, the marker with
recognized pattern for augmenting virtual workpiece
and fixtures has to be attached on the worktable.
Another marker with different pattern for augmenting
virtual cutting tool was attached to the tool holder.
Fig. 3 Multiple markers occluded by real object ; (a), (b)
composite markers, and (c), (d), (e), separated markers.

146
ICACSIS 2013 ISBN: 978-979-1421-19-5

However, the movement of cutting tool at certain path noticed. Initially, virtual objects rendered in real scene
during simulation can potentially occlude the marker always occlude the real objects thus making the real
from the view of the camera and making the virtual cutting tools along certain path occluded by virtual
objects disappeared. Hence, the multiple markers was workpiece when it should be visible and displayed in
used to anticipate this occlusion problem for making front of the workpiece. This occlusion problem was
virtual objects remain appeared by detecting another solved by making use of OpenGL Depth buffer by
visible markers. Fig. 3. shows the implementation of rendering the real scene pixels from different marker
multiple markers. attaced to the tool holder within the real cutting tool
rendering area over the virtual workpiece. Fig. 5.
shows the resolved occlusion problem by means of
depth buffer rendering rule.

B. Near Real Time MRR Visualization


In the early stages, the system simulation was
developed on a 3-axis CNC milling. Hence, this
system is limited to 3-axis machining simulation as
well as only consider linear cutter paths. To visualize
material removal on the system proposed, a simple
NC program were created for simplification. Fig. 6.
Shows the simulation of machining process in AR
CNC. During the simulation process, the system
displays a real cutter machining a virtual workpiece in
which the initial workpiece is incrementally converted
Fig. 4. Multiple markers implementation to realise multi-
into the finished part.
axis machining After all, this proposed AR CNC system will
contribute to the following several aspects:
Further, the relation of 6 DoF coordinates marker
between one to another can be developed to realise the 1. NC program which is generated semiautomated by
workpiece and fixture set up for multi-axis milling system or manually by machinists might include
CNC machine which involve complex motion. Fig. 4. the machining errors and collisions between tool
shows by consider the box as if it is the worktable in holder, workpiece and fixture especially when NC
multi-axis milling CNC machine and multiple program involve complex motion in multi-axis
markers are attached to it. The virtual objects were machining. therefore, machining simulation is
drawn to another marker with respect to itself. used to validate the generated information for
machine tools before it is physically downloaded

(a) (b) (c)


Fig. 5. Solving occlusion problem via depth buffer: (a) virtual objects occlude the real cutting tool, (b) rendering virtual cutting
tool, (c) rendering real scene pixel within the real cutting tool rendering area.

However, when the marker is occluded or not in and executed. During the simulation, the user can
camera view (for example when the worktable were observe the machining process as it proceed so
tilted and the marker is not detected), then the virtual that the selection of workpieces and fixtures in
objects remain appeared by detecting another visible machining simulation can help the user for
markers. The rendering information of virtual objects positioning collision free set-up during the
to the real scene that occlude the real objects has been machining process.

147
ICACSIS 2013 ISBN: 978-979-1421-19-5

2. Since the simulation of process machining are will be very beneficial to validate NC program and
performed on real machine tool, AR CNC system positioning collision-free set up of workpieces and
provides increasingly more accurate to visualise fixture. A simple and a few set up required to conduct
the material removal simulation including correct the simulation including correct kinematics of the
kinematics without the need to build VMT which machine tools movement without the needs to model a
is common in several commercial CAM system complete machine tools and predicting it’s
for the purpose of NC program verification. capabilities. Since the workpieces and fixture set up
has been realised and can be integrated to multi-axis
machine, the complex motion of multi-axis which is
prone to errors as well as collisions between the
cutting tool and clamping fixture which are
commonly difficult to anticipate can be predicted, as a
result the NC program can be adjusted accordingly.
This system can also be expanded to resolve the
collision situation during the simulated process by
automatically generate and apply the appropriate tilted
and rotation angle to the NC path. The physical aspect
can also be developed and applied in this system to
provide the automatically generated machining
parameters to optimize the NC program.

REFERENCES
[1] Aini Abdul Kadir , Xun Xu , Enrico Hämmerle, Review:
Virtual machine tools and virtual machining-A technological
review, Robotics and Computer-Integrated Manufacturing,
v.27 n.3, p.494-508, June, 2011 .
[2] Kao YC, Cheng HY, Chen YC, “Development of a virtual
controller intergrating virtual and physical CNC”, Materials
Science Forum 505-507, pp. 631-636, 2006.
[3] Azuma R. A survey of augmented reality. Presence:
Teleoperators and Virtual Environments 1997;6(4):355–85.
[4] J. Donggo, K. Kwangso, and J. Jungmin, “Voxel-based virtual
multi-axis machining”, International Journal of Manufacturing
Technology, Vol. 16,cpp. 709-713, 2000.
[5] Tamer M. Wasfy, Ayman M. Wasfy, Hazim El-Mounayri,
Daniel Aw, “Virtual training environment for a 3-axis CNC
milling machine”, Proceedings of IDETC/CIE 2005, ASME
2005 International Design Engineering Technical Conferences
& Computers and Information in Engineering Conference,
Long Beach, California USA.
[6] J. Zhang, S. K. Ong, A. Y. C. Nee. A volumetric Model-Based
CNC Simulation and Monitoring System in Augmented
Environments. Proceedings of the 2006 International
conference on Cyberworlds IEEE.
[7] Zhang J, Ong SK, Nee AYC. AR-assisted in situ machining
simulation: architecture and implementation. In: ACM
SIGGRAPH 7th international conference on virtual-reality
continuum & its applications in industry. SIGGRAPH VRCAI
conference. 2008.
[8] Zhang J, Ong SK, Nee AYC (2010) A Multi-regional
Computation Scheme in an AR-Assisted in situ CNC
Fig. 6. AR CNC machining simulation process Simulation Environment. Computer-Aided Design
42(12):1167–1177.
[9] ARToolKit 2.72, http://www.hitl.washington.edu/
IV. FURTHER DISCUSSION AND CONCLUDING artoolkit/download/ (last accessed 18.07.2012).
REMARKS

The prosposed system by integrating AR technology


to create machining simulation on any CNC machines

148

You might also like