We describe the design and implementation of RSTATION, an object-oriented, modular robot simulator with hierarchical analysis capabilities. Modularity is achieved via the features of design encapsulation and enables grouping a set of
interconnected components into a single component and dividing the robot system into several sets of subordinate modules recursively. By careful construction of the data types and classes, RSTATION allows for hierarchical simulation of the kinematics, and the dynamics at three levels: considering only main links (high-level), using simplified models including dynamic properties of transmission elements (intermediate level), and taking into account the detailed kinematics and dynamics of transmission elements (low-level). Submodules can be set to different resolution during a single simulation. The data types and classes also exploit a recent set of coordinate invariant robot analysis algorithms based on modern
screw theory. Central to the low-level dynamic analysis capability is an algorithm for systematically extracting the constraint equations for general gearing systems. The various features of RSTATION are illustrated with a detailed case study of a commercial industrial robot.