Control Systems · Pre-Part 1

UR5e Model Setup & Cross-Validation

Before designing a controller, I established that the analytical Python model and NVIDIA Isaac Sim represented the same nominal UR5e rigid-body system. The work reconciles kinematic and physical-link frames, validates the simulation boundary conditions, and cross-checks link poses, Jacobians, the joint-space mass matrix, and gravity generalized forces.

UR5e ROS 2 Humble URDF Isaac Sim 6.1 Python Rigid-Body Dynamics Jacobian Model Validation

View source on GitHub →

6 DOF Final fixed-base articulation
≈ 0.008% Largest reported relative gravity-torque difference at J2
≈ 0.185 mm Wrist-3 frame-origin position difference at the validation pose
Engineering principle: a disagreement between an analytical model and a simulator does not identify which model is wrong. I therefore validated the simulator assumptions and boundary conditions before modifying an analytical model that had already passed independent kinematic checks.
UR5e analytical and simulation model validation workflow
Figure 1 — Model Validation Workflow Manufacturer and ROS model data are propagated independently into the analytical and simulation models, followed by simulation-environment validation and progressively stronger comparisons from pose and Jacobian to M(q) and g(q).

1. Why Validate the Model Before Control Design?

The purpose of this phase was not simply to import a UR5e into a simulator. Controller performance is meaningful only when the plant model is sufficiently well defined. Two implementations can describe the same robot while using different intermediate frames, inertia representations, base conditions, or actuator assumptions. If those differences are ignored, a controller can appear to perform well while compensating for a modeling inconsistency rather than the intended robot dynamics.

I assumed that the nominal manufacturer and official ROS 2 descriptions were the most appropriate reproducible starting point, but I did not assume that a Python DH model and an imported URDF would automatically share the same intermediate coordinate conventions. I expected frame definitions, importer behavior, gravity, base constraints, and joint-drive settings to be the highest-risk sources of disagreement.

For that reason, the validation order was deliberate: source parameters → physical-link transforms → joint origins and axes → Jacobian → mass matrix → gravity generalized forces. Each step validates dependencies required by the next one and reduces the diagnostic search space before higher-level dynamics are judged.

2. Nominal UR5e Reference Model

The project uses the nominal UR5e model rather than calibration parameters from a specific physical robot. Standard DH parameters are used for analytical kinematics, while the physical parameters from the official ROS 2 robot description are used for rigid-body dynamics.

Jointa [m]d [m]α [rad]
100.1625+π/2
2-0.425000
3-0.392200
400.1333+π/2
500.0997-π/2
600.09960
Moving LinkMass [kg]URDF-Aligned CoM [m]
Shoulder3.761[0, -0.00193, -0.02561]
Upper arm8.058[-0.2125, 0, 0.11336]
Forearm2.846[-0.2422, 0, 0.02650]
Wrist 11.370[0, -0.01634, -0.00180]
Wrist 21.300[0, 0.01634, -0.00180]
Wrist 30.365[0, 0, -0.001159]

The six moving-link masses sum to 17.7 kg, which is intentionally not forced to equal the 20.6 kg product-level arm weight reported in the technical specification. Those values have different accounting boundaries. I considered arbitrary redistribution of the difference across the moving links less defensible than preserving the traceable physical parameters supplied with the robot description.

3. DH Frames and Physical-Link Frames

A central modeling decision was to keep two compatible representations rather than forcing one frame convention to serve every purpose. Standard DH frames are used for analytical forward/inverse kinematics and geometric reasoning. URDF-aligned physical-link frames are used for CoM and inertia propagation in rigid-body dynamics.

I initially expected the manufacturer dynamics table and ROS physical-parameter file to contain numerically identical CoM coordinates. The apparent disagreement was diagnosed as a frame-convention issue. Inspection of the generated description also exposed a fixed base-frame relation equivalent to a 180° rotation about Z between base_link and base_link_inertia. Once the physical-link chain was expressed in the URDF convention, the link transforms agreed with Isaac Sim.

Comparison of UR5e DH frames and URDF physical-link frames
Figure 2 — DH Frames vs. URDF Physical-Link Frames The analytical kinematic chain and the physical inertia frames describe the same robot but serve different purposes. The dynamics implementation follows the URDF physical-link convention rather than treating DH frames as inertia frames.

4. Isaac Sim Setup: The Simulation Is Also a Model

4.1 Fixed-Base Diagnosis

The first major warning appeared in the simulator mass matrix. A fixed six-joint industrial manipulator should produce a 6×6 joint-space mass matrix, but the imported model initially returned 12×12. I diagnosed this as evidence that the simulator was treating the robot as a floating-base system.

