HGraph Solver
discopygal.solver.hgraphs.MetaHGraphSolver.make_hgraph_solver_class()
- class discopygal.solvers.hgraphs.HGraph(solver_class, num_paths, neighborhood_distance, **kwargs)
Bases:
SamplingSolver
A generic HGraph Solver. Receives a solver class which is the specific solver that is used to construct each path and for the local connector.
- Parameters:
- build_roadmap()
Constructs the roadmap of points in the configuration space which a path will be searched on to find a solution. Every sampling solver should implement how to build the roadmap.
- Returns:
The built roadmap. Each node represents a point in configuration space (dimension = 2*robots_num)
- Return type:
- classmethod 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_potential_bridges(path1, path2)
Return all pairs of points between two paths that are close enough to connect a bridge between them.
- class discopygal.solvers.hgraphs.HGraph_PRM(**kwargs)
Bases:
MetaHGraphSolver
- class discopygal.solvers.hgraphs.HGraph_RRT(**kwargs)
Bases:
MetaHGraphSolver
- class discopygal.solvers.hgraphs.MetaHGraphSolver(**kwargs)
Bases:
HGraph
A meta class to create specific HGraph solvers (HGraph solver based on specific solver class)
- classmethod 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
- static make_hgraph_solver_class(solver_class)
- Create a specific HGraph solver class from given solver_class.Name of the class will be: HGraph_<solver_class_name>
- Parameters:
solver_class – The solver class to make a HGraph solver based on it
- Returns:
The new created solver class
- Return type:
Currently specific HGraph solvers
HGraph for PRM:
discopygal.solvers.hgraphs.HGraph_PRM
HGraph for RRT:
discopygal.solvers.hgraphs.HGraph_RRT