← BACK

UR5 Manipulator Control

Archived
Timeline

Dec 2025

Role & Context

Robotics Control

Core Tech
MATLABPythonROSKinematicsControls

Project Summary

Implemented and compared Resolved-Rate (differential kinematics) and Inverse Kinematics control paradigms for a UR5e manipulator completing a 'Push-and-Place' task.

Key Features

  • Resolved-Rate Control using Damped Least-Squares Body Jacobian inversion
  • Analytic Inverse Kinematics with cost function for optimal branch selection
  • Singularity monitoring and avoidance logic
  • SE(3) interpolation for linear Cartesian path generation

Impact & Takeaways

  • IK achieved machine-precision accuracy (error ~10^-15) beating RR (~10^-5)
  • RR proved more robust to external disturbances due to instantaneous feedback
  • Demonstrated trade-off between absolute accuracy (IK) and smooth real-time control (RR)

Context & Motivation

Robotic manipulation requires precise coordination in SE(3) space. This project focused on a "Push-and-Place" task: programming a UR5e robot to push a target object 3cm along a local axis, lift, and return it. The core objective was to implement and compare two distinct control paradigms: Resolved-Rate (RR) Control (differential kinematics) and Inverse Kinematics (IK) (analytic plotting).

System Architecture

The control framework was implemented in MATLAB, interfacing with the robot via ROS (Robot Operating System) and RTDE (Real-Time Data Exchange).

Task Planner Waypoints in SE(3)
g_desired
Controller RR vs. IK
q_dot / q_sol
UR5e Robot Joint Actuation

Engineering Implementation

1. Resolved-Rate Control (Differential Kinematics)

RR control drives the robot by iteratively minimizing the error twist ξerr between the current pose gcur and desired pose gdes. It relies on the Body Jacobian Jb(q) to map Cartesian velocities to joint velocities.

  • Mathematical Formulation: The control law is derived from ξ = Jb(q). We invert this finding the damped least-squares solution:
    = K · J · ξerr
    where J is the pseudoinverse and K is the proportional gain (Krr = 0.15).
  • Singularity Handling: The system continuously monitors manipulability (w = √det(JJT)). If the robot approaches a singular configuration where the Jacobian becomes ill-conditioned, the controller safeguards by aborting motion to prevent infinite joint velocities.

2. Analytic Inverse Kinematics

Unlike RR, which serves towards a solution, IK solves for the exact final joint angles analytically. This decouples the path planning from the control loop.

  • Multiple Solution Optimization: The UR5 analytic solution yields up to 8 valid joint configurations for a given gdes. To ensure smooth motion, I implemented a cost function to select the optimal branch:
    q_best = argmin(|| wrapToPi(qsol_i - qcurrent) ||)
    This prevents dangerous "elbow-flipping" or discontinuous jumps between waypoints.
  • Trajectory Generation: Intermediate waypoints are generated using SE(3) interpolation (screw motion) between keyframes to ensure the end-effector traces a straight line in Cartesian space.

Performance & Results

We compared the accuracy of both controllers in reaching the target "Home" pose after the task:

  • Accuracy: IK achieved near-perfect positioning with rotational error on the order of 10-15 (machine precision), whereas RR settled with errors around 10-5 due to the convergence threshold/gain trade-off.
  • Smoothness: While IK provided higher accuracy, RR via RTDE offered smoother real-time motion control by continuously updating based on instantaneous feedback, making it robust to small external disturbances.

Resolved-Rate Control

Inverse Kinematics

BACKEnd of File