Base Staggered Grid

class discopygal.solvers.staggered_grid.staggered_grid_base.StaggeredGridBase(eps, delta, **kwargs)

Bases: TensorSolver

build_robot_roadmap(_)

Creates a two-dimensional roadmap for the given robot

Parameters:

robot (Robot) – The robot o build a roadmap for

Returns:

The roadmap

Return type:

Roadmap

Staggered Grid

class discopygal.solvers.staggered_grid.staggered_grid.StaggeredGrid(**kwargs)

Bases: StaggeredGridBase

Staggered Grid Solver - Creates a staggered grid as the roadmap and searches on it.

Search is by using A*

static get_arguments()

Return a list of arguments and their description, defaults and types. Can be used by a GUI to generate fields dynamically. Should be overridded by solvers.

Returns:

arguments dict

Return type:

dict

get_graph()

Return a graph (if applicable). Can be overridded by solvers.

Returns:

graph whose vertices are Point_2 or Point_d

Return type:

networkx.Graph or None

load_scene(scene: Scene)

Load a scene into the solver. Also build the roadmap.

Parameters:

scene (Scene) – scene to load

search_path_on_roadmap()

After already constructed a roadmap, plan a path for each robot (i.e. return paths for all the robots) If failed to find a path for each robot return an empty PathCollection (PathCollection())

The search method of the basic class SamplingSolver is simply finding the shortest path according to the weights of the edges (the weight attribute should be called weight)

Returns:

Path collection of motion planning (path for each robot)

Return type:

PathCollection

dRRT Staggered Grid

class discopygal.solvers.staggered_grid.staggered_grid_drrt.dRRTStaggeredGrid(num_landmarks, drrt_k, **kwargs)

Bases: StaggeredGridBase

Staggered Grid Solver - Creates a staggered grid as the roadmap and searches on it.

Search is by using dRRT

static get_arguments()

Return a list of arguments and their description, defaults and types. Can be used by a GUI to generate fields dynamically. Should be overridded by solvers.

Returns:

arguments dict

Return type:

dict

search_tensor_roadmap()

Search method the explore the tensor roadmap a find a solution path on it