จลนศาสตร์หุ่นยนต์และการวางแผนการเคลื่อนที่

Robot frames, forward/inverse kinematics and motion planning

Last updated:

Why it matters

Every robot, whether a factory arm, a ground robot or a drone, has to answer two questions: where am I and which way am I facing, and how do I get to the goal. Kinematics answers the first by describing position and orientation from joint angles or displacements, without considering forces. Motion planning answers the second by finding a collision-free path and deciding how fast to move along it over time.

In drone work this applies to manipulator arms mounted under a drone for grasping or contact inspection, to the gimbal that points the camera, and to converting what the camera sees into map coordinates.

Frames and transformations

A coordinate frame is an origin plus three axes used to express positions. One robot has several: a map frame, a base (body) frame and a camera frame. The same point has different numbers in each.

Moving between frames has two parts: a rotation, written as a rotation matrix R, and a translation, written as a vector t. Together they form a homogeneous transformation T, a 4 × 4 matrix in 3D (3 × 3 in 2D). The benefit is that chains of frames compose by matrix multiplication, for example pmap = Tmap,base Tbase,cam pcam. The order of multiplication matters. Swap it and the answer is wrong.

Axis conventions must also agree. ROS uses ENU (east, north, up) for the world and FLU (forward, left, up) for the body. Flight stacks such as PX4 use NED (north, east, down) and FRD (forward, right, down). Forgetting this conversion is one of the most common causes of lab accidents.

Forward and inverse kinematics

A revolute joint changes an angle and a prismatic joint changes a length. The number of independent variables that define a pose is the number of degrees of freedom (DOF). Placing an object in 3D with full position and orientation requires 6 DOF.

  • Forward kinematics (FK): given joint angles, find the end-effector position. There is always exactly one answer. For a planar two-link arm, x = L1 cos θ1 + L2 cos(θ1 + θ2) and y = L1 sin θ1 + L2 sin(θ1 + θ2).
  • Inverse kinematics (IK): given a desired position, find the joint angles. There may be several answers, one, or none if the target lies outside the arm's workspace.

Complex arms usually solve IK numerically with the Jacobian J, which relates joint velocities to end-effector velocity, ẋ = J(q) q̇. Poses where J loses rank are singularities, for example a fully stretched arm. The end effector cannot move in some directions there, and forcing it makes joints spin abnormally fast.

Example: a two-link arm under an inspection drone

Assume a planar arm with L1 = 0.30 m and L2 = 0.25 m, at θ1 = 30° and θ2 = 45°.

FK: x = 0.30 cos 30° + 0.25 cos 75° = 0.2598 + 0.0647 ≈ 0.325 m, and y = 0.30 sin 30° + 0.25 sin 75° = 0.1500 + 0.2415 ≈ 0.391 m.

IK: for the point (0.325, 0.391), cos θ2 = (x2 + y2 − L12 − L22) / (2 L1 L2) gives θ2 = ±45°, so there are two solutions: (θ1, θ2) = (30°, 45°), one elbow configuration, and (70.7°, −45°), the mirrored elbow. Both reach the same point, but the second may hit the landing gear or a propeller, so another criterion must choose.

Workspace: the arm reaches distances from its base between |L1 − L2| = 0.05 m and L1 + L2 = 0.55 m. The point (0.5, 0.3) is 0.583 m away, so there is no solution. The drone itself must move closer first.

Velocity profile: a joint must turn 90° with limits of 60°/s and 120°/s2. A trapezoidal profile accelerates for 0.5 s (15°), cruises 60° in 1.0 s, then decelerates for 0.5 s (15°), 2.0 s in total. Smooth acceleration reduces the reaction torque felt by the drone. All values are assumed.

Motion planning

The first step is a collision-free path. Planning happens in configuration space (C-space), where one point represents the robot's whole pose and real obstacles become forbidden regions. There are two main families:

  • Graph and grid search, such as Dijkstra and A*, which uses a heuristic estimate of remaining distance to search faster. They find the shortest path on the grid and suit low-dimensional spaces, such as a ground robot on a 2D map.
  • Sampling-based planners, such as RRT (rapidly-exploring random tree), which grows branches towards random samples. They suit multi-joint arms whose C-space is too high-dimensional for a grid, but the paths are often jagged and need smoothing.

The second step turns the path into a trajectory: position, velocity and acceleration at every instant, within motor limits, such as the trapezoidal profile above.

Common pitfalls

  • Mixing degrees and radians. Trigonometric functions in programming languages take radians.
  • Multiplying transforms in the wrong order, or using T where T-1 is needed.
  • Forgetting the ENU to NED conversion when sending goals from robot software to the flight controller.
  • Taking the first IK solution without checking collisions, joint limits and nearness to singularities.
  • Forgetting that a moving arm shifts the drone's centre of gravity. The flight controller must cope with the changing forces and moments.

Continue in the lessons

Key references

  1. Lynch, K. M., & Park, F. C. (2017). Modern robotics: Mechanics, planning, and control. Cambridge University Press. link
  2. Corke, P. (2023). Robotics, vision and control: Fundamental algorithms in Python. Springer. link
  3. Hart, P. E., Nilsson, N. J., & Raphael, B. (1968). A formal basis for the heuristic determination of minimum cost paths. IEEE Transactions on Systems Science and Cybernetics, 4(2), 100–107. link
  4. LaValle, S. M. (1998). Rapidly-exploring random trees: A new tool for path planning (TR 98-11). Iowa State University. link
  5. International Organization for Standardization. (2021). Robotics – Vocabulary (ISO 8373:2021). link

Used in courses

How to cite this page

Drone Institute, Rangsit University. (2026). จลนศาสตร์หุ่นยนต์และการวางแผนการเคลื่อนที่. In UAS Technology Knowledge Hub (B.Tech.). https://rsu-uat.pk-research.work/en/kb/new/robot-kinematics/