🚀 This repository is explicitly designed to serve as an open framework to accelerate and facilitate development for students and researchers looking to model, simulate, and control various multi-joint robotic systems.
💡 Want to see your favorite robot in action? Whether you want to implement a new manipulator (e.g., a 6-DoF arm like the Staubli TX90 or a 7-DoF redundant robot), optimize a trajectory generation pipeline, or experiment with alternative nonlinear control laws, your ideas are welcome! ✨ Feel free to branch out, innovate, and open a Pull Request (PR) whenever you wish! Let's build a highly modular robotics playground together! 🛠️🤖
Kinematics models the spatial transitions of the manipulator independent of the actuation forces.
-
Forward Kinematics (FK): Maps the joint configuration vector
$q = [\theta_1, \theta_2]^T$ to Cartesian end-effector coordinates$x = [x_{pos}, y_{pos}]^T$ :
-
Differential Kinematics: Establishes the relationship between joint-space velocities
$\dot{q}$ and task-space velocities$\dot{x}$ using the analytical space Jacobian$J(q)$ :
- Singularity Avoidance: To guarantee bounded control signals near kinematic singular boundaries, the workspace solver relies on a dynamic Damped Least Squares (DLS) pseudo-inverse:
where the damping factor
The rigid-body equations of motion are derived using the energy-based Lagrange-Euler formulation:
-
$M(\theta) \in \mathbb{R}^{2\times2}$ : Symmetric, positive-definite mass/inertia matrix. -
$c(\theta, \dot{\theta}) \in \mathbb{R}^2$ : Coriolis and centrifugal force vector. -
$g(\theta) \in \mathbb{R}^2$ : Gravity force vector pulling links downwards. -
$\tau \in \mathbb{R}^2$ : Vector of applied joint torques.
The task-space reference inputs are derived from a horizontally oriented figure-eight Lissajous curve:
To match physical constraint limits, discrete path waypoints are interpolated via piecewise cubic splines:
This formulation ensures
- Custom Simulation Engine: A continuous-time forward dynamics simulation environment built entirely in MATLAB ('ode45').
- Actuator Constraints: Actuator upper and lower torque limit applied to virtual servos.
- Operational Space Control Architecture: Implementation of Proportional-Integral-Derivative (PID) state-feedback (NDI) structures with feedforward trajectory acceleration.
- Scalable Matrix Formulations: As long as the system definition method given in the dynamic section is followed, the robot model can be updated, and simulations for different robots can be performed without changing the controller and spline production.
The Operational Space Controller eliminates cross-coupling issues, guiding the end-effector with sub-millimeter precision along the continuous cubic spline target. Both
The motor effort satisfies physical system properties. The required control torque peaks safely at 3.5 Nm on Joint 1, operating comfortably within the actuator hardware limit bounds of
The exact overlay between commanded and applied torques verifies that no control saturation clipping occurs.
- [1] O. Khatib, "A Unified Approach for Motion and Force Control of Robot Manipulators: The Operational Space Formulation," IEEE Journal of Robotics and Automation, vol. RA-3, no. 1, Feb. 1987.
- [2] J. Z. Kolter and A. Y. Ng, "Task-Space Trajectories via Cubic Spline Optimization," Computer Science Department, Stanford University, 2009.
- [3] K. M. Lynch and F. C. Park, Modern Robotics: Mechanics, Planning, and Control. Cambridge University Press, 2017.
