torus.world File Reference

Detailed Description

A point moving on a torus with obstacles. A very simple example used to test path planning algorihtms. The nice thing of this example is that results can be easily visualized.

Note that the torus can be formulated using just two parameters (this can be obtained usig a JOINTS REPRESENTATION), but we use an implicit formulation (using the LINKS REPRESENTATION). The variables are used to represent the position and orientation of the ball and constraints are added to limit their valid values to those on the torus. In this way we obtain a embedded manifold.

The key data for this problem are:

Ambient space dimension (in the simplified problem) 7
Configuration space dimension 2
Average planning time with bin/cuikatlasrrt (in seconds) 0.1

This example is treated following these steps (from the main CuikSuite folder):

  • Adjust the parameters: Different algorithms use different parameter settings. Just check the parameter file and uncomment the appropriate lines. If you do not use the correct parameters, the planning might get blocked.
  • Solve the path planning problem: using the graph-based search
  • Solve the path planning problem: using a RRT-like algorithm
  • Visualize the solution path: The torus is not shown (only the obstacles and the ball are displayed). However you can load the torus from examples/Torus/bodies/torus.bez, once geomview is open.
  • Visualize the solution path on the torus: We plot the path and show it on the tours. We also show the obstacles, but, plesase take into account that the moving object is a ball, thus, the narrow corridor is narrower that what is seen (should be narrowed by the radii of the moving ball):
    • bin/cuikplotpath examples/Torus/torus examples/Torus/torus_path 12 13 14
    • geomview examples/Torus/torus_path.gcl examples/Torus/bodies/body1 examples/Torus/bodies/body2 examples/Torus/bodies/body3 examples/Torus/bodies/torus.bez

This is an example of the kind of paths you will get (note that we changed the appearance of the elements in the plot using geomview):

The path can be smoothed executing:

  • bin/cuiksmoothpath examples/Torus/torus
  • bin/cuikplotpath examples/Torus/torus examples/Torus/torus_spath 12 13 14
  • geomview examples/Torus/torus_spath.gcl examples/Torus/bodies/body1 examples/Torus/bodies/body2 examples/Torus/bodies/body3 examples/Torus/bodies/torus.bez

This is an example of smoothed path:

Definition in file torus.world.