-
Notifications
You must be signed in to change notification settings - Fork 72
feat: add_burger and sausage #122
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?
feat: add_burger and sausage #122
Conversation
385349c to
8906c15
Compare
| @@ -0,0 +1,59 @@ | |||
| import argparse | |||
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.
what is this script for?
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.
To compute the new scene viewpoint. Customer can input the perspective info in Isaacsim GUI and get the relative viewpoint parameters.
| soft_joint_pos_limit_factor=1.0, | ||
| ) | ||
|
|
||
| SO101_KINFE_CFG = ArticulationCfg( |
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.
can we reuse the SO101_FOLLOWER_CFG, and just modify the usd_path
|
|
||
| KITCHEN_WITH_HAMBURGER_USD_PATH = str(SCENES_ROOT / "kitchen_with_hamburger" / "scene.usd") | ||
|
|
||
| KITCHEN_WITH_HAMBURGER_USD_PATH = str(SCENES_ROOT / "kitchen_with_burger" / "scene.usd") |
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.
recommend to align the name of the content and path, change to KITCHEN_WITH_BURGER_USD_PATH, or change to "kitchen_with_hamburger".
I recommend the latter.
| @@ -0,0 +1,17 @@ | |||
| from pathlib import Path | |||
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.
we already have this file in scenes/loft.py
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.
and do you use it in this PR?
| ranges = torch.tensor(range_list, device=env.device) | ||
| rand_samples = math_utils.sample_uniform(ranges[:, 0], ranges[:, 1], (len(env_ids), 6), device=env.device) | ||
|
|
||
| stage = omni.usd.get_context().get_stage() |
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.
can we get stage use env?
|
|
||
| state = self._env.scene.get_state(is_relative=True) | ||
| state["cuttable_object"] = {} | ||
| for attr_name in dir(self._env): |
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.
refer to the impl of partcle_objects, use self._env.scene.cuttable_objects to manage cuttable objects. not str match.
| @@ -1,19 +1,19 @@ | |||
| import gymnasium as gym | |||
|
|
|||
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.
can we complet this task use single arm?
| task_description: str = "Pick the beef patties and place it on the plate" | ||
|
|
||
| # Simulation configuration | ||
| render_cfg: sim_utils.RenderCfg = sim_utils.RenderCfg(rendering_mode="quality", antialiasing_mode="FXAA") |
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.
quality control is in the teleoperation scripts --quality, not in task.
|
|
||
| # Simulation configuration | ||
| render_cfg: sim_utils.RenderCfg = sim_utils.RenderCfg(rendering_mode="quality", antialiasing_mode="FXAA") | ||
| sim: SimulationCfg = SimulationCfg(dt=1 / 60, render_interval=1, render=render_cfg, use_fabric=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.
modify sim attribute in post__init()
| self.dynamic_reset_gripper_effort_limit = False | ||
|
|
||
| # Add lighting | ||
| self.scene.light = AssetBaseCfg( |
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.
why add more light?
| self.scene.right_arm.init_state.rot = (0.707, 0.0, 0.0, 0.707) | ||
|
|
||
| self.decimation = 1 | ||
| self.dynamic_reset_gripper_effort_limit = 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.
open for discussion.
| # Sample common noise (velocity) | ||
| range_list_vel = [velocity_range.get(key, (0.0, 0.0)) for key in ["x", "y", "z", "roll", "pitch", "yaw"]] | ||
| ranges_vel = torch.tensor(range_list_vel, device=env.device) | ||
| rand_samples_vel = math_utils.sample_uniform( |
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.
why we need vel here?
| # Render configuration - match manager-based env for proper material colors | ||
| render_cfg: sim_utils.RenderCfg = sim_utils.RenderCfg(rendering_mode="quality", antialiasing_mode="FXAA") | ||
| sim: SimulationCfg = SimulationCfg(dt=1 / 60, render_interval=1, render=render_cfg, use_fabric=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 as above.
| # Add lighting | ||
| self.scene.light = AssetBaseCfg( | ||
| prim_path="{ENV_REGEX_NS}/Light", | ||
| spawn=sim_utils.DomeLightCfg(intensity=1000.0, color=(0.75, 0.75, 0.75)), | ||
| ) |
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 above
| @@ -0,0 +1 @@ | |||
| from .sausage_cut_bi_arm_env import SausageCutBiArmEnv, SausageCutBiArmEnvCfg | |||
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.
rename this task to cut_sausage to align to other tasks.
| # Render configuration with antialiasing enabled | ||
| render_cfg: sim_utils.RenderCfg = sim_utils.RenderCfg(rendering_mode="quality", antialiasing_mode="FXAA") | ||
| sim: SimulationCfg = SimulationCfg(dt=1 / 60, render_interval=1, render=render_cfg, use_fabric=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.
same as above
| sim: SimulationCfg = SimulationCfg(dt=1 / 60, render_interval=1, render=render_cfg, use_fabric=False) | ||
|
|
||
| # Disable IsaacLab UI window | ||
| ui_window_class_type: type | None = None |
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.
why here.
| self.scene.light = AssetBaseCfg( | ||
| prim_path="{ENV_REGEX_NS}/Light", | ||
| spawn=sim_utils.DomeLightCfg(intensity=1000.0, color=(0.75, 0.75, 0.75)), | ||
| ) |
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 same as above.
| cfg: SausageCutBiArmEnvCfg | ||
|
|
||
| def _setup_scene(self): | ||
| super()._setup_scene() |
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.
refer to FoldClothBiArmEnv to manager cuttable_objects.
| self.cuttable_sausage.step() | ||
|
|
||
| def _check_success(self) -> torch.Tensor: | ||
| return self.cuttable_sausage.check_success(min_count=2) |
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.
use mdp to wrap it.
| @@ -0,0 +1,147 @@ | |||
| import numpy as np | |||
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.
can move to cutable_object to manage
| @@ -0,0 +1,391 @@ | |||
| import os | |||
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.
need to refactor
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.
for me
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.
what this file for.
| ), | ||
| ) | ||
| setattr(env_cfg.scene, name, rigidcfg) | ||
|
|
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.
TODO: refactor code to remove duplicate here.
| matching_prims = sim_utils.find_matching_prim_paths(self.cfg.prim_path) | ||
| for prim_path in matching_prims: | ||
| self.cuttable_objects.append( | ||
| SingleCuttableObject( |
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.
self.cfg.class_type
| @@ -0,0 +1,163 @@ | |||
| """Cuttable object asset for mesh cutting simulation.""" | |||
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.
can we use activate and deactivate to implement cutting object?
| """Subfix path to the mesh prim.""" | ||
| trigger_subfix: str = "Trigger/Cube" | ||
| """Subfix path to the trigger collision mesh.""" | ||
| knife_prim_path: str = "" |
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.
don't use name of knife
No description provided.