From the series: Motion Planning Hands-on Using RRT Algorithm
YJ Lim, MathWorks
Industrial robots are designed to perform specific tasks and appropriate algorithms for perception, planning, and control. Pick and place automation, for example, can speed up the process of picking up parts or items and placing them in goal locations. This application typically uses sensors and autonomous algorithms to identify, grasp, and move objects from one place to another.
Learn about the bi-directional rapidly exploring random tree (RRT) algorithm for robot manipulators. Watch how to design robot motion planners and tune parameters such as the maximum connection distance between planned configurations, the distance resolution for validating motion between configurations, and an optional connect heuristic to potentially increase speed.
Hello. My name is Yj Lim, technical product manager of robotic and autonomous systems at MathWorks. In this Hands-on section, I would like to discuss about motion planner for robot manipulator. Specifically, bidirectional rapidly-exploring random tree algorithm for pick and place robot application.
Here we are seeing a simulation on the left and a corresponding video on the right of a robot arm performing pick and place. Pick and place robots are commonly used in the modern manufacturing environment. Pick and place automation can speed up the process of picking up the part or item and placing them in another location.
Typically, this application use all the master of perception system as well as autonomous algorithm to identify grass and move the object from one place to another. Pick and place robot in general includes element of perception, planning and control.
Robot manipulator can automatically detect special obliging based on camera input and plan or past to pick the object. If a position of the object is now fixed, then this dynamic environment will make the complex problem compared to the traditional pick and place task where everything is known beforehand.
As you can think of, it involves several different technologies and concept like lower body optimization, computer vision and machine learning, control logic and caution relation and so on. To begin with designing this pick and place robot application, it will be a good idea to start with a system level design that is representing the component that you will be need and the interaction between them.
For this case, we will need an object detector and classifier from perception module, and motion planner, supervisory state controller, and simulator over the robot hardware to prototype, iterate, and test on it. Among these elements, this hands-on section will specifically discuss about motion planner for robot manipulator. Using manipulator to pick and place the object in an environment may require path planner algorithm, like repeatedly exploring random tree planner.
It takes on initial configuration, final configuration, and environment as your input. So what makes this problem interesting is the constraint then needed to be satisfied. Example of constraints are robot join limit and obstacle in the environment. Motion planner will find the collision-free path from starting configuration to goal configuration. In here, I would like to discuss about bidirectional RRT algorithm for robot enumerator, specifically on how to tune the sum of a parameter before the actual pick and place workflow.
Bidirectional RRT planner create two trees at the specified starting and the goal in a configuration. You will need to specify some property. First, maximum connection distance between planning the configuration, and optional connector heuristic property to potentially increase the speed. To extend each tree from start and goal configuration, plan or generate a random configuration. And if valid, which means no collision with the environment, take a step from the list node based on next connection distance property.
After each extension, the planner attempts to connect between two trees. Embedded configuration over connection that collide with the environment are not added to the tree. When enabled, connect to heuristic properties are true, this will disable the limit on the max connection distance property, and then connect collision-free to tree directly whenever they see each other.
When the environment is less crowded, connected heuristic property is useful for shorter planning time. When we start the enable connected heuristic property to the force, we limit extension distance to connecting between two trees to the value of a max connection distance. This will result in higher success later of finding the valid plan, but may lead to the longer pass.
You can use a pass shortening function to shorten specified pass by learning a randomizer shortening strategy. For example, let's say this is initial pass. Select two non and adjacent edge first. And then select intermediate configuration on the edge selected. And then try to connect them. If not valid, so keep adding these edge. Repeat with another two non and adjacent edge. If valid, add this edge.
And then you can delete another longer edge. We have a separate example on manipulator motion planner from the robotics tool box that you can try out. In here, I'm going to use one example that really showcase how to use manipulator RRT object to tune the planner parameter and the planner pass between to joint configurations.
After tuning the planner parameter, the robot manipulator plan a pass to move an object from one place to do another. So first, we have a helper function to load the robot model and its environment. The output over the self function have robot model and initial configuration of a joint position for the robot and environment, which is a set of collision objects that represent the robot environment.
Now we create RRT path planner with a robot model and environment that we got from the helper function in the above. Let's define some parameter 0.3 for mix connection distance, 0.1 for distance resolution for validating motion between configuration. And then we specify start and call in a configuration with the robot. In here, default value of enable connected heuristic properties set as true on planner object.
The path planner check for [? sample ?] collision, and collision within this environment. This is our baseline setting. So the RRT planner should generate a collision-free path through the environment from home configuration to the peak in configuration.
Now let's tune path planner by modifying some plan of parameter. First, let's just set MaxConnectionDistance property to a larger value. This will close longer planner in planning the path.
We can notice the change in the path. The robot arm swings much higher due to the larger connection distance. Now, let's step back at the next connection distance to the baseline value 0.3, and we change validation distance to really small value, 0.01, to enable 10 times final validation of the motion along the edge in the-- planning the pass. A smaller value is useful in case of a crowd environment with a lot of collision object there. With that, we can see the robot arm move a much smaller distance, but it took longer planning time.
Let's try something different now. Now let's take a look at the motion after we change connected heuristic property on the planner object. The connected heuristic allow our planner to greedily and aggressively join the start and call trees. When we set EnableConnectHeuristic to the false, the results give you the longer planning times.
We can see the robot motion becoming jerky after we disable the ConnectHeuristic property on the planner object within this less cluttered environment. We set that EnableConnectHeuristic to the true. Now our planner looks good, and it has showed a planner and reasonable planning times.
Let's do now pick and place a workflow where robot moves an object through the environment. For simplicity, in this example, we attached a cylinder to the end [? impact ?] of the robot and move it to the new location. After picking an object, we specify goal configuration for placing an object over the wall.
We modify planner parameter here for new start and goal location. Now, to shorten the path, we will use short term function and specify a number of iteration. Please notice the robot pass is shorter, but it will result in longer computation times.
Today, we cover some motion planning with MATLAB to simulate and deploy for your mobile robot navigation, as well as a robot manipulator. We hope you found this tutorial helpful. So we have a lot of materials to get started with.
I encourage you to visit our related product page, which I have shown here. We have a short video to help you to ramp up on several topics, including this section we discussed. In addition, we have a large number of example and webinar materials that are published on our website to help accelerate your development effort.
I would ask you to explore these resources and see if these can help with your application. We will be happy to support your user case, so feel free to reach out to us with your question. Thank you for your attention.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .Select web site
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.