-
Notifications
You must be signed in to change notification settings - Fork 11
bowl and microwave env #24
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
base: main
Are you sure you want to change the base?
Conversation
| "GoalReachingEnv", | ||
| "HangLifebuoyEnv", | ||
| "PutBowlInsideMicrowaveEnv", | ||
| "SweepTableEnv", |
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.
also pick_cube_env
examples/run_hang_lifebuoy_teleop.py
Outdated
| ) | ||
|
|
||
| # Start teleop wrapper (keyboard listener) FIRST, before creating Genesis scene | ||
| teleop_wrapper.start() # type: ignore |
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.
no need type: ignore here.
| ) | ||
|
|
||
| # Start teleop wrapper (keyboard listener) FIRST, before creating Genesis scene | ||
| teleop_wrapper.start() # type: ignore |
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.
also here.
examples/run_hang_lifebuoy_teleop.py
Outdated
| seed=0, | ||
| precision="32", | ||
| logging_level="info", | ||
| backend=gs.cpu, # type: ignore |
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.
i am not sure if we need type: ignore it here.
examples/run_sweep_table_teleop.py
Outdated
| seed=0, | ||
| precision="32", | ||
| logging_level="info", | ||
| backend=gs.cpu, # type: ignore |
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.
same
examples/run_sweep_table_teleop.py
Outdated
| ) | ||
|
|
||
| # Start teleop wrapper (keyboard listener) FIRST, before creating Genesis scene | ||
| teleop_wrapper.start() # type: ignore |
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.
same
| seed=0, | ||
| precision="32", | ||
| logging_level="info", | ||
| backend=gs.cpu, # type: ignore |
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.
same
| except Exception as e: | ||
| # Skip entities that don't have get_pos/get_quat methods | ||
| print(f"Warning: Could not get pose for entity '{entity_name}': {e}") | ||
| continue |
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 stead of using try and except here, why don't we try to make sure the entity has get_pos and get_quat()
| device: torch.device = _DEFAULT_DEVICE, | ||
| ) -> None: | ||
| super().__init__(device=device) | ||
| self._device = device |
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 not need. since in the BaseEnv, we already defined self.device: Final[torch.device] = device
| ), | ||
| show_viewer=True, # Enable viewer for visualization | ||
| show_FPS=False, | ||
| ) |
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.
the configuration (hyper)-parameters should be specified via EnvArgs
| pos=(0.0, 0.0, 0.05), | ||
| size=(0.6, 0.6, 0.1), | ||
| ), | ||
| ) |
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.
same here, the numbers seems random?
| euler=(0, 0, 90), | ||
| scale=0.03, | ||
| collision=True, | ||
| ), |
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.
same
| euler=(90, 0, 90), | ||
| scale=(10, 5, 10), | ||
| collision=True, | ||
| ), |
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.
same
| def apply_action(self, action: torch.Tensor | Any) -> None: | ||
| """Apply action to the environment (BaseEnv requirement).""" | ||
| # For teleop, action might be a command object instead of tensor | ||
| if isinstance(action, torch.Tensor): |
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 if-else doesn't seem reasonable. How come if tensor is no action to applied? It is misleading and error-prone.
| ) -> None: | ||
| super().__init__(device=device) | ||
| self._device = device | ||
| self._num_envs = 1 # Single environment for teleop |
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.
the num_envs should not be hard-coded here.
|
|
||
|
|
||
| class PutBowlInsideMicrowaveEnv(BaseEnv): | ||
| """Put bowl inside microwave environment.""" |
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.
same also here for this environment. the environment configuration should be specified with EnvArgs. try to avoid using hard-coded parameters.
| def apply_action(self, action: torch.Tensor | Any) -> None: | ||
| """Apply action to the environment (BaseEnv requirement).""" | ||
| # For teleop, action might be a command object instead of tensor | ||
| if isinstance(action, torch.Tensor): |
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.
same as mentioned above
|
|
||
|
|
||
| class SweepTableEnv(BaseEnv): | ||
| """Sweep table environment - sweep trashboxes to target zone.""" |
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.
same comment as in other Env
|
@LeonLiu4 not sure if the comments are addressed or there are any problems. I see there are new commits but I am not sure if I should review them. It would be nice to reply the comments, let us know if it is addressed or you have different opinions so we can move forward. |
I addressed your comments above. Since then I have added new features like changing the observation from tensor to dict and also added rgb images into the observations. |
Hi Leon, thanks a lot for addressing the comments. It generally better to not add new features on top of existing PRs since new features make it difficult for the reviewer to keep track new changes. As a recommendation, it is better to create smaller PRs. |
No description provided.