A manually created world-to-base fixed joint physically stopped the base, but it produced robot-schema errors in the Gain Tuner. I did not consider visual immobility sufficient: the articulation also needed to be represented consistently inside Isaac Sim. The temporary joint was removed, and the original asset structure was converted to a proper fixed-base articulation. The result was a clean six-DOF articulation and a 6×6 mass matrix.

Final fixed-base UR5e articulation hierarchy in Isaac Sim
Figure 3 — Final Fixed-Base Articulation Final Isaac Sim Stage hierarchy after removing the temporary manual base joint and applying the fixed-base articulation setup.

4.2 Gravity and Joint Drives

Physics SettingInitial ObservationValidated Setting
Stage up axisZZ
Meters per unit1.01.0
Gravity direction(0, 0, 0)(0, 0, -1)
Gravity magnitude-inf9.81 m/s²

The coordinate system and metric scale were already appropriate, but gravity was not represented by a normal finite vector. I therefore set the simulator and analytical model to the same world gravity vector, [0, 0, -9.81] m/s².

The imported joint drives initially had zero stiffness and zero damping. Under gravity, the robot therefore moved away from the requested configuration. This was a critical comparison error: Python could be evaluated at q_target while Isaac was physically at a different q_actual. For cross-validation only, the Gain Tuner was used with a 300 Hz natural-frequency starting point and damping ratio ζ = 1.0. These gains are validation infrastructure, not identified physical UR5e servo parameters.

JointKpKdMax Force
shoulder_pan445.410580.47260150
shoulder_lift7106.182137.53989150
elbow39952.7226642.39116150
wrist_11209.488281.2833128
wrist_2341.181300.3620028
wrist_311.755600.0124728
Isaac Sim Gain Tuner configuration for the six UR5e joints
Figure 4 — Validation Drive Configuration Gain Tuner settings used to hold commanded configurations during model cross-validation. The 300 Hz setting is not interpreted as the physical UR5e controller bandwidth.
Shoulder lift joint step-response validation
Figure 5 — Shoulder-Lift Step Validation A ±10° step test produced 0.036° peak position error and 0.015° RMS error, confirming stable position holding for the subsequent model comparisons.

5. Common Validation Configuration

All final cross-comparisons were performed at the same nonzero configuration: q = [10, -40, 60, -30, 45, 20]°. A nonzero pose was intentionally used because agreement only at q=0 could conceal sign, axis, or transform errors that disappear in a special configuration.

After the drive setup, Isaac Sim held the target at [9.999999, -39.999996, 60, -30, 45, 19.999998]°, making the analytical and simulation evaluations configuration-consistent.

Python and Isaac Sim UR5e models at the common nonzero validation configuration
Figure 6 — Common Validation Pose Side-by-side analytical and Isaac Sim configurations at q = [10, -40, 60, -30, 45, 20]°.

6. Pose and Jacobian Cross-Validation

Physical-link positions and orientations were compared first. At the wrist-3 frame origin, Python produced [0.733548, 0.336215, 0.215589] m and Isaac Sim produced [0.733552, 0.336198, 0.215773] m, a Euclidean position difference of approximately 0.185 mm. Intermediate link positions showed similarly close agreement.

The geometric Jacobian was then compared. This is a stronger check than pose alone because it validates the propagated joint axes and differential kinematics. Representative angular columns agreed closely; for example, the J2 axis was [-0.173648, 0.984808, 0] in Python and [-0.173630, 0.984811, 0] in Isaac Sim.

Jv,i = zi × (pe − pi),    Jω,i = zi
Python and Isaac Sim UR5e Jacobian comparison
Figure 7 — Jacobian Cross-Validation Python and Isaac Sim wrist-3 geometric Jacobians with an element-wise error view.

7. Mass-Matrix Cross-Validation

The analytical mass matrix was assembled from the translational and rotational kinetic energy of all six moving links:

M(q) = Σ [mi Jv,iTJv,i + Jω,iT(RiIiRiT)Jω,i]

The first comparison produced an apparent relative discrepancy of approximately 64.7%. I initially suspected an inertia-frame or transformation error in the analytical dynamics because those are common failure modes. However, the analytical kinematics and Jacobian had already passed independent checks. I therefore considered modifying the mathematical model before validating the simulator to be the riskier decision.

After correcting the fixed-base representation, gravity, joint drives, and static pose, the mass matrices agreed closely. Selected entries are shown below.

