6. AI and Autonomy

Motion Planning

Global and local planning techniques, sampling-based planners, collision checking, constraint handling, and kinodynamic planning for robotic tasks.

Motion Planning

Hey students! 🤖 Welcome to one of the most fascinating aspects of robotics engineering - motion planning! This lesson will explore how robots figure out how to move from point A to point B while avoiding obstacles and following physical constraints. By the end of this lesson, you'll understand the fundamental techniques that allow robots to navigate complex environments, from autonomous cars driving through city streets to robotic arms assembling products in factories. Get ready to dive into the algorithms that give robots their "spatial intelligence"!

Understanding Motion Planning Fundamentals

Motion planning is essentially the computational process that allows robots to determine a sequence of valid configurations that will move them from their starting position to their desired goal. Think of it like GPS navigation for your car, but infinitely more complex because robots operate in three-dimensional space and must consider their physical constraints.

At its core, motion planning deals with what roboticists call the "configuration space" or C-space. This is a mathematical representation of all possible positions and orientations your robot can achieve. For a simple robot arm with two joints, the configuration space would be two-dimensional, representing the angles of each joint. For a humanoid robot, this space becomes incredibly complex with dozens of dimensions!

The fundamental challenge is that this configuration space is divided into two regions: free space (where the robot can safely exist) and obstacle space (where collisions would occur). The motion planner's job is to find a continuous path through the free space that connects the start and goal configurations.

Real-world applications are everywhere around us. When you see a robotic vacuum navigating around furniture, it's using motion planning algorithms. When an industrial robot arm welds car parts on an assembly line, motion planning ensures it moves efficiently without hitting other equipment. Even more impressively, when SpaceX's robotic arm captures Dragon capsules in space, it relies on sophisticated motion planning to account for orbital mechanics and precise docking requirements.

Global Planning Techniques

Global motion planning takes a "big picture" approach, attempting to find a complete path from start to goal while considering the entire environment. These algorithms are like strategic generals planning a military campaign - they need to see the whole battlefield before making decisions.

One of the most influential global planning approaches is the Probabilistic Roadmap Method (PRM), developed in the 1990s. PRM works by randomly sampling configurations throughout the free space and connecting nearby samples with simple paths (called local planners). Over time, this builds a roadmap or network of valid paths that can be reused for multiple queries. It's like building a highway system - once constructed, you can use it to plan routes between any two cities.

The beauty of PRM lies in its efficiency for multiple queries in the same environment. A warehouse robot using PRM might spend time initially mapping all possible paths between storage locations, but then it can instantly plan routes for thousands of pick-and-pack operations. Studies show that PRM can handle robots with up to 20-30 degrees of freedom, making it suitable for complex manipulator arms.

Another powerful global approach is the Rapidly-exploring Random Tree (RRT) algorithm. Unlike PRM, RRT grows a tree-like structure from the start configuration toward the goal. It's particularly effective in high-dimensional spaces and has been successfully applied to problems with over 100 degrees of freedom. NASA has used RRT variants for planning spacecraft trajectories, and automotive companies employ it for autonomous vehicle path planning.

The key advantage of global planners is their completeness - given enough time, they're guaranteed to find a solution if one exists. However, this comes at a computational cost, especially in complex environments with many obstacles.

Local Planning and Real-Time Navigation

While global planners excel at strategic path finding, local planners focus on immediate, tactical decisions. These algorithms are like skilled drivers navigating through traffic - they react quickly to immediate obstacles while generally following a planned route.

Local planning becomes crucial when robots operate in dynamic environments where obstacles move or when computational resources are limited. The Dynamic Window Approach (DWA) is a popular local planning technique that considers the robot's current velocity and acceleration limits to generate a set of possible trajectories over a short time horizon. It then selects the best trajectory based on criteria like obstacle avoidance, goal approach, and speed optimization.

For example, autonomous vehicles use local planners to handle situations like merging into highway traffic or navigating around a double-parked car. The global planner might say "take Highway 101 north," but the local planner handles the second-by-second decisions of when to change lanes or how to respond to a pedestrian stepping into the crosswalk.

Another important local planning approach is the Artificial Potential Field method, which treats the goal as an attractive force and obstacles as repulsive forces. The robot follows the resulting "force field" toward its destination. While elegant and computationally efficient, potential fields can sometimes get trapped in local minima - imagine a ball rolling downhill but getting stuck in a small depression before reaching the bottom.

Modern robots often use hybrid approaches, combining global and local planning. The global planner provides the overall strategy and waypoints, while the local planner handles real-time obstacle avoidance and smooth trajectory execution. This division of labor allows robots to be both strategically smart and tactically responsive.

Sampling-Based Planners and Advanced Algorithms

Sampling-based planners have revolutionized motion planning by making it practical to solve problems that were previously computationally intractable. These algorithms work by randomly sampling the configuration space and building connectivity graphs or trees that represent feasible paths.

The RRT algorithm family has spawned numerous variants optimized for different scenarios. RRT (RRT-star) improves upon basic RRT by continuously refining the tree to find increasingly optimal paths. It's like having a GPS that not only finds a route but keeps finding better routes as it learns more about traffic patterns. Research shows that RRT converges to optimal solutions asymptotically, making it both practical and theoretically sound.

For robots that need to find the shortest or most efficient paths, algorithms like PRM and FMT (Fast Marching Tree) offer optimality guarantees. These are particularly important for applications where energy efficiency matters, such as Mars rovers that must conserve battery power or underwater robots with limited energy supplies.

