In RoboDK, both Smart Motion and the Collision-Free Motion Planner (PRM) are designed to help a robot move without hitting obstacles. However, they use different math and workflows to get the job done.
The motion planning feature in the Collision-Free Motion Planner automatically creates collision-free paths within the robot's workspace by using a motion planning algorithm called "probabilistic roadmaps" (PRM).
The biggest difference between both the motion planners is how much preparation work has to be done before the robot moves.
The PRM planner is a tool that works like building a permanent road network. It first runs a "construction phase", where several minutes are spent in randomly placing points and trying to connect them into a giant roadmap. Once that map is finished, finding a path is instant because the "roads" are already built. However, if you move even one table or box or any other object in the station, the entire map is useless and you have to rebuild it from scratch.
Smart Motion is built to be much more flexible. There is no slow map-building step. It looks at exactly where the robot is and where it needs to go, then finds a safe "tunnel" through the obstacles. It is a one-step process: pick the points (targets), click generate, and it moves. If you move an object in your cell, just click Generate Path again without waiting for a new map.
Speed in motion planning isn’t just about how fast the robot moves, but how long the planner takes to calculate.
The "query phase" in the PRM planner (finding the path on the map) is very fast, but it also comes with a very long "construction phase". It is great if the station is always static, but takes time if there are frequent changes being made.
Smart Motion uses an algorithm which is incredibly fast at solving a single "A to B" problem. It starts searching from both ends of the path at the same time and meets in the middle. This makes the "thinking time" almost unnoticeable for most common tasks.
The focus of any motion planner is collision detection and avoidance. Hence, the precision of the generated safe paths is a very important factor.
The PRM planner relies on the random points it placed during the mapping phase. If the random points do not land inside a narrow space, the robot will think it is blocked, even if there is plenty of room. A larger Number of samples and more Edges per sample will produce a finer-grained roadmap which will take longer to generate, but will lead to a more precise solution.
Smart Motion includes a Constrained Space option for such tricky spots. When this is on, the solver is forced to operate in joint space rather than cartesian space. By doing so, it ensures that when a pose is tested, the system identifies a unique joint configuration, which prevents issues related to multiple possible solutions for a single cartesian pose. In short, this helps the planner remember the robot's position and configuration to ensure the found path is preserved.
Both the motion planners allow us to control how much the robot "worries" about its surroundings.
To get a smoother or safer path using the PRM planner, the Number of Samples and Edges per sample need to be increased accordingly. This makes the map better but makes the wait time longer.
Smart Motion uses a simple Path Quality slider with the following limits:
1.Coarse: This is used for wide-open spaces to get an answer immediately.
2.Fine: This is used for complex jobs. It forces the robot to take "tiny steps" to check for collisions and generate an overall smooth path.