Copyright © IFAC Manufacturing Systems: Modelling, Management and Control, Vienna, Austria, 1997
COMPUTER PERIPHERAL DEVICE FOR MODELLING 3D OBJECTS IN A CAD ENVIRONMENT Nelson Acosta1 & Gery Bioul
ISISTAN -Departamento de Computaci6n y Sistemas Facultad de Ciencias Exactas - UNCPBA San Martin 57 - 7000 Tandil - Provincia de Buenos Aires -Argentina Email:
[email protected]
Abstract: The complexity of 3D-object design on a CAD workstation system is mainly due to the defInition of the coordinates that delimitate the object-space. The quantity of points dramatically grows with the required detail level of the object. The coordinates set may be defmed and adjusted point by point, to obtain a good quality design. This task is time consuming, thus expensive. The 3D graphic defInition is a hard job in which one of the most complex problems is the difficulty to represent the 3D workspace using only 2D devices (such as mouse, 2D screen, 2D scanner). The presently available specifIcation devices are either not easy to use or very expensive. The users generally work with conventional 2D devices, but it is necessary to emulate a 3D space. This abstraction overloads the application fIeld of each function which accordingly trends to become ambiguous. The proposal of this paper is to reduce the defInition time by proposing a device design that would be able to work as a 3D digital pointer, theBEE. The 3D pointer (BEE) is designed to provide, in a practical and easy to handle way, 3D coordinates to the workstation which will generate the computerized graphic defmition. The BEE allows the automatic capture of each object coordinate. Once the relevant points have been captured, the corresponding coordinates can be used to derive primitive objects (using lines, curves, arcs, planes, surfaces). Those primitive objects can then be used to form a complex object. The system uses the BEE as a kind of 3D mouse with the capacity to point at any point of the object space. Keywords: CAE, controlled devices, data acquisition, measuring points, input elements
1.- INTRODUCTION
and saved in a computer system for further processing (Blanchard, et al. , 1990; Rays, 1993; Krueger and Froehilich, 1994; Marcus, 1993).
The decreasing prices together with the increasing processing capacity of modem computer systems, make CAD/CAM systems every day more attractive for industrial applications. A great amount of research and development is currently dedicated to cope with the continuously growing demand from industry. A particular aspect of this demand comes from the need of easy to handle peripheral devices for capturing physical data of objects to be sketched
The complexity of 3D-object design on a CAD workstation is mainly due to the defmition of the coordinates that delimitate the object-space. The quantity of points dramatically grows with the desired detail level of the object. The coordinate set must be defIned and adjusted point by point, to
1 Becario Perfeccionamiento, Secretaria de Ciencia y Tecnica de la UNCPBA, Tandil, Bs. As., Argentina.
225
obtain a good quality design. This task is time consuming, thus expensive.
Whenever needed the data will be addressed by the computer to the registers of the peripheral device. The basic pointer structure is an articulated arm similar to an exoskeleton. This device is designed to capture universal XYZ coordinates within the workspace range. Those coordinates are computed, with reference to joint 1 (base to link 1) location, from the links angular deviations. The operator directly handles the system, moving it manually up to the point to be captured in order to ascertain and store coordinates.
3D graphic definition is a hard job in which, one of the most complex problems is the difficulty to represent the 3D work space using only 2D devices (such as mouse, 2D screen, 2D scanner). The presently available specification devices are either not easy to use or very expensive. For price reasons, the user generally works with conventional 2D devices, but it is necessary to emulate a 3D space. This abstraction overloads the application field of each function which accordingly trends to become ambiguous (Marcus and Van Dam, 1991 ; Mandelkern, 1993 ; Nielsen, 1993). The basic idea is to reduce the definition time by using a 3D device that work as a 3D digital pointer. From now on, this device is referred to, asBEE. The BEE allows the automatic capture of each object coordinates. Once the relevant points have been captured, the corresponding coordinates can be used to derive primitive objects (using lines, curves, arcs, planes, surfaces). Those primitive objects can then be used to form a complex object. The system uses the BEE as a kind of 3D mouse with the capacity to point at any point of the object space.
The workspace required by the application should be within the range of the BEE. Every capturing operation involves: end-effector space location adjustment, then, computer evaluation of XYZ coordinates through angular deviation transformations (Denavit and Hartenberg) with eventual adjustments for base translations (Critchlow, 1985; Samson, et al., 1991 ; Sandler, 1991). Calculation can be carried out by processing units directly attached to the device or by a remote computer connected to the BEE. This latter option has been selected in this work because, on one hand, the BEE design can be significantly simplified while, on the other hand, standard computer software is perfectly suited to handle the task.
The definition of a complex 3D object, in a CAD workstation environment, consists of locating all the points necessary to delimit, as uniquely as possible, the space occupied by the object. Generally, for irregular objects, the number of points to be located can increase dramatically with the desired detail level of the representation.
2.1.- MECHANICAL STRUCTURE The basic mechanical structure is made of five links with the following features (Fig. 1): • link 0: the steady base, • link 1: vertical rod, with rotational degree of freedom around its main axis Z (angle 8) • links 2 to 4: articulated with respect to each other with a single angular degree of freedom (angles a., J3, y) . On every joint is mounted an encoder whose function is measuring and coding the related angle. In the proposed implementation, the encoder is based on mechanical-optoelectronic principles (Johnson, 1988; Lee, 1988).
2.- BEE SYSTEM ANALYSIS The key idea of this work is to explore the capabilities of exoskeletons to work as data capturing instruments. A prototype has been designed with 5 links/4 degree of freedom (Fig. 1). One of the most simple applications to be mentioned is the successive establishing of some specific details of a three-dimensional object in real space. As far as a good precision can be achieved, such tool will provide the following advantages: increased speed in data retrieving, providing errorfree dimensioning, less operator skill with respect to that required by manual instruments, and all computation efforts transferred to the computer CAD system. The application proposed will use a graphic 3D editor defmed as a subset of a CAD package. The display representation, on a SVGA monitor, will be wire-frame.
Link 3
8 :R-otat1on81'lgte . et : B~e-linkLimgle
~~~ --~"""~. ".
.B :llnk 1-2an.g1e . 'j :Jink2-3 angle
...
·FiglBEE;'Device$cheme .
The equipment is adapted for measuring 4 angles in parallel, without requesting computer assistance.
2.2.- ENCODERS
226
Encoderclis c
dWith joint
•
Detail zoomed below ·
•
i
~•
B-Channel
A.Channel
•
in 1//77 1 Slots encoder
Distance between detectors . ~ ~ ~
. IJ El tJ .:
disc
~
D etail ·o f signals lJ1.fl.J1IU11l A·Chumel signal nnJlJ1.flDI B-Channelsignal
• .
Fig. 2 ~ Photodetectordiagram
has a diameter of 15 mm (0.59 inches) with 48 radial slots on a single track. It is made of plastic and rotates on a metallic axle. An optoelectronic mechanism made of 2 sets of infrared emitter-diode with phototransistor sensor. These sensors receive the light whenever they are in front of a slot. They are located at a distance computed to generate two waves, A and B, with exactly 90° phase deviation (Fig. 2). An electronic phase detector suited to determine the rotation direction according to the time sequence of wave A and B. An electronic unit to add/subtract the digitalized optical signals generated by the slotted-wheel movement. The prototype system architecture works with a word length of 16 bits. This affects the precision and/or the working mode (incremental/absolute). Computer interface with the following functions : click reading, reset signal, encoder (joint) selection.
2.3.- BEE INTERNAL CIRCUIT The block diagram circuit is presented in Fig. 3. The functional parts are described as follows : a) Photodetector signal conversion to comply with the selected technology (TTL). One of the outcomes of this conversion is good discrimination between the 0 and I levels. Emitter currents (iA and iB) settings according to the sensitivity of the photodetectors and to the transparency of the slotted-wheel material. b) Phase detector for rotation direction determination. Multiplexing stage for pulse selection and c) counting sign (forward/reverse) transfer to the pulse counter. Pulse counter, updating the coded angular cl) position of the joint. Actually, the unit of angle variation is the slotted-wheel step period. Address bus, selecting the control card device e) for the joint whose angle variation has to be read. Data bus from the counter register to the f) computer. 8-bit data bus has been selected in order to reduce wiring complexity. Control bus for counter enable, reset, g) high/low 8-bit sub-register selection, data output enable. Address recognizer selecting the control card h) by connecting to control and data buses.
An encoder is a transducer, whose output are pulses or binary numbers representing an attached shaft position or movement. Typical optical encoders use a transparent disc marked with concentric opaque stripes or an nontransparent disc with radial slots. This latter one be referred to as slotted-wheel. A photo emitter is placed on one side of the disc and a photo receiver on the other side. Whenever the disc rotates, the light ray is periodically interrupted. The photo receiver thus generates a pulse wave whose frequency is proportional to the rotation speed. Typically, two emitter-receiver sets are operated to generate waves with 90° phase deviation between each other. The phase deviation sign denotes the rotation direction of the disc. Accumulation (with sign) of pulse countings allows computation of a new position with respect to a known initial one (Haznedar, 1991; Sandler, 1991 ; Koivo, 1989). The encoder used on each joint of the BEE device is not commercially available. It was designed at the Instituto de Sistemas de Tandil (ISISTAN) 1 . The design was deeply inspired by the mouse tracking system technology. The encoder has the following characteristics. • A gear multiplication mechanism at the end of which, a slotted wheel is attached. This wheel 1 ISISTAN, Instituto de Sistemas de Tandil, Departamento de Computaci6n y Sistemas, Facultad de Ciencias Exactas, Universidad Nacional del Centro de la Provincia de Buenos Aires: 57, San Martin, 7000 Tandil, Provincia de Buenos Aires, Argentina.
The device architecture has been thought to discharge the computer from most minor tasks, for example, excluding interruption requests whenever
227
One of the key features of the software is its ability to move objects on the display, according to userdefmed viewpoint modifIcations. This eases the maneuver of the BEE pointer around the object to be "sketched". The selected display representation is the polygon wired-frame scheme. This representation is well suited for hidden-line vision generation. The main features of the 3D editor are: a) elemental drawing primitives: point, line, circle, and planar sections. Points may be combined to produce any other primitive. b) complex objects building: using primitives or complex objects. c) embedded virtual BEE: the exoskeleton device is represented in the virtual scene at the same object scale. d) objects adjustment: adjusting an object to another one with parameters such as: element angle, common edge, relative coordinate, .. . e) object modification on screen: allows any modifIcation process using classic editing procedures. Procedures selection may be operated either from a keyboard/mouse device or using the 3D pointer, directly on the real part or in combination with a pointing frame. ~ saving and retrieving graphical objects: custom fIle formats have been designed to minimize conversion time between disk and main memory. g) exporting to standard CAD-systems: using DXF (Data Exchange File) from AutoCad. h) adjustable viewpoint: as described above. i) setting or checking geometrical data: by selecting then entering dimensions or inquiry respectively. Selection can be made either on the image or on the real object. Object dimensions can be set from data either pre-defIned or acquired from an high-precision measuring instrument.
a slot count has to bereiiste~~d. \Vhenever the computer software requires a reading, it can access the control card through the address bus.
3.- SOFTWARE 3.1.-LOW-LEVEL SOFTWARE The device driver is built using pooling techniques to transfer data from the BEE device to the computer. The pooling technique is implemented by sequences of IN and OUT operations. The driver provides preprocessed data to the high level. When starting, the driver fIrst task is PPI (Programmable Peripheral Interface) setting to cope with connection wiring assumptions. PPI is the classic 8255A integrated circuit. Any BEE device information to or from I/O ports passes through the 8255A. Angle information reading procedure is periodic. The real time clock (8254) of the computer is used to generate programmable interruption request pulses.
Cartesian coordinate computation involves a great quantity of trigonometric calculations. For this reason, computation time on a common PC platform is prohibitive in view of the "real time" processing needs (typically 10 readings/sec.). On the hand, the limited mechanical precision of the BEE device prototype does not provide a high number of signifIcant fIgures for trigonometric function values. To accelerate the arithmetic computation, an algorithm, based on straight table look-up, with linear interpolation, has been implemented by the construction of a RAM resident trigonometric table with 0.010 resolution. The memory space requirements is easily determined as 54000 bytes, with 6 bytes floating point representation. The
3.2.-HIGH-LEVEL SOFTWARE The 3D editing system is a reduced CAD package tailored to handle the BEE pointer captured coordinates. Its purpose is to depict complex 3D objects, to be eventually further combined into higher level ones. As commented before, joint position data conversions to Cartesian coordinates are assigned to this level.
228
RAM table was set up by storing values from Pascal trigonometric calculations.
b) Geometrical restrictions; clearly the respective dimensions of the links will affect the range and the resolution. Moreover the mechanical characteristics (elasticity, dilation, ... ) of the link material are key factors, not considered in this work. c) Electro-mechanical restrictions; the quality of the joint encoder will affect the resolution (depending on slots/revolution number) and precision (depending on reliability of light emitter/detector system, and on how well-made the slots and wheel are). d) 3D editor limitations. The high level software has been designed as a minimal support environment. Further enhancements should be motivated by specific application needs. e) Platform characteristics and performances.
FIg. 4- Ben:lImrk. of the Thgon:xn:tric Furdions
'"
."
o =
""
Exc=bm Illlllilcr (100)
4.3.- POINTING ERROR ANALYSIS
Given the elementary error factors on joint angle( AY; ~Y and tu. can be readily formulated applying error calculus theory. Actually, if the system would be able to measure angles in a static position, errors on these angles could be fairly assumed. The (differential) technique adopted to derive angle values makes the error assumption quite difficult. This is mainly due to the relative way of measuring (accounting angle variations), taking into account that, for a given pointing operation, the sequence of link movements is not unique, and the error depends on this sequence. The BEE operation is strictly manual, so the incertitude on movement sequences is important. The basic conclusion to draw is that angle error assumption should be derived experimentally within determined working conditions. This analysis is out of the scope of this work. ~a, ~~, ~y and ~e) , the errors
3.3.- THE CAD-SUBSET GRAPHIC EDITOR
The implemented system does not share all the features of a standard commercial CAD package. Only some basic functions have been developed to illustrate the main applications of the BEE device. The graphic editor has some features that provides the CAD operator with some additional high level functions, enhancing the 3D job performances. Those features are described as follows . The CAD subset contains some measurement functions, thanks to which the designer can set or inquire (in the virtual or real space) about the object dimensions (Venolia and Williams, 1990; Wolf, 1992; Rubine, 1992). As mentioned before the operator can easily select or modify the point (viewpoint) from which he wants to view the object in the virtual space. From this point he can zoom in, zoom out, rotate around pre-selected axis, translate. Those functions are useful for editing or object recognition purpose.
4.4.- TRIGONOMETRIC ALGORITHA1S
A high-speed table look-up method has been implemented to compute sine/cosine functions. The performance of this method, including linear interpolation, has been compared to the one of algorithms implemented in the Turbo Pascal library (Fig. 4).
4.- SYNTHESIS
4.1.- CODE
The driver (=1000 lines) and the trigonometric functions (=1500 lines) are implemented in Assembler, while the CAD editing system (=12000 lines) is written in Pascal.
4.5.- SCREEN REFRESHING TIAfE DELAY Depending on the platform, the number of computations required to update coordinates (capture/conversion) produces some inertial effects on the virtual object. This effect can be overlooked either by slowing down the BEE ' movement or increasing the platform performances.
4.2.- RESOLUTION AND PRECISION The main quality limitations of the BEE system can be grouped into the following categories: a) Mechanical restrictions dependent on the quality of the individual components of the device. Obviously, this is mainly dependent on financial considerations. Prototypes have been designed to demonstrate feasibility without aiming at physical performances.
4.6.- CIRCUIT PROTOTYPING
2
The circuit card was simulated in the B Logic® 3.0 from B-Squared Logic and in the VHDL Compiler
229
® 1.2a from Model Technology. The prototype circuit was designed using the SrnArtWork® 1.3r4 (Artwork editor with autorouter) from Wintek.
SigGraph and SimGraph 1994, California. IEEE Computer Graphics and Applications, July 1993, page 76. Haznedar Haldun. "Digital Microelectronics". Benjarnin/Curnrnings Pub. Co., Inc., 1991. Johnson Curtis D. . "Process Control Instrumentation Technology". Prentice Hall, Englewood Cliffs, NJ, 1988. Koivo Antti J.. "Fundamentals for Control of Robotic Manipulators". John Wiley & Sons Inc, 1989. Krueger Wolfgang & Froehlich Bernd. " Visualization Blackboard: The Responsive Workbench". IEEE Computer Graphics and Applications, May 1994, pp. 12-15. Lee George. "Sensor-Based Robots: Algorithms & Architectures". Edited by C.S.George Lee, NATO Series, 1988. Maldelkern Dave. "Human Communications Issues in Advanced UIS" . Communication of the ACM, Apr. 1993, Vol. 36, No. 4, pp. 101-110. Marcus Aaron & Van Dam Andries. " UserInterface Development for the Nineties". Computer, Sep. 1991, pp. 49-57. Marcus Aaron. "Human Communications Issues in Advanced UIs". Communications of the ACM, Graphical USR Interfaces: The Next Generation. April 1993. Vol. 36, No. 4, pp . 101-110. Nielsen Jakob. "Noncommand User Interface". Communication of the ACM, Apr. 1993, Vol. 36, No. 4, pp. 83-100. Rubine D. "Combining Gestures and direct manipulation" . Proceedings of the ACM, CHI' 92, Monterrey, CA, May 3-7, 1992, pp. 659-660. Samson Claude, Michel Le Borgne & Bernard Espiau. "Robot Control: The Task Function Approach". Clarendon Press, Oxford, 1991. Sandler Ben-Zion. "Robotics. Designing the Mechanisms for Automated Machinery". Salomon Press, Prentice Hall Int. Inc., Englewood Cliffs, 1991. Venolia D. and Williams L. . " Virtual Integral Holography". Technical report 90-10, Apple Computer Inc. , Feb 1990. Wolf C. G.. "A Comparative Study of Gestural, Keyboard and Mouse Interfaces" . Behaviour lnf. Tech., 11, 1, January 1992, pp. 13-23 .
5.- CONCLUSIONS 5.1. -INTERFACING The essence of the user interface is a common ritual of communication and interaction between human and machine. The user interface facilitates human access to repositories of data, information, knowledge, and wisdom. Increased quality in the user interface will permit one to take advantage of the rapidly increasing power of computers (Cypher, 1991). The BEE system, with its two operation modes (space data acquisition and 3D mouse) is an innovative interface with a promising future . The BEE-CAD integrated system allows designers to achieved complex tasks such as defining a mechanical part, working with the piece, etc., with increased ease while minimizing errors. The visual effect produced by the system, representing a virtual BEE device embedded in the virtual scene, makes the designer orientation easier within the virtual workspace. Actually, the operator can watch both the design and the pointing device. Additional 3D mouse input features also provide software control abilities with virtual the aid of buttons.
5.2.-AS A MODEUNG TOOL Modeling is the most expensive part of most computer graphics applications, mainly because it requires the majority of human effort. In this respect, virtual reality devices are prospective modeling tools. The BEE is believed to be one of them. The BEE system is expected to be a valuable assistant, e. g. for mechanical parts re-engineering. In this situation the availability of a sample model allows a fast capture and quick modifications of geometric specifications. The operator uses the pointer device system as an automated assistant for exploring design alternatives. REFERENCES Blanchard c., Burguess S., Harvil L., Lanier J., Lasko A. , Oberman M and Teitel M. "Rea/ity Built for Two : A virtual reality toof' . IEEE Computer Graphics and Applications, 12, 2, March 1990, pp. 582-583 . Critchlow Arthur J.. "Introduction to Robotics". Macmillan Pub. Co., New York, Collier Macrnillian Pub. , USA, 1985. Cypher A. . "Programming Repetitive Tasks BY example". Proceedings of the ACM, CHI'91 , New Orleans, LA, April 1991 , pp. 33-39. Hays Nancy. "Graphic News, Imagination Celebration Gets a Look at High Tech".
230