-
Notifications
You must be signed in to change notification settings - Fork 20
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 plot expert trajectories #325
Conversation
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.
Thanks for your contribution! This looks good to me. Left a small comment, but happy to merge this otherwise.
expert_trajectories: The global state of expert from `LogTrajectory`. | ||
""" | ||
if self.vis_config.draw_expert_trajectories: | ||
controlled_mask = self.controlled_agents[env_idx, :] |
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.
It looks like the "draw_only_ego_expert_traj" draws the trajectories for all controlled vehicles. If that is correct, I'd suggest changing the name for clarity
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.
Thanks for the comment! How about "draw_only_controllable_veh"? Let me know what you think :)
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.
Yes, I think that is more descriptive! Could you please change the name? I'll approve it so you can merge the PR after
I have updated the variable name as suggested. Thanks for your feedback! |
* Add plot expert trajectories (#325) * Add: plot expert trajectories * Refactor: rename draw_only_controllable_veh variable * Export map names * Handle set maps case * Add env helper func to extract filenames from worlds --------- Co-authored-by: Kyungbeom Kim <[email protected]> Co-authored-by: Daphne Cornelisse <[email protected]>
* Add plot expert trajectories (#325) * Add: plot expert trajectories * Refactor: rename draw_only_controllable_veh variable * Export map names * Handle set maps case * Add env helper func to extract filenames from worlds * Dont use sizeof() for loop indexing --------- Co-authored-by: Kyungbeom Kim <[email protected]> Co-authored-by: Daphne Cornelisse <[email protected]>
Description
This PR adds an option to visualize expert trajectories.
This option can be turned on/off with two booleans:
draw_expert_trajectories
: A boolean indicating whether to draw expert trajectories.
draw_only_ego_expert_traj
:: A boolean indicating whether to draw only ego trajectories (only effective if
draw_expert_trajectories
is True)Behavior
draw_expert_trajectories=False
,draw_only_ego_expert_traj=True/False
draw_expert_trajectories=True
,draw_only_ego_expert_traj=False
draw_expert_trajectories=True
,draw_only_ego_expert_traj=True