Mobile robots require knowledge of the environment to plan movements and accomplish tasks. Most path planning algorithms assume complete knowledge of the robot environment. But many situations exist where environment maps are not available to the robot, thereby making it impossible to implement and execute planned tasks. Such situations require that the robot either construct a map of the environment or operate in a local sensing mode with its concomitant absence of planning. This paper addresses the problem of map building. Map building involves robot motion, environment sensing, and sensor data integration. Most mapping algorithms described in the literature are based upon an environment in which objects and boundaries are made up of flat walls (polygons), and a sensor model that does not take into account the finite range and distortion encountered in real sensors. In this paper we present a mapping algorithm that imposes less restrictions on the environment and sensor. The algorithm described here uses a sensor with a limited sensing range to map an environment populated by objects of any shape and size. The mapping area can be controlled by defining an imaginary boundary or envelope around the region that is to be mapped. The algorithm proceeds by defining bounded regions enclosed by peripheral curves which subsequently become trajectories for further exploration of the environment, and includes procedures for circumnavigating objects using primitive robot motion and sensing operators such as MOVE, ROTATE, and SCAN. The algorithm has been tested in a simulated environment and the results of some of the mapping operations are described.