f110_planning.schedulers package

Submodules

f110_planning.schedulers.fixed_interval_scheduler module

Fixed-interval cloud scheduler.

class f110_planning.schedulers.fixed_interval_scheduler.FixedIntervalScheduler(interval: int = 10)

Bases: CloudScheduler

Calls the cloud every interval steps.

Parameters:

interval (int) – Number of steps between successive cloud requests.

should_call_cloud(step: int, obs: dict[str, Any], latest_cloud_action: Action | None) bool

Return True to issue a cloud request on this step.

Parameters:
  • step – The current simulation step (0-based).

  • obs – The current observation dict.

  • latest_cloud_action – The most recent cloud action received (None if no cloud result has arrived yet).

Returns:

Whether to send a new cloud inference request.

f110_planning.schedulers.rl_scheduler module

RL-friendly cloud scheduler for imitation/learning.

This scheduler simply stores the most recent action decision provided by an external agent. The RL environment sets the action each step using set_action() and the should_call_cloud() method returns the currently stored value. We separate the two so that the usual planner interface is preserved while allowing an external controller to override the scheduling decision.

class f110_planning.schedulers.rl_scheduler.RLScheduler

Bases: CloudScheduler

Scheduler whose behaviour is driven by an external RL agent.

The environment calls set_action() once per step to convey whether a cloud request should be issued. should_call_cloud simply returns the stored flag (default False until an action is received).

reset() None

Clear any stored action state.

set_action(call_cloud: bool) None

Tells the scheduler what decision the agent made for the upcoming step.

Parameters:

call_cloudTrue to request a cloud inference; False otherwise.

should_call_cloud(step: int, obs: dict[str, Any], latest_cloud_action: Action | None) bool

Return True to issue a cloud request on this step.

Parameters:
  • step – The current simulation step (0-based).

  • obs – The current observation dict.

  • latest_cloud_action – The most recent cloud action received (None if no cloud result has arrived yet).

Returns:

Whether to send a new cloud inference request.

Module contents

Scheduler classes that decide when to issue cloud inference requests.

class f110_planning.schedulers.FixedIntervalScheduler(interval: int = 10)

Bases: CloudScheduler

Calls the cloud every interval steps.

Parameters:

interval (int) – Number of steps between successive cloud requests.

should_call_cloud(step: int, obs: dict[str, Any], latest_cloud_action: Action | None) bool

Return True to issue a cloud request on this step.

Parameters:
  • step – The current simulation step (0-based).

  • obs – The current observation dict.

  • latest_cloud_action – The most recent cloud action received (None if no cloud result has arrived yet).

Returns:

Whether to send a new cloud inference request.

class f110_planning.schedulers.RLScheduler

Bases: CloudScheduler

Scheduler whose behaviour is driven by an external RL agent.

The environment calls set_action() once per step to convey whether a cloud request should be issued. should_call_cloud simply returns the stored flag (default False until an action is received).

reset() None

Clear any stored action state.

set_action(call_cloud: bool) None

Tells the scheduler what decision the agent made for the upcoming step.

Parameters:

call_cloudTrue to request a cloud inference; False otherwise.

should_call_cloud(step: int, obs: dict[str, Any], latest_cloud_action: Action | None) bool

Return True to issue a cloud request on this step.

Parameters:
  • step – The current simulation step (0-based).

  • obs – The current observation dict.

  • latest_cloud_action – The most recent cloud action received (None if no cloud result has arrived yet).

Returns:

Whether to send a new cloud inference request.