🤖
Robotics Handbook
HomeConnect
  • Welcome
    • Authors Note
  • Computer Aided Designs and Simulations
    • Computer Aided Design and Simulations
    • 3D Modelling CAD
      • SolidWorks
    • Simulations
    • PCB Design
  • ROS (Advanced)
    • ROS
    • ROS
      • Concepts and Packages
      • Manual and Quick Setup
    • Some Important packages
  • Hardware
    • Design Processes
      • Materials Selection
      • Build and Prototyping
      • 3D Printing and Machining
    • Fabrication Parts
  • Common Mechanisms
    • Wheels and Drives
    • Power Transmission
  • Career Paths & Research Opportunities
    • Career in Robotics
    • Job Roles In Robotics
    • Conferences and Journals
  • Companies Hiring for Robotics
  • Leading Institutes
  • Mathematical and Programming Foundations
    • Linear Algebra for Robotics
    • Calculus
  • Programming for Robotics
    • Common Languages
    • Algorithms
    • Digital Twin
  • Embedded Systems for Robotics
    • Embedded Systems
    • Microcontrollers
      • Microcontrollers (Advanced Theory)
      • Choosing a Microcontroller
    • Sensors and Actuators
      • Sensors for Robotics
      • Actuators for Robotics
    • Communication
      • Communication Protocols
    • RTOS
    • Power Systems
      • Battery Charging and Storage Best Practices
  • ML and Perception
    • ML and Perception
    • Reinforcement Learning
    • Cameras, Depth Sensors and LiDAR
    • Image Processing Basics (OpenCV)
    • Object Detection and Tracking
    • Example of a Vision Pipeline
  • Mobile Robotics
    • Mobile Robotics
    • SLAM and Navigation
    • Robot Kinematics and Dynamics
      • Some Kinematic Models
    • Trajectory Planning
    • AMR's and AGV's
    • MH633 : Mobile Robotics
      • Geometric Foundations
      • Kinematics
  • Frontiers and Emerging Fields
    • Frontiers and Emerging Fields
    • Humanoids
    • Autonomous Navigation
    • Bio-inspired and Soft Robotics
    • Space Robotics
    • Cobots
    • Edge Robotics
    • Medical Robotics
  • Drones, Rocketry and Aviation
    • Drones
      • Drone Anatomy
    • Rocketry
Powered by GitBook
On this page
  • Trajectory Planning in Robotics
  • Core Concepts
  • Approaches to Trajectory Planning
  • Common Trajectory Generation Methods
  • Trajectory Planning in ROS (Robot Operating System)
  • Key Considerations
  1. Mobile Robotics

Trajectory Planning

PreviousSome Kinematic ModelsNextAMR's and AGV's

Last updated 17 hours ago

Trajectory Planning in Robotics

Trajectory planning is a critical component in robotics that determines how a robot should move from a starting configuration to a goal configuration over a specific period. It goes beyond simply finding a geometric path; it involves generating a time-scheduled sequence of states (positions, velocities, and accelerations) that a robot's joints or end-effector must follow to execute a motion smoothly and efficiently, while respecting various constraints .

Trajectory planning is a subset of the broader motion planning hierarchy, which typically looks like this :

  1. Task Planning: Defining high-level goals (e.g., "pick up the object").

  2. Path Planning: Generating a geometrically feasible sequence of configurations (waypoints) from a start to a goal, often focused on collision avoidance. A path does not include timing information .

  3. Trajectory Planning: Taking a path (or a set of desired waypoints) and generating a time history of control inputs (like positions, velocities, and accelerations) for the robot to follow that path .

  4. Trajectory Following/Control: Executing the planned trajectory using the robot's controllers, ensuring the robot accurately tracks the desired motion.

The key distinction is that a path is a spatial description of movement, while a trajectory is a path parameterized by time, specifying when the robot should be at each point along the path .


Core Concepts

  • Waypoints/Via Points: These are specific configurations (positions and orientations) in the robot's workspace or joint space that the trajectory must pass through. Via points can be used to shape the trajectory or guide the robot around obstacles .

  • Constraints: Trajectory planning must consider various constraints:

    • Kinematic Constraints: Limits on joint positions, velocities, and accelerations.

    • Dynamic Constraints: Limits on joint torques/forces based on the robot's dynamics.

    • Collision Avoidance: Ensuring the trajectory is collision-free.

    • Smoothness: Minimizing jerk (rate of change of acceleration) for smoother motion and reduced wear.

  • Configuration Space (C-space): The set of all possible configurations a robot can attain. Trajectories can be planned in joint space or task space .


Approaches to Trajectory Planning

  1. Joint Space Planning:

    • Description: The trajectory is defined as a function of time for each of the robot's joints directly. The planner generates sequences of joint angles/positions.

    • Pros: Computationally simpler, easier to directly handle joint limits, and inherently avoids kinematic singularities if the path is defined in joint space.

    • Cons: The path of the end-effector in Cartesian space can be complex and less intuitive to predict or control.

  2. Cartesian Space (Task Space) Planning:

    • Description: The trajectory of the robot's end-effector (or another point of interest) is planned in 3D Cartesian space.

    • Pros: Allows direct specification of the end-effector's path (e.g., moving in a straight line, drawing a circle), which is often more natural for task definition.

    • Cons: Requires an inverse kinematics solver to convert the Cartesian trajectory into joint space commands for the robot. This can be computationally intensive, may yield multiple solutions, or encounter singularities where a Cartesian motion is impossible.