ElementPythonIsaac Sim|Difference|
M113.1034133.1031880.000225
M223.3420343.3420240.000010
M231.2086721.2086430.000029
M330.8339060.8338560.000050
M440.0211960.0211430.000053
M660.0002580.000258≈ 0
Python and Isaac Sim UR5e mass matrix comparison
Figure 8 — Mass-Matrix Cross-Validation Python M(q), Isaac Sim M(q), and the element-wise absolute-error matrix after the simulation configuration was corrected.

8. Gravity Generalized-Force Cross-Validation

The analytical gravity term was computed independently from the potential energy of the six moving-link centers of mass:

U(q) = −Σ mi gTpc,i(q),    g(q) = ∂U/∂q

The convention is consistent with M(q)q̈ + C(q,q̇)q̇ + g(q) = τ. The simulator and Python values agreed in both magnitude and sign.

JointPython [Nm]Isaac Sim [Nm]|Difference| [Nm]
J10.0000000.0000080.000008
J2-49.685494-49.6816790.003815
J3-18.034631-18.0366290.001998
J4-0.707495-0.7079610.000466
J5+0.068868+0.0689710.000103
J60.0000000.0000000.000000

The largest absolute difference was 0.003815 Nm at J2, approximately 0.0077% of the Python magnitude. J1 is approximately zero because its rotation axis is aligned with gravity; the shoulder and elbow carry the dominant gravitational loading.

Python and Isaac Sim gravity generalized-force comparison
Figure 9 — Gravity Generalized-Force Comparison Joint-by-joint comparison of the independently calculated Python gravity vector and Isaac Sim generalized gravity forces at the common validation configuration.

9. Diagnostic Lesson: Why the First Comparison Failed

The most useful result of this phase was the failed first comparison. The initial 64.7% mass-matrix discrepancy did not identify the analytical model as wrong; it identified that at least one assumption in the comparison was false.

I diagnosed the problem in layers. The 12×12 matrix exposed a floating-base interpretation. The temporary manual fixed joint exposed a schema inconsistency. The PhysicsScene exposed an invalid gravity definition. The zero-stiffness and zero-damping drives exposed a final problem: the simulator was not guaranteed to remain at the configuration used by the analytical calculation.

Several shortcuts could have produced faster numerical agreement. I could have changed the analytical inertia treatment, retained the manual base constraint because the robot looked stationary, or simply increased arbitrary gains. I considered those approaches less defensible than validating the physical assumptions first. Once the simulator represented the intended fixed manipulator and held the intended state, pose, Jacobian, M(q), and g(q) converged to close agreement without forcing the analytical model toward the original simulator output.

Diagnostic decision flow from initial mass matrix discrepancy to validated model
Figure 10 — Diagnostic Decision Path The initial dynamics discrepancy was treated as a model-definition problem to diagnose, not as evidence that the analytical implementation should immediately be rewritten.

10. Model Boundaries

Assumption / BoundaryInterpretation
Nominal UR5e geometryRobot-specific factory calibration parameters are not included.
No payload or gripperThe validated M(q) and g(q) apply to the bare modeled manipulator.
Rigid links / ideal jointsFlexibility, backlash, gearbox compliance, detailed friction, and actuator dynamics are outside this phase.
Validation-only joint drivesThe tuned Isaac gains are not physical UR5e servo identification and must not mask later controller comparisons.
Primary nonzero validation poseThe result provides strong consistency evidence but is not a proof over the complete workspace.
No contact dynamicsGrasping, collision, table contact, and object interaction are outside Pre-Part 1.

11. Validation Result

Pose ✓Physical-link transforms reconciled
Jacobian ✓Joint axes and differential kinematics
M(q) ✓Inertial dynamics cross-validated
Pre-Part 1 conclusion: the analytical Python implementation and Isaac Sim now provide a consistent nominal UR5e rigid-body baseline. This model can be used as the foundation for Part 1A kinematics/dynamics characterization and Part 1B controller design without treating an unvalidated simulator as ground truth.

12. Next: Part 1A and Part 1B

Part 1A — Kinematics & Dynamics Characterization

Forward/inverse kinematics, Jacobian and singularity analysis, completion of nonlinear joint-space dynamics, configuration-dependent behavior, linearization, eigenstructure, and transient response.

Part 1B — Controller Design & Tuning

PID, computed-torque control, LQR, and MPC with quantitative comparison of convergence, overshoot, settling time, RMSE, control effort, computation cost, constraint handling, and tuning sensitivity.

13. Technical Report

Pre-Part 1 Technical Report

The full report documents the parameter sources, modeling assumptions, frame reconciliation, simulation diagnostics, numerical cross-validation, engineering reasoning, and model boundaries in greater detail.

View Technical Report

← Previous Control Project Back to Projects →

Project by Sooyong Kim · Robotics Control Portfolio