-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add options for madrona render #113
Conversation
pygpudrive/env/base_environment.py
Outdated
@@ -44,7 +54,7 @@ def __init__( | |||
data_dir, | |||
device="cuda", | |||
auto_reset=False, | |||
render_mode="rgb_array", | |||
render_options: dict = None, # sample {"render_mode": "madrona_rgb", "view_mode": "agent_view", "resolution": (128, 128)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my suggestion for this is to use enums at this point instead of passing around strings. Allows for less errors than checking options as strings
pygpudrive/env/viz.py
Outdated
@@ -254,14 +263,14 @@ def draw(self, cont_agent_mask): | |||
radius=self.goal_radius * self.zoom_scale_x, | |||
) | |||
|
|||
if self.render_mode == "human": | |||
if self.render_options["pygame_option"] == "human": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general I don't love string checking it's error prone. I know this is how it's done in gym environments by default
device="cuda", | ||
render_mode="rgb_array", | ||
data_dir="/home/aarav/gpudrive/build/tests/testJsons", | ||
device="cpu", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want this change?
|
||
class RenderMode(Enum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciated
No description provided.