Bidirectional search techniques, where trees grow simultaneously from both start and goal configurations, can dramatically reduce planning time. It's like having two search parties starting from opposite ends of a maze - they'll meet in the middle much faster than a single party searching the entire maze.

Recent advances include machine learning-enhanced sampling strategies that learn to sample more intelligently based on the environment structure. Instead of purely random sampling, these algorithms develop intuition about where promising paths are likely to exist, similar to how experienced hikers instinctively choose better routes through unfamiliar terrain.

Collision Detection and Environmental Constraints

Collision detection is the sensory system of motion planning - without it, robots would be blind to their surroundings. Efficient collision detection algorithms are crucial because they're called millions of times during the planning process.

The most basic approach uses geometric primitives like spheres, boxes, and cylinders to approximate robot and obstacle shapes. While not perfectly accurate, these simple shapes allow for extremely fast collision checks using mathematical formulas. More sophisticated methods use convex decomposition, breaking complex shapes into simpler convex pieces that are easier to test for intersections.

For highly detailed environments, algorithms like Gilbert-Johnson-Keerthi (GJK) can determine the minimum distance between complex shapes, not just whether they collide. This distance information is valuable for planning paths with safety margins - ensuring the robot stays a safe distance from obstacles rather than just barely avoiding contact.

Modern robots often use hierarchical collision detection, starting with coarse approximations and refining only when necessary. It's like looking at a map of the United States to plan a cross-country trip, then zooming in to street level only when navigating through specific cities. This multi-resolution approach balances accuracy with computational efficiency.

Environmental constraints go beyond simple collision avoidance. Robots must also consider joint limits (how far each joint can rotate), workspace boundaries (the physical reach of the robot), and kinematic constraints (how the robot's structure limits its motion). For mobile robots, constraints might include maximum turning radius, traction limitations, or terrain traversability.

Kinodynamic Planning and Dynamic Constraints

Kinodynamic planning represents the cutting edge of motion planning, where robots must consider not just where they can go, but how quickly they can get there given their physical limitations. The term combines "kinematics" (motion without considering forces) and "dynamics" (motion including forces and accelerations).

Traditional motion planning often assumes robots can instantly change direction or speed, like pieces moving on a chessboard. Real robots, however, have momentum, acceleration limits, and complex dynamics. A car can't instantly turn 90 degrees, and a robotic arm can't instantly reverse direction without considering motor torque limits and structural vibrations.

Kinodynamic planners must solve a much more complex problem: finding trajectories through state space (which includes both position and velocity) rather than just configuration space. For a simple point robot, this means planning in four dimensions (x, y, velocity_x, velocity_y) instead of just two (x, y).

The challenge becomes even more complex for underactuated systems - robots with fewer control inputs than degrees of freedom. Think of a helicopter, which has six degrees of freedom (position and orientation in 3D space) but only four main control inputs (throttle and three rotational controls). Planning for such systems requires sophisticated techniques that can exploit the coupling between different degrees of freedom.

Applications of kinodynamic planning include autonomous vehicle path planning (considering acceleration, braking, and steering rate limits), drone navigation (accounting for aerodynamic constraints), and robotic manipulation (considering joint torque limits and end-effector dynamics). NASA's Mars rovers use kinodynamic planning to ensure they don't tip over on steep terrain or get stuck in soft sand.

Conclusion

Motion planning stands as one of robotics' most fundamental and challenging problems, bridging the gap between artificial intelligence and physical reality. We've explored how global planners provide strategic path-finding capabilities, local planners enable real-time responsiveness, and sampling-based algorithms make complex problems computationally tractable. The integration of collision detection ensures safety, while kinodynamic planning brings realistic physical constraints into the equation. As robots become more prevalent in our daily lives - from autonomous vehicles to household assistants - these motion planning techniques will continue evolving to handle increasingly complex and dynamic environments. The future of robotics depends on our ability to give machines the spatial intelligence to navigate our world safely and efficiently.

Study Notes

• Configuration Space (C-space): Mathematical representation of all possible robot positions and orientations, divided into free space (safe) and obstacle space (collision zones)

• Global Planning: Strategic approach finding complete paths from start to goal considering entire environment (PRM, RRT algorithms)

• Local Planning: Tactical approach for immediate obstacle avoidance and real-time navigation (DWA, Potential Fields)

• Probabilistic Roadmap Method (PRM): Builds reusable roadmap by randomly sampling configurations and connecting nearby samples

• Rapidly-exploring Random Tree (RRT): Grows tree structure from start toward goal, effective in high-dimensional spaces

• RRT*: Optimized version of RRT that continuously refines paths for better solutions

• Collision Detection: Algorithms to check if robot configurations intersect with obstacles (GJK, hierarchical methods)

• Sampling-Based Planning: Uses random sampling to explore configuration space and build connectivity graphs

• Kinodynamic Planning: Considers both geometric constraints and dynamic limitations (velocity, acceleration, forces)

• Bidirectional Search: Trees grow from both start and goal simultaneously to reduce planning time

• Dynamic Window Approach (DWA): Local planner considering velocity and acceleration limits over short time horizons

• State Space: Extended configuration space including both position and velocity information for dynamic planning

Practice Quiz

5 questions to test your understanding

Motion Planning — Robotics Engineering | A-Warded