Automation and RoboticsUnit 48 min read
Kinematics, Path Planning & Robot Motion
Unit 4 of Automation and Robotics covers the mathematical modeling of robot motion (kinematics), trajectory generation, and path planning algorithms for autonomous navigation, including forward/inverse kinematics, configuration spaces, and optimization techniques for real-world robotic applications.
Kinematics: The Math Behind Robot Motion
What is Kinematics?
Kinematics is the study of motion without considering forces. For robots, it answers:
- Where can the robot reach? (Workspace)
- How do joint angles determine end-effector position? (Forward Kinematics)
- What joint angles achieve a desired position? (Inverse Kinematics)
Key Definitions
- Degree of Freedom (DoF): Number of independent movements (e.g., a 6-DoF arm can move in 3D space + rotate).
- Configuration Space (C-space): All possible joint configurations (e.g., a 2-link arm has a 2D C-space).
- Workspace: All reachable positions in Cartesian space.
Forward Kinematics: From Joints to End-Effector
Problem: Given joint angles, compute the end-effector position. Solution: Use Denavit-Hartenberg (DH) parameters to model each joint as a transformation matrix.
DH Parameters Table
| Joint i | θ<sub>i</sub> | d<sub>i</sub> | a<sub>i</sub> | α<sub>i</sub> |
|---|---|---|---|---|
| 1 (Base) | Joint angle | Link length | Link offset | Twist angle |
| 2 | ... | ... | ... | ... |
Transformation Matrix (T<sub>i</sub>):
Worked Example: 2-Link Planar Arm Assume:
- Link 1 length = 1 m, Link 2 length = 1 m.
- Joint angles: θ₁ = 30°, θ₂ = 45°. Compute end-effector position (x, y).
graph TD
A["Base"] --> B["Joint 1 (θ₁)"]
B --> C["Link 1 (1m)"]
C --> D["Joint 2 (θ₂)"]
D --> E["Link 2 (1m)"]
E --> F["End-Effector (x,y)"]Step-by-Step Calculation:
Link 1 Transformation (T₁): End of Link 1: .
Link 2 Transformation (T₂): End-effector position: .
Inverse Kinematics: Solving for Joint Angles
Problem: Given end-effector position (x, y), find joint angles θ₁, θ₂. Solution: Use geometric or algebraic methods (e.g., Law of Cosines for 2-link arms).
Worked Example: Inverse Kinematics for the 2-Link Arm
Given end-effector at (1.3836, 1.4659), find θ₁, θ₂.
Compute distance to end-effector: m (matches link lengths).
Law of Cosines:
Note: Multiple solutions exist (e.g., θ₂ = 240°). Use constraints (e.g., joint limits) to pick the valid one.
Path Planning: Navigating Obstacles
Path planning finds a collision-free trajectory from start to goal. Key methods:
1. Configuration Space (C-space) Approach
- Obstacle Inflation: Expand obstacles by robot radius to simplify collision checking.
- C-space Obstacles: Regions where the robot collides with obstacles or itself.
graph TD
A["C-space: Free"] --> B["C-space: Occupied"]
C["Robot"] --> D["Obstacle"]
D --> E["Inflated Obstacle"]2. Common Path Planning Algorithms
| Algorithm | Description | Time Complexity | Best For |
|---|---|---|---|
| A* | Heuristic search (f(n) = g(n) + h(n)) | (d = depth) | Grid-based environments |
| RRT (Rapidly-exploring Random Tree) | Randomly grows tree toward goal | (avg) | High-DoF robots, complex C-space |
| PRM (Probabilistic Roadmap) | Samples C-space, connects via edges | Static environments | |
| Dijkstra | Uniform-cost search | Simple graphs |
Worked Example: A* for Grid Navigation
Scenario: A robot in a 5×5 grid must go from (0,0) to (4,4). Obstacles at (1,2), (2,1).
graph TD
A["Start (0,0)"] --> B["(0,1)"]
A --> C["(1,0)"]
B --> D["(1,1)"]
D --> E["(1,2) Obstacle"]
C --> F["(2,0)"]
F --> G["(2,1) Obstacle"]
G --> H["(2,2)"]
H --> I["(3,2)"]
I --> J["(4,2)"]
J --> K["(4,3)"]
K --> L["Goal (4,4)"]Steps:
- Heuristic (h(n)): Manhattan distance to goal.
- Cost (g(n)): Steps taken so far.
- f(n) = g(n) + h(n): Prioritize nodes with lowest f(n).
- Path: (0,0) → (1,0) → (2,0) → (3,0) → (4,0) → (4,1) → (4,2) → (4,3) → (4,4).
Real-World Applications
1. eSewa (Nepal)
- Idea Used: Path Planning (RRT)
- How: eSewa’s automated customer service chatbots use decision trees (a form of path planning) to navigate through user queries. For example:
- If user says “bill payment,” the bot follows a predefined path: Verify account → Select service → Enter amount → Confirm → Redirect to payment gateway.
- Visual: Think of this as a decision tree where each node is a question (e.g., “Do you want to pay electricity or water bill?”), and edges are possible responses.
2. Pathao (Ride-Hailing App)
Idea Used: Kinematics + A Path Planning*
How: When you request a ride, Pathao’s algorithm:
- Kinematics: Calculates the driver’s current position and velocity (using GPS data as joint angles in a virtual “vehicle arm”).
- Path Planning: Uses A* to find the shortest collision-free route from the driver to your location, avoiding traffic (obstacles) and one-way streets (C-space constraints).
Worked Example: Suppose you’re at Kathmandu Traffic (Thamel) and the driver is at Naxal (near TU). The app:
- Models the city as a grid where intersections are nodes.
- Obstacles = closed roads (e.g., during Dashain).
- Computes the path: Naxal → Putalisadak → Durbar Marg → Thamel.
graph TD A["Naxal"] --> B["Putalisadak"] B --> C["Durbar Marg"] C --> D["Thamel (Goal)"] E["Obstacle: Closed Road"] --> F["Alternative: Ring Road"]
3. NTC (Nepal Telecommunications)
- Idea Used: Inverse Kinematics for Antenna Alignment
- How: NTC’s 5G towers use pan-tilt mechanisms (2-DoF) to align antennas toward users. For example:
- If a user at coordinates (x, y) requests service, the antenna’s inverse kinematics solves for the tilt (θ₁) and pan (θ₂) angles to point directly at the user.
- Real Scenario: During a live concert at Tundikhel, NTC’s system dynamically adjusts antenna angles to maintain signal strength for thousands of attendees.
Exam Tip
Kinematics Questions:
- Always draw the robot arm and label joints/links before calculations.
- For forward kinematics, show the transformation matrices step-by-step.
- For inverse kinematics, explain whether you’re using geometric or algebraic methods.
Path Planning Questions:
- Compare A* and RRT in a table (as above) and justify which to use for a given scenario (e.g., “A robot in a cluttered warehouse” → RRT; “A drone in a grid” → A*).
- Always sketch the C-space when obstacles are involved. Highlight:
- Free space (white).
- Occupied space (gray).
- Inflated obstacles (red).
Common Pitfalls:
- Forgetting to check joint limits in inverse kinematics (e.g., θ₂ = 240° may be invalid if max θ₂ = 180°).
- Misapplying the heuristic in A* (e.g., using Euclidean distance in a grid where Manhattan distance is correct).
- Ignoring collision constraints in path planning (e.g., assuming a straight line is valid when obstacles exist).
Summary Table: Kinematics vs. Path Planning
| Feature | Kinematics | Path Planning |
|---|---|---|
| Goal | Compute positions/orientations | Find collision-free trajectory |
| Key Math | Transformation matrices, DH params | Graph search (A*, RRT), C-space |
| Output | Joint angles or end-effector pose | Sequence of waypoints |
| Real-World Use | Robot arms, antenna alignment | Self-driving cars, drones, eSewa chatbots |
| Challenges | Multiple solutions, singularities | Computational cost, dynamic obstacles |
Based on the TU BSc CSIT syllabus for Automation and Robotics, unit 4.
Discussion
Loading…