3D Environment Generation for the VirtualRobot Simulator based on 2D Digital Images Waldir Roque * , Jonas Bragagnolo * , Martin Mellado ** and Eduardo Vendrell ** * Instituto de Matem´ atica, Universidade Federal do Rio Grande do Sul, 91509-900 Porto Alegre, RS - Brazil roque@mat.ufrgs.br ** Departamento de Ingenier´ ıa de Sistemas y Autom´ atica, Universidad Polit´ ecnica de Valencia Camino de Vera s/n E-46022, Valencia - Spain martin@isa.upv.es and even@isa.upv.es. Abstract The VirtualRobot (VRS) is a 3D graphical robot simulator. In this simulator the construction of 3D environments are based on either a graphical editor or on a script file using a set of primitives and their compositions, which are loaded and vi- sualized by the VRS. This procedure is time con- suming and requires a good acquaintance with the set of predefined primitives and their parameters. In this paper we present the automatic generation of 3D environments composed of polyhedral ob- jects that are constructed based on the two-and- a-half-D extension of 2D digital images of gener- alized polygonal objects and discs. In addition, this process also recognizes the 2D configuration of a circular robot and consistently introduces the robot model into the 3D environment. 1. Introduction Graphic simulators for robotic systems became a quite important tool for robotic design, learning, planning and other tasks. With the current technological develop- ments, robotic simulations have been done in a diver- sity of applications such as for industrial robots, mo- bile robots, sub-aquatic and aero-spatial robots, among others. In most cases, the simulators are very complex tools with expensive hardware requirements, designed to study and analyze specific branch of robotics. There- fore, a robotic simulator with an open architecture with less specific requirements and more flexibility to attend the needs of a wider range of robotic applications in ed- ucation, research and industrial developments are still desired. The VirtualRobot Simulator (VRS) (Mellado et al., 2003) is a graphical software appli- cation tool that has been designed for low cost hardware as a flexible and open platform to work with robot system simulations. The software is a tool for robot design, simulate industrial robot workcells and robot behavior studies. Inasmuch, the VRS is useful for analysis and validation of techniques like collision detection, path planning, sensor modelling, evaluation of control architectures etc. The VirtualRobot 1 is currently composed of the i) VirtualRobot Modeler (VRM), ii) VirtualRobot Translator (VRT), and iii) VirtualRobot Simulator, which is the main platform for the simulations. The VirtualRobot Modeler is used to model 3D envi- ronments that is to be employed by the VRS. The en- vironment generation which includes objects, tools and surroundings is based on either the graphical edition of the components or on the edition of a script file with the set of primitives that defines the geometrical structure of the objects. This procedure is time consuming and requires a good expertise of the user with the Virtual- Robot modeler. To overcome this problem and improve the generation of simple 3D environments to be used by the simulator, we have developed an automatic con- struction of 3D objects based on the 2D digital image of objects. Provided with a global vision module, the 2D digital images of generalized polygonal objects and discs are captured and their shapes are identified. By means of their two-and-a-half-D (2 1/2-D) extension the corresponding polyhedral objects are constructed. The global vision module (Roque and Doering, 2002) is able to identify the geometrical shapes of generalized polygons and circular objects and constructs from them the set of primitives defined by the VRM. The corre- sponding environment file is automatically read by the VRS and the 3D visualization is immediately displayed 1 It is available for downloading at the website http://robotica.isa.upv.es/virtualrobot.