Overview
Robotics development cycles are frequently bottlenecked by limited hardware availability. This project produced a lightweight multi-body dynamics (MBD) simulation framework to enable faster iteration on kinematic and dynamic models of serial manipulators, independent of physical hardware.
Architecture
The framework was built around a recursive Newton–Euler formulation for forward dynamics computation. Key components:
- RigidBody: encapsulates inertial properties, geometry references, and joint state vectors
- KinematicChain: directed graph structure representing the manipulator topology
- Integrator: 4th-order Runge–Kutta with adaptive step-size control and error tolerance bounds
- Visualiser: real-time 3D rendering via
PyOpenGLwith joint-frame overlay
Joint types supported: revolute, prismatic, and spherical. A URDF importer was implemented for compatibility with existing robot descriptions from the ROS ecosystem.
Validation
Framework outputs were validated against MATLAB Robotics Toolbox ground-truth results for a 6-DOF serial arm across a set of 12 benchmark trajectories. Joint torque predictions agreed within 0.8% RMS. Computational performance reached 10× real-time simulation speed for a 6-DOF arm on a standard laptop.
Application
The framework was used to prototype and validate three trajectory planning algorithms ahead of hardware deployment:
- Trapezoidal velocity profiles — baseline reference
- Minimum-jerk polynomials — reduced end-effector vibration by ~40%
- Simplified RRT variant — path planning in constrained workspaces
Two significant bugs in the RRT implementation were identified and corrected in simulation, avoiding what would have been costly and time-consuming hardware-level debugging.
Open Source
The framework is available on GitHub under the MIT licence, with documentation covering installation, URDF import, and the extension API for custom joint types. Contributions are welcome.