simworld.local_planner package
Subpackages
Submodules
simworld.local_planner.action_space module
ActionSpace module: defines Action enum, Waypoint model, and ActionSpace container.
- class simworld.local_planner.action_space.HighLevelAction(value)
Bases:
EnumHigh-level actions that an agent can perform.
- DO_NOTHING = 0
- NAVIGATE = 1
- PICK_UP = 2
- classmethod get_action_list()
Return a list of all available actions.
- classmethod get_all_actions()
Return a formatted string describing all available actions.
- class simworld.local_planner.action_space.HighLevelActionSpace(*args: Any, **kwargs: Any)
Bases:
BaseModelHigh-level action space that an agent can perform.
- classmethod from_json(json_str)
Parse the action space from a json string.
- classmethod to_json_schema()
Return the json schema of the action space.
- class simworld.local_planner.action_space.LowLevelAction(value)
Bases:
EnumLow-level actions that an agent can perform.
- DO_NOTHING = 0
- STEP_FORWARD = 1
- TURN_AROUND = 2
- classmethod get_action_list()
Return a list of all available actions.
- classmethod get_all_actions()
Return a formatted string describing all available actions.
- Returns:
- str: A string describing all available actions in the format:
“The action can be one of the following: 0: DO_NOTHING, 1: STEP_FORWARD, 2: TURN_AROUND”
- class simworld.local_planner.action_space.LowLevelActionSpace(*args: Any, **kwargs: Any)
Bases:
BaseModelLow-level action space that an agent can perform.
- choice: LowLevelAction = 0
- classmethod from_json(json_str)
Parse the action space from a json string.
- classmethod to_json_schema()
Return the json schema of the action space.
simworld.local_planner.local_planner module
Local Planner module: translates high-level plans into simulator actions.
- class simworld.local_planner.local_planner.LocalPlanner(agent, model: A2ALLM, max_history_step: int = 3, dt: float = 0.1, observation_viewmode: str = 'lit', rule_based: bool = True, exit_event: Event | None = None)
Bases:
objectConverts a high-level plan into low-level navigation actions.
- execute(actions: HighLevelActionSpace) None
Execute a list of actions.
Navigate using traffic rules and conditions.
Navigate from current position to a given destination.
Placeholder for vision-based navigation logic.
- parse(plan: str) HighLevelActionSpace
Parse a plan string and execute the resulting actions.
Module contents
Local Planner package.
This package provides functionality for converting activities into actions. It serves as a bridge between activity definitions and their corresponding action implementations.