Common Trajectory Generation Methods

Several methods are used to generate the time-based functions for trajectories between waypoints:

    • Polynomial functions of time are used to interpolate between waypoints.

    • Cubic Polynomials (3rd order): Commonly used when positions and velocities at the start and end of a segment need to be specified. This provides 4 boundary conditions.

    • Quintic Polynomials (5th order): Used when positions, velocities, and accelerations at the start and end of a segment need to be specified. This provides 6 boundary conditions and results in smoother acceleration profiles.

    • Higher-order polynomials can ensure continuity of jerk or even higher derivatives.

    • Pros: Generate smooth trajectories with continuous derivatives.

    • Cons: Can lead to overshooting of velocity or acceleration limits between waypoints if boundary conditions are not carefully chosen.

    • The trajectory segment is divided into three phases: constant acceleration, constant (maximum) velocity, and constant deceleration. This creates a trapezoidal shape for the velocity profile over time. The position profile is an s-curve (linear segments with parabolic blends).

    • Pros: Relatively easy to implement and tune. Maximum velocity and acceleration can be directly specified and adhered to.

    • Cons: Results in discontinuous jerk at the transitions between segments, which can cause vibrations. S-curve trajectory profiles (which are 7th order polynomials or based on sinusoidal jerk) can address this.

    • Splines are piecewise polynomial functions used to create smooth curves through a set of control points. For trajectory planning, these spatial splines are then parameterized by time, often by moving along the spline at a specified speed profile.

    • B-Splines are defined by intermediate control points. The spline does not necessarily pass through these control points but stays within their convex hull.

    • Pros: Offer flexibility in creating complex, smooth paths. Control points provide an intuitive way to shape the trajectory.

    • Cons: The time parameterization is an additional step.


Trajectory Planning in ROS (Robot Operating System)

ROS provides a rich ecosystem of packages for motion planning, which inherently includes trajectory planning.

  • ROS Navigation Stack (move_base): Primarily for 2D/3D mobile robot navigation.

    • It uses a global planner to find a path and a local planner to generate velocity commands to follow this path, effectively performing local trajectory planning.

  • MoveIt!: A comprehensive motion planning framework, primarily for robot manipulators.

    • It integrates various planning algorithms and tools for collision checking, kinematics, and trajectory execution.

  • Standard Trajectory Messages:

    • ROS defines messages like trajectory_msgs/JointTrajectory and trajectory_msgs/MultiDOFJointTrajectory. These messages represent a sequence of points, where each point typically specifies positions, velocities, accelerations, and the time_from_start for each joint or for the multi-DOF end-effector. These messages are used by planners to send trajectories to robot controllers.


Key Considerations

  • Collision Avoidance: Trajectories must be checked to ensure they do not cause the robot to collide with itself or the environment.

  • Smoothness: Smooth trajectories (continuous velocity, acceleration, and ideally jerk) are desirable to reduce mechanical stress, improve tracking accuracy, and enhance safety.

  • Computational Efficiency: For dynamic environments or real-time applications, trajectory planning algorithms must be fast.

  • Optimality: Depending on the application, trajectories might be optimized for time, energy, smoothness, or other criteria.

Trajectory planning is a fundamental bridge between high-level task goals and low-level robot control, enabling robots to move purposefully and effectively in their environments.

There are two primary spaces in which trajectories can be planned :

Polynomial Trajectories :

Trapezoidal Velocity Profiles (LSPB - Linear Segment with Parabolic Blends) :

Splines (e.g., B-Splines) :

base_local_planner : A common local planner package that implements algorithms like the Trajectory Rollout and Dynamic Window Approach (DWA). These methods simulate multiple possible short-term trajectories by sampling velocities, evaluate them against a cost function (considering proximity to the path, obstacles, goal, and robot kinematics), and select the best one to execute. It adheres to the nav_core::BaseLocalPlanner interface.

OMPL (Open Motion Planning Library) : A core planning library within MoveIt!. It provides numerous sampling-based path planning algorithms (e.g., RRT, PRM). While OMPL primarily outputs geometric paths, MoveIt! includes utilities for time parameterization (e.g., Iterative Parabolic Time Parameterization, Time-Optimal Path Parameterization) to convert these paths into executable trajectories respecting velocity and acceleration limits.

CHOMP (Covariant Hamiltonian Optimization for Motion Planning) : An optimization-based planner available in MoveIt!. CHOMP directly optimizes an initial trajectory to make it smooth and collision-free.

SBPL (Search-Based Planning Library) : Another planner integrable with MoveIt!, employing graph search techniques.

trajopt : A library for trajectory optimization specifically designed for generating collision-free paths for robot arms and mobile manipulators. It's built on OpenRAVE but can be integrated with ROS. It is known for its speed and ability to handle high-degree-of-freedom problems and various constraints (pose, velocity, collision).

1
5
6
5
1
5
1
5
1
5
6
1
6
1
1
5
5
5
2
3
3
3
4