Skip to content

Commit

Permalink
Fixed some bugs
Browse files Browse the repository at this point in the history
1. CURIQbSoftHandSynergyGrasp action space 6->7
2. gdown to the newest version
  • Loading branch information
Skylark0924 committed Jul 3, 2024
1 parent 8c5ac04 commit c18848b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ If you use rofunc in a scientific publication, we would appreciate citations to
```
@software{liu2023rofunc,
title = {Rofunc: The Full Process Python Package for Robot Learning from Demonstration and Robot Manipulation},
author = {Liu, Junjia and Li, Chenzui and Delehelle, Donatien and Li, Zhihao and Yu, Minghao and Chen, Fei},
year = {2023},     
author = {Liu, Junjia and Dong, Zhipeng and Li, Chenzui and Li, Zhihao and Yu, Minghao and Delehelle, Donatien and Chen, Fei},
year = {2023},
publisher = {Zenodo},
doi = {10.5281/zenodo.10016946},
url = {https://doi.org/10.5281/zenodo.10016946},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def inference(custom_args):
"train={}{}RofuncRL".format(custom_args.task, custom_args.agent.upper()),
"device_id={}".format(custom_args.sim_device),
"rl_device=cuda:{}".format(custom_args.rl_device),
"headless={}".format(False),
"headless={}".format(True),
"num_envs={}".format(1)]
cfg = get_config('./learning/rl', 'config', args=args_overrides)
if custom_args.task == "CURIQbSoftHandSynergyGrasp":
Expand Down Expand Up @@ -117,15 +117,15 @@ def inference(custom_args):
parser.add_argument("--task", type=str, default="CURIQbSoftHandSynergyGrasp")
# Available objects: Hammer, Spatula, Large_Clamp, Mug, Power_Drill, Knife, Scissors, Large_Marker, Phillips_Screw_Driver
# Only for CURIQbSoftHandSynergyGrasp
parser.add_argument("--object", type=str, default="Hammer")
parser.add_argument("--object", type=str, default="Mug")
# Only for CURIQbSoftHandSynergyGrasp
parser.add_argument("--use_synergy", type=str, default="True")
parser.add_argument("--agent", type=str, default="ppo") # Available agents: ppo, sac, td3, a2c
parser.add_argument("--num_envs", type=int, default=1024)
parser.add_argument("--sim_device", type=int, default=0)
parser.add_argument("--rl_device", type=int, default=gpu_id)
parser.add_argument("--headless", type=str, default="True")
parser.add_argument("--inference", action="store_true", help="turn to inference mode while adding this argument")
parser.add_argument("--inference", action="store_false", help="turn to inference mode while adding this argument")
parser.add_argument("--ckpt_path", type=str, default=None)
custom_args = parser.parse_args()

Expand Down
4 changes: 2 additions & 2 deletions examples/simulator/example_curi_track_traj.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

traj_l = np.load('../data/LQT_LQR/taichi_1l.npy')
traj_r = np.load('../data/LQT_LQR/taichi_1r.npy')
traj_l[:, 0] += 0.2
traj_r[:, 0] += 0.2
traj_l[:, 0] += 0.8
traj_r[:, 0] += 0.8
traj_l[:, 1] = -traj_l[:, 1]
traj_r[:, 1] = -traj_r[:, 1]
traj_l[:, 3:] = [1, 0, 0, 0]
Expand Down
7 changes: 4 additions & 3 deletions rofunc/config/simulator/CURI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ env:
asset:
robot_name: "CURI"
assetRoot:
# assetFile: "urdf/curi/urdf/curi_isaacgym_dual_arm.urdf"
assetFile: "urdf/curi/urdf/curi_isaacgym_dual_arm.urdf"
# assetFile: "urdf/curi/urdf/curi_isaacgym_dual_arm_w_softhand.urdf"
assetFile: "urdf/curi/urdf/curi_w_softhand_isaacgym.urdf"
init_pose: [1.3, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0]
# assetFile: "urdf/curi/urdf/curi_w_softhand_isaacgym.urdf"
# init_pose: [1.3, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0]
init_pose: [1.3, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0]
fix_base_link: True
disable_gravity: False
flip_visual_attachments: True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ def __init__(self, cfg, rl_device, sim_device, graphics_device_id, headless, vir

self.num_agents = 1
if self.cfg["env"]["useSynergy"]:
self.cfg["env"]["numActions"] = 2 + 6 # 2-dim synergy for controlling each hand
self.cfg["env"]["numActions"] = 2 + 7 # 2-dim synergy for controlling each hand
else:
self.cfg["env"]["numActions"] = 15 + 6 # 15-dim dof for controlling each hand
self.cfg["env"]["numActions"] = 15 + 7 # 15-dim dof for controlling each hand
self.num_action = self.cfg["env"]["numActions"]

super().__init__(cfg, rl_device, sim_device, graphics_device_id, headless, virtual_screen_capture, force_render)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
'hydra-core==1.3.2',
'opencv-python==4.7.0.72',
'neurokit2==0.2.4',
'gdown==4.6.3',
'gdown==5.2.0',
'pytz==2023.3',
'shutup==0.2.0',
'numpy<=1.23.0',
Expand Down

0 comments on commit c18848b

Please sign in to comment.