armour.reachsets.FOGenerator
- class armour.reachsets.FOGenerator(robot, jrsGenerator: JRSGenerator, smooth_obs: bool = False, obs_frs_combs: dict = None)[source]
Bases:
ReachSetGenerator
ForwardOccupancy This acts as a generator for a single instance of a ForwardReachableSet, and return FOInstance
- __init__(robot, jrsGenerator: JRSGenerator, smooth_obs: bool = False, obs_frs_combs: dict = None)[source]
Methods
__init__
(robot, jrsGenerator[, smooth_obs, ...])generateReachableSet
(robotState)Obtains the relevant reachable set for the robotstate provided and outputs the singular instance of a reachable set.
generate_combinations_upto
(n)generate a bunch of combinations, store in a cell
getReachableSet
(robotState[, ignore_cache])Get a reachable set instance for the given robot state and passthrough arguments
- generateReachableSet(robotState: EntityState) dict[int, armour.reachsets.FOInstance.FOInstance] [source]
Obtains the relevant reachable set for the robotstate provided and outputs the singular instance of a reachable set. Returns FOInstance
- static generate_combinations_upto(n: int) list[list[int]] [source]
generate a bunch of combinations, store in a cell
- getReachableSet(robotState: EntityState, ignore_cache: bool = False, **options) dict[int, rtd.planner.reachsets.ReachSetInstance.ReachSetInstance]
Get a reachable set instance for the given robot state and passthrough arguments
This function handles how to actually get the reachable set with built in caching of already generated instances. It will call generateReachableSet as needed. This is useful if we need to use one reachable set in another reachable set and we don’t want to regenerate it online. It performs caching based on the id of the provided robotState and and the string cast of any additional arguments. If we don’t want to use the cache on one call, setting ignore_cache to true will bypass caching altogether
- Parameters:
robotState – EntityState: Some state of used for generation / keying
ignore_cache – bool: If set true, the cache is completely ignored
- Returns:
A dict of problem id to ReachSetInstance pairs
- Return type: