Refactor to support expanded Simulator reset in RearrangeTask - #2018
Merged
Conversation
…g after expanded state reset
aclegg3
requested review from
0mdc,
ASzot,
akshararai,
jimmytyyang and
xavierpuigf
August 20, 2024 21:28
0mdc
approved these changes
Aug 20, 2024
| self._is_episode_active = True | ||
|
|
||
| if self._should_place_articulated_agent: | ||
| # here we are randomizing the base pos and rotation if necessary |
Contributor
There was a problem hiding this comment.
That config field name is ambiguous. It may be worth the trouble renaming (not in this PR).
Contributor
Author
There was a problem hiding this comment.
Yeah, this part of the code is ripe for refactor
| for agent_idx in range(self._sim.num_articulated_agents): | ||
| self._set_articulated_agent_start(agent_idx) | ||
| # here we are setting initial joint states and such from configs, if a configured fixed base start state was provided, it is set | ||
| self._sim.agents_mgr.post_obj_load_reconfigure() |
joannetruong
pushed a commit
that referenced
this pull request
Mar 12, 2025
* refactor to apply auto-sleep and handle articulated_agent base setting after expanded state reset * add setting episode initial states for objects to rearrange_sim.reset
Zeying-Gong
pushed a commit
to Zeying-Gong/Falcon
that referenced
this pull request
Mar 31, 2025
…okresearch#2018) * refactor to apply auto-sleep and handle articulated_agent base setting after expanded state reset * add setting episode initial states for objects to rearrange_sim.reset
Aawangas
pushed a commit
to Supramundaner/habitat-labForReasonNavi
that referenced
this pull request
Aug 14, 2025
…okresearch#2018) * refactor to apply auto-sleep and handle articulated_agent base setting after expanded state reset * add setting episode initial states for objects to rearrange_sim.reset
This file contains hidden or 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
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
This PR aims to refactor RearrangeTask to support the expanded reset functionality from facebookresearch/habitat-sim#2451
Primary change: apply auto-sleep and handle articulated_agent base setting after expanded state reset
Context: previously the Simulator.reset() only set time to 0, so RearrangeTask code was able to leave the robot in place between reset and objects would stay sleeping (e.g. for benchmarking or idle scenarios). Now the objects are set to origin or scene_instance initial state and the reset logic must also handle initial state resetting and re-sleeping (since objects wake when moved).
How Has This Been Tested
Previously the hab2_benchmark test was failing due to regression because the robot was resetting to the origin inside a furniture and objects were awoken on initial reset.
I expect to see the CI pass to validate the change.
Types of changes
Checklist