-
Notifications
You must be signed in to change notification settings - Fork 505
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
Fixing multiagent with topdownmap #1072
Merged
vincentpierre
merged 10 commits into
facebookresearch:main
from
vincentpierre:fixing_multiagent_with_topdownmap
Jan 12, 2023
Merged
Fixing multiagent with topdownmap #1072
vincentpierre
merged 10 commits into
facebookresearch:main
from
vincentpierre:fixing_multiagent_with_topdownmap
Jan 12, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
facebook-github-bot
added
the
CLA Signed
Do not delete this pull request or issue due to inactivity.
label
Jan 10, 2023
Skylion007
reviewed
Jan 10, 2023
…wn_map. (requires pygame installed and mac) ``` import habitat import numpy as np cli_arg = ['+habitat/task/measurements=top_down_map'] config = habitat.get_config('benchmark/rearrange/rearrange_easy_multi_agent.yaml', cli_arg) from habitat.utils.gym_definitions import make_gym_from_config env = make_gym_from_config(config) env.reset();env.render() while True: _,_,_,_ = env.step(np.array(([0.0] * 8 + [0.2, 1.0] + [0.0]) + ([0.0] * 8 + [0.2, -1.0] + [0.0]) , dtype=np.float32)) _=env.render() ```
ASzot
approved these changes
Jan 11, 2023
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.
This is a cleaner setup, LGTM. In the future, we may want to add more flexibility to the top down map to control the colors of the agent markers to better differentiate the two agents.
Skylion007
approved these changes
Jan 11, 2023
dannymcy
pushed a commit
to dannymcy/habitat-lab
that referenced
this pull request
Jul 8, 2024
* render now will render the top_down_map properly * made topdown map work for rearrangement * working for rearrangement * Adding agent_index to action configurations' * addressing comments and removing the top_down_map from the default measures * For reference, run this code to see the multi-agent render the top_down_map. (requires pygame installed and mac) ``` import habitat import numpy as np cli_arg = ['+habitat/task/measurements=top_down_map'] config = habitat.get_config('benchmark/rearrange/rearrange_easy_multi_agent.yaml', cli_arg) from habitat.utils.gym_definitions import make_gym_from_config env = make_gym_from_config(config) env.reset();env.render() while True: _,_,_,_ = env.step(np.array(([0.0] * 8 + [0.2, 1.0] + [0.0]) + ([0.0] * 8 + [0.2, -1.0] + [0.0]) , dtype=np.float32)) _=env.render() ``` * unifying extract_scalar_info * proper typing for rgb_frame * resolving one last issue * resolving issues with set_agent_state in rearrangement Co-authored-by: vincentpierre <vincentpierre@users.noreply.github.com>
HHYHRHY
pushed a commit
to SgtVincent/EMOS
that referenced
this pull request
Aug 31, 2024
* render now will render the top_down_map properly * made topdown map work for rearrangement * working for rearrangement * Adding agent_index to action configurations' * addressing comments and removing the top_down_map from the default measures * For reference, run this code to see the multi-agent render the top_down_map. (requires pygame installed and mac) ``` import habitat import numpy as np cli_arg = ['+habitat/task/measurements=top_down_map'] config = habitat.get_config('benchmark/rearrange/rearrange_easy_multi_agent.yaml', cli_arg) from habitat.utils.gym_definitions import make_gym_from_config env = make_gym_from_config(config) env.reset();env.render() while True: _,_,_,_ = env.step(np.array(([0.0] * 8 + [0.2, 1.0] + [0.0]) + ([0.0] * 8 + [0.2, -1.0] + [0.0]) , dtype=np.float32)) _=env.render() ``` * unifying extract_scalar_info * proper typing for rgb_frame * resolving one last issue * resolving issues with set_agent_state in rearrangement Co-authored-by: vincentpierre <vincentpierre@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
On top of making TopDownMap work for rearrangement tasks, I also added an agent_index to the actions allowing to control the agents from the gym interface. Running this code :
Gives the following pygame output :
How Has This Been Tested
Types of changes
Checklist