Experiment 2: Forward Kinematics (FK) for the Cobot-C1

Predict the position and orientation of the robot's end-effector based on given joint angles and link lengths.

Objectives

  • Master practical forward kinematics by controlling the Cobot-C1 through direct joint commands
  • Apply FK equations to model and compare results provided by the Cobot-C1
  • Validate FK model accuracy by comparing calculated to measured end-effector poses
  • Understand the mapping from joint space (angles) to task space (physical position)

Key Concepts

  • Forward Kinematics: Computing end-effector position and orientation from joint angles
  • Joint Space vs. Task Space: Understanding the relationship between joint angles and 3D positions
  • Kinematic Chain Representation: Modeling the robot as a serial chain of rigid links
  • Denavit-Hartenberg Convention: Standard method for assigning coordinate frames
  • Homogeneous Transformation Matrices: Mathematical tools for representing geometry and motion

Theory

What is Forward Kinematics?

Forward kinematics is the static geometrical problem of computing the position and orientation of the end-effector of the manipulator. Given a set of joint angles, the forward kinematic problem is to compute the position and orientation of the tool frame relative to the base frame.

Why is Forward Kinematics Important?

Forward kinematics is fundamental in robotics because it enables:

  • Motion Prediction & Control: Predicts end-effector pose for given joint angles, providing the foundation for motion planning and collision avoidance
  • Task Execution: Ensures robots can perform tasks by confirming tool location in real time
  • Simulation & Visualization: Supports digital twin environments and path validation
  • Calibration & Safety: Allows for model-based calibration and error correction

How Does Forward Kinematics Work?

Forward kinematics maps joint variables (angles and/or displacements) to a unique end-effector pose using the robot's kinematic equations:

  • Kinematic Chain Representation: The manipulator is described as a serial chain of rigid links connected by joints
  • Mathematical Transformation: Multiplies homogeneous transformation matrices from base to end-effector
  • Denavit-Hartenberg Convention: Assigns coordinate frames using four parameters per link
  • Software Application: Implemented in real-time for dynamic monitoring and control

Forward Kinematics Equations

Note: The following equations use a simplified 4-DOF model for clarity. The concepts extend directly to the full 6-DOF Cobot-C1.

Variables

  • Joint Angles: θ₁, θ₂, θ₃, θ₄
  • Link Lengths: L₁, L₂, L₃, L₄

Calculation Steps

  1. Assign Joint Angles and Link Lengths: θ₁ (base rotation), θ₂, θ₃, θ₄ (elevation and pitch angles)
  2. Compute Intermediate Values: θ_total = θ₂ + θ₃ + θ₄
  3. Calculate End-Effector Position:
    x = cos(θ₁) × [L₂ cos(θ₂) + L₃ cos(θ₂ + θ₃) + L₄ cos(θ_total)] y = sin(θ₁) × [L₂ cos(θ₂) + L₃ cos(θ₂ + θ₃) + L₄ cos(θ_total)] z = L₁ + L₂ sin(θ₂) + L₃ sin(θ₂ + θ₃) + L₄ sin(θ_total)
  4. Calculate End-Effector Orientation: φ = θ_total
  5. Final Output: End-effector pose = (x, y, z, φ)

Prerequisites

  • Access to the Cobot-C1 robot and control software
  • Verification that the robot system is powered, connected, and ROS nodes are initialized
  • Prior configuration of workspace limits and joint boundaries for safe operation
  • Familiarity with the robot's operating environment and home position
  • Confirmation that emergency stop mechanisms are understood

Procedure

Step 1: Launch the Independent Joint Control GUI

cd dev/MRL/cobot-C1/src/cobo_control/src/ python3 indcontrol.py

Step 2: Safety Preparation

  • The cobot will automatically check and move to home position if needed
  • Make sure the workspace is clear and no one is inside the cobot's reach

Step 3: Use Sliders to Move the Cobot

  • Slowly adjust each joint slider in the GUI for joints 1–4 (Base, Shoulder, Elbow, Wrist Pitch)
  • Joints 5 and 6 are locked for safety and should not be adjusted
  • Move only one joint at a time for precise configuration
  • If an unexpected movement occurs, press Spacebar for Emergency Stop
  • Press H to return to home position safely

Step 4: Print the End Effector Position

  • Press U in the GUI to print the end effector position in the terminal
  • Note down the angles that you have input

Step 5: Use FK Equations to Verify Results

Input joint angles of each observation and calculate the end effector position.

Step 6: Validation

  • Repeat for multiple different joint configurations
  • Each time: Move with sliders → record joint angles & EE position → check FK output
  • Confirm that the position displayed by the FK script and GUI match

Expected Outcomes

Create a table with the following structure for recording at least 6 trials:

TrialRecorded Joint Angles (θ₁, θ₂, θ₃, θ₄)Recorded EE Position (x, y, z, φ)Calculated EE Position (x, y, z, φ)
1
2
3
4
5
6

Sources of Error and Precautions

Common Sources of Error

  • Recording Joint Angles: Mistakes when noting angles from GUI sliders
  • End-Effector Position Inaccuracy: Minor drift, sensor calibration, or lag in robot response
  • Numerical Approximation: Rounding errors when entering joint angles into FK script
  • Unreachable Configurations: Attempting to set joint angles near or beyond mechanical limits
  • Multiple FK/IK Solutions: Robot may have more than one possible configuration for certain poses

Precautions

  • Verify all slider angles and printed readings for correctness and units
  • Watch for limits - ensure sliders stay within allowed joint ranges
  • Confirm pose visibility - allow arm to settle before recording
  • Repeat and compare - take multiple measurements to confirm consistency
  • Keep tested poses within Cobot workspace

Learning Outcomes

  • Grasp the basic theory of forward kinematics for robotic arms
  • Understand the use of joint space and task space representations in robotics
  • Recognize the mathematical relationship between joint configurations and end-effector positions
  • Identify limitations such as unreachable poses or non-unique kinematic solutions
  • Acknowledge typical sources of experiment and modeling error in applied robotics