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

Add options for madrona render #113

Closed
wants to merge 8 commits into from
Closed

Add options for madrona render #113

wants to merge 8 commits into from

Conversation

aaravpandya
Copy link
Collaborator

No description provided.

@@ -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)}
Copy link
Contributor

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

@@ -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":
Copy link
Contributor

@eugenevinitsky eugenevinitsky May 12, 2024

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

@aaravpandya aaravpandya marked this pull request as ready for review May 13, 2024 20:32
device="cuda",
render_mode="rgb_array",
data_dir="/home/aarav/gpudrive/build/tests/testJsons",
device="cpu",
Copy link
Contributor

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):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciated

@aaravpandya aaravpandya marked this pull request as draft May 14, 2024 21:07
@aaravpandya aaravpandya deleted the ap_madronaRender branch June 10, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants