Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] [SStudio] Define terminal scenario time condition #1991

Open
Gamenot opened this issue Apr 27, 2023 · 0 comments
Open

[Feature request] [SStudio] Define terminal scenario time condition #1991

Gamenot opened this issue Apr 27, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Gamenot
Copy link
Collaborator

Gamenot commented Apr 27, 2023

Motivation

Scenarios that should have a specific duration of time to complete should be able to declare that amount of time in the definition of the scenario. This should either be possible through the scenario or the agent missions.

I believe that the agent interface should be able to choose if to respect the scenario time limit or not.

Proposal

I would propose the following for a mission-related ending:

scenarios/sumo/figure_eight/scenario.py

...
agent_mission = t.Mission(
  ...,
  simulation_time_limit_s = 10,
)

gen_scenario(
  t.Scenario(
    agent_missions = [agent_mission],
    ...
  ),
)

examples/control/laner.py

For the agent interface I would propose the following solution:

# Default to 10.5 seconds if not defined in scenario
agent_interface = AgentInterface.from_type(AgentType.Buddha, simulation_time_limit=TimeLimitSec(default=10.5))
# Always 10.5 seconds.
agent_interface = AgentInterface.from_type(AgentType.Buddha, simulation_time_limit=TimeLimitSec(10.5, use_scenario=False))
# Go for 1000 steps instead (existing)
agent_interface = AgentInterface.from_type(AgentType.Buddha, max_episode_steps=1000, simulation_time_limit=False)

Alternatives

No response

Additional context

No response

@Gamenot Gamenot added the enhancement New feature or request label Apr 27, 2023
@Gamenot Gamenot changed the title [Feature request] Define terminal time condition in scenario definition [Feature request] [SStudio] Define terminal scenario time condition Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant