The LEMUR planner works on roadmaps constructed in the robot's configuration space. Each planning invocation requires the roadmap to be specified. The prpy_lemur
package includes a roadmaps
module, which contains a simple named-tuple interface for constructing such roadmaps.
>>> import prpy_lemur.roadmaps >>> my_roadmap = prpy_lemur.roadmaps.Halton(num=1000, radius=2.0) >>> my_roadmap Halton(num=1000, radius=2.0)
This roadmap specification can then be passed to the LEMUR planner. This can be done either on the planning method:
traj = planner.PlanToConfiguration(robot, q_goal, roadmap=my_roadmap, max_batches=1)
Or at planner construction time, so that it is used as the default roadmap for all its planning methods:
planner = prpy_lemur.LEMURPlanner(roadmap=my_roadmap)
These roadmap types are supported by prpy_lemur.roadmaps
:
AAGrid(res)
FromFile(filename, root_radius)
Halton(num, radius)
HaltonDens(num_per_batch, radius_first_batch)
HaltonOffDens(num_per_batch, gamma_factor, scaling, seed)
RGG(num, radius, seed)
RGGDens(num_per_batch, radius_first_batch, seed)
RGGDensConst(num_per_batch, radius, seed)
This is the meaning of the various parameters:
filename
- the filename to load the roadmap fromnum
- the number of milestones in the roadmapnum_per_batch
- the number of milestones in each batch of the roadmapres
- the resolution (e.g. in radians) between grid verticesseed
- the random seed used for the roadmapradius
- the connection radius used for roadmap edgesgamma_factor
- the multiplicative factor to scale gammascaling
- the radius scaling strategy (log_n
, loglog_n
, or 1_n
)radius_first_batch
- the connection radius used for the first batch of roadmap edges; subsequent radii are shrunk according to the appropriate ruleroot_radius
- the connection radius used for roadmap edges to root milestones (i.e. at start or goal configurations)With the exception of FromFile
, each roadmap Type
also have an associated cached version CachedType
. This roadmap type inherits the parameters from its parent type, and also includes the following additional parameter:
is_cache_required
- whether the planner should fail if the cache file is not found (False by default)