Robot Motion with Obstacles

This Demonstration shows a two-link planar arm robot operating in the workspace on the left, containing two small circular obstacles. The corresponding robot phase space on the right shows the configurations for which an arm intersects an obstacle. You can relocate an obstacle in the workspace and see the corresponding change in phase space. Move the locator in phase space vertically or horizontally to rotate the robot arms. The angles and are expressed modulo . The obstacle regions are computed using unit squares. You can improve the quality of the computation by increasing .


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


The set of all possible configurations of the robot can be represented in a two-dimensional phase space. Of particular interest are the configurations in which the robot collides with one of the obstacles.
This Demonstration computes the obstacle regions using unit squares and determines if the centroid of each square is in a collision. Given and , the motion computation is trivial.
However, computing the phase-space obstacle region is more difficult, because the size of the space representation grows exponentially with the number of degrees of freedom (independent joints) of the robot.
Consider how many -dimensional unit squares are required to fill a space of size . For a one-dimensional space, units are needed. For a two-dimensional space, squares are needed. For an -dimensional space, hypercubes would be required.
The phase space for a two-link planar robot can be represented on a torus. When rotation joint 1 moves past , it returns to angle 0. This is represented by dashed and solid lines of the same color. If the phase space were printed on a rubber sheet, cut out, and the dashed and solid lines of each color were joined, the resulting shape would be a torus. In this Demonstration, moving the locator past the edge of the phase space wraps the angle around .
[1] M. Spong, S. Hutchinson, and M. Vidyasagar, Robot Modeling and Control, Hoboken, NJ: John Wiley and Sons, 2006.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.