# What is the difference between motion planning and trajectory generation?

What are the major differences between motion planning and trajectory generation in robotics? Can the terms be used interchangeably?

Sometimes the two words are used interchangeably. However, there are some subtle nuances between motion planning and trajectory generation.

When talking about motion planning, it is planning motions for robots to move from point $A$ to point $B$ (such as for mobile robots, etc.) or pose $A$ to pose $B$ (such as for manipulators, etc.). In order to do so, a number of constraints need to be taken into account: collision avoidance, joint limits, velocity/acceleration limits, jerk limits, dynamic balance, torque bounds, and many more. In this sense, not only the the robots is considered but also its environment (e.g., to avoid collision, to how remain balanced). Considering this, motion planning is kind of trajectory generation with lots of constraints. They may be considered the same thing. So, yes, you can use them interchangeably.

When talking about trajectory generation, the scope can be narrower than that of motion planning. Often time, in trajectory generation, people really focus on generating a trajectories---with joint limits, velocity and acceleration constraints---and just that. One case I can think of which is called trajectory generation but not motion planning (or at least, that's what I perceive) is as follows. Think of when we want to execute a trajectory on a manipulator. We send commands to the controller as a set of waypoints, i.e., discrete points (supposedly closed to one another) spread across the trajectory, often at a fixed interval equal to the controller's sampling time. The controller then has to regenerate trajectory segments between two consecutive waypoints, such that manipulator reaches the next waypoint within the fixed time interval while staying within joint limits, velocity limits, and acceleration limits. However, the controller does not really consider even collision avoidance or anything else. That is called trajectory generation.

Sometimes, people may think of motion planning as path planning. That's another thing since, strictly speaking, a path is not equal to a trajectory. A trajectory is a path and information of how to traverse the path with respect to time, a.k.a a velocity profile. Considering this, trajectory generation is kind of a bigger thing.

tl;dr

• Generally, motion planning and trajectory generation are kind of interchangeable.
• Sometimes, trajectory generation can be viewed as a subclass of motion planning.
• If motion planning is viewed as path planning, then trajectory generation is a bigger thing.

You can use motion planning and path planning interchangeably. Both of these terms represent a geometric concept. But a trajectory has a higher level compared to a path. It contains the geometric concept of a path but it also encompasses a velocity or even an acceleration profile.

Consider the geometric path the Google Maps gives you when you give it two different points. Google Maps solves a motion/path planning problem based on your travel type, i.e. Car, Bus, Bicycle. But it does not tell you how fast or slow you should go. But for the driver-less cars, after finding a geometric path, you should also find a profile of velocity and acceleration that the car must follow.

Usually the geometric part is considered as a path/motion planning problem while generating the trajectory from a geometric path and following it is considered a controls systems problem.

In many contexts these terms can be interchangeable, however they can also refer to specific things. Here's a glossary to help figure that out:

State (rigid body mechanics) - Position and velocity at a given moment in time.

Motion - The change of state at any instant in time of a body (or bodies).

Trajectory - The state of a body or bodies over a period of time.

Path - The position of a body or bodies over a period of time without worrying about velocity or higher order terms.

Planning - Calculating how to compose and sequence a set of primitives in a way that takes a body from an initial state to a final state while respecting a set of constraints (avoiding obstacles or burning minimal fuel for instance).

Generation - Used generically but can often refer to the phase of planning when you know all the variables and are just calculating the trajectory.

So motion planning and trajectory planning are interchanged a lot. Trajectory generation can be a sub-task of motion planning in some contexts.

Just using the words in the terms. Motion Planning would be the planned motion of a system to achieve a goal, this would have values even for a system at rest. Whereas Trajectory Generation would be the potential trajectories of a system, and when at rest would be zero. I was thinking about a robotic ship mapping the trajectories of itself and a second robotic ship and if a potential collision was indicated, then some motion planning would be required to attempt to avoid the collision.

Trajectory generation comes from the robot arm / manipulator community. Motion planning is essentially the "same" thing in a wider sense used in ground robotics etc. Both can use kinematics / inverse kinematics, dynamics, fuzzy logic etc. Read papers in both areas and you'll see they are similar algorithms.

What came first and when, good question. Since researchers were solving identical problems in different domains / applications the terminology drifted.

Trajectories can be any transition of the state space over time. Rocket into space. Satellite geosynchronous. ICBM hitting Moscow. Robot arm, robot locomotion etc.

you can referred to this link, it is useful: http://www.ene.ttu.ee/elektriajamid/oppeinfo/materjal/AAR0040/03_Robotics.pdf