Back to Basics: Robot Motion Planning Made Easy

Robot Motion Planning Made Easy

Robot motion planning? Basic? Isn’t motion planning really complicated!? Not necessarily. If you’ve ever used a GPS, you can easily understand motion planning with offline programming.

Back to… basics?

Motion planning?

You might be thinking: Isn’t robot motion planning a very advanced topic?

Well, yes, it can be pretty advanced. If you wanted to create your own motion planning algorithm, and do all the programming yourself, the topic can quickly become complex and confusing. But, you don’t need to know all the intricate mathematical details to understand how to use motion planning in your robotic applications.

If you’ve ever used a GPS or followed smartphone directions, you should be able to understand the basics of robot motion planning.

What Is Robot Motion Planning? (P.S. you already know)

You can probably make a good guess at the function of a “robot motion planner” by looking at the name itself, right? A motion planner is an algorithm which automatically plans the route (aka trajectory, path) that the robot will travel to get from Point A to Point B.

These days, almost everyone is familiar with motion planners, but most people don’t realize that they are.

Some years ago, I would have had to come up with an inventive analogy to describe what a motion planner did. Not any more. For at least the last decade, almost everyone has a smartphone with a GPS and a mapping app. These apps use the same type of planning algorithms as robot motion planners.

You use a motion planner every day

Imagine you unlock your smartphone, open the mapping app, and ask it: “How do I walk from my house to Belluccio’s pizza restaurant?”

The smartphone now has two locations:

  1. The start location (your house).
  2. The end location (Belluccio’s pizza restaurant)

Between those two locations, there are a network of interconnected streets. There are an almost infinite number of different routes it could choose to travel between them. The mapping app uses a planning algorithm to plot the best route between the two locations.

But how does the app know what is the “best route”?

It doesn’t! Maybe the “best” route is the shortest. Maybe it’s the quickest. Only you know what “best” means. That’s why the app probably gives you several different options for routes and you have to pick between them. However, people can’t handle more than 3 or 4 options at once, so your app probably picks the 3 shortest, quickest routes and asks you to choose between them.

Robot motion planning uses the same type of algorithm to decide which is the best route for a robot to take. It is most commonly used in mobile robotics where the problem looks very similar to our GPS map example. However, it is also used with industrial manipulators. In this case, the planning problem is slightly more complex because paths need to be planned in 3D space.

Why Do We Use Motion Planning in Industrial Robotics?

The main reason that we use motion planners is that it speeds up the programming process when the robot is in a complex environment. Instead of planning every single move ourselves, the motion planner can automatically create one or more good routes for the robot to follow.

Notice that I said “when the robot is in a complex environment.” By this I mean an environment where there are lots of obstacles. For many robot applications, the path between two locations in its workspace is free from obstacles. If so, a simple “Joint Move” command is faster and more efficient. However, when there are obstacles in the environment, there is a danger that the robot could collide with them. In this case, manually planning is less efficient than using a motion planner.

But, before you use a motion planner to avoid collisions, make sure there are no simpler ways to avoid robot collisions by checking out our previous article 5 Easy Ways to Avoid Robot Collisions.

How Does a Motion Planner Work?

There are a whole host of different motion planning algorithms and each one works in a slightly different way. However, there are similarities between them.

Here are three aspects that are common among all motion planners:

1. Configuration Space: Why You’re Smarter Than Your Phone

The configuration space describes all the locations and orientations that the robot could possibly locate itself within the environment. Before the algorithm can plan a route, it needs to know what are all the possible points along that route.

Let’s go back to our smartphone GPS example. The configuration space is all of the streets that have been mapped in the entire world (yes, it is possible to plot a route between your house to the pizza restaurant that takes a detour through a neighboring country). However, the world is very big, so the planning algorithm probably restricts the configuration space to all streets in a radius between the start and end locations.

It’s important that your configuration space accurately represents the environment. Here’s why:

Imagine that you know a shortcut to Belluccio’s pizza restaurant which involves jumping over the fence in your back yard and walking down an alley. The algorithm will never use this shortcut, even if it’s the best route, because the configuration space doesn’t include the alley or the path over your garden fence.

With robotic manipulators, the configuration space is very similar to the robot’s workspace, which you can see in RoboDK.

2. Free Space: Where Can the Robot Move?

There will be some spaces in the robot’s workspace which the robot can’t move, e.g. because there are obstacles in them. The algorithm will remove all obstructed locations from the configuration space.

This leaves it with the “free space” which contains all the locations which are really available for motion planning.

The configuration space is fixed. However, the free space can change when new objects enter and leave the environment.

3. Planning: What Path Will the Robot Take?

Finally, the motion planning algorithm plots the best route within the free space. This is where the different approaches to motion planning part company.

Some algorithms (known as combinatorial planning algorithms) are called “complete”, which means that they will always find a solution if one exists or report failure otherwise. Others (known as sampling-based planning) are more efficient but may fail to find solutions in some situations.

In industrial robotics, the more efficient option is actually better even though it might miss a solution in some cases. It is more useful to get an answer quickly than to have to wait hours for the motion planning algorithm to test all of the possible routes. This is why sampling-based planning algorithms like Probabilistic Roadmaps (PRM) are often preferred over the alternatives.

How to Use Robot Motion Planners in Your Application

The simplest way to incorporate motion planning into your own robotic application is to use the motion planner which is integrated into your offline programming software. That is, if your software has a motion planner is available. Most don’t.

Before this year, RoboDK didn’t include a motion planner… but now that’s all changed!

You can now use the PRM motion planner with the newest version of RoboDK.

How would a motion planner improve your robot programming tasks? Tell us in the comments below or join the discussion on LinkedIn, Twitter, Facebook, Instagram or in the RoboDK Forum.

About Alex Owen-Hill

Alex Owen-Hill is a freelance writer and public speaker who blogs about a large range of topics, including science, presentation skills at CreateClarifyArticulate.com, storytelling and (of course) robotics. He completed a PhD in Telerobotics from Universidad Politecnica de Madrid as part of the PURESAFE project, in collaboration with CERN. As a recovering academic, he maintains a firm foot in the robotics world by blogging about industrial robotics.

View all posts by Alex Owen-Hill

Leave a Reply

Your email address will not be published. Required fields are marked *