Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- third_party/diffusion_policy/diffusion_policy/dataset/kitchen_lowdim_dataset.py +91 -0
- third_party/diffusion_policy/diffusion_policy/dataset/kitchen_mjl_lowdim_dataset.py +112 -0
- third_party/diffusion_policy/diffusion_policy/dataset/pusht_dataset.py +97 -0
- third_party/diffusion_policy/diffusion_policy/dataset/pusht_image_dataset.py +102 -0
- third_party/diffusion_policy/diffusion_policy/dataset/real_pusht_image_dataset.py +291 -0
- third_party/diffusion_policy/diffusion_policy/dataset/robomimic_replay_image_dataset.py +373 -0
- third_party/diffusion_policy/diffusion_policy/dataset/robomimic_replay_lowdim_dataset.py +168 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/block.urdf +31 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/block2.urdf +31 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/blue_cube.urdf +30 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/cube.obj +446 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/green_star.urdf +30 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/moon.obj +446 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/pentagon.obj +419 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/red_moon.urdf +30 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/star.obj +689 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/yellow_pentagon.urdf +30 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/insert.urdf +66 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/plane.obj +18 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/base.obj +396 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/cylinder.urdf +98 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/cylinder_real.urdf +98 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/head.obj +396 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/mid.obj +2134 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/suction-base.urdf +69 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/suction-head-long.urdf +101 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/suction-head.urdf +70 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/tip.obj +0 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/workspace.urdf +30 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/workspace_real.urdf +29 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/zone.obj +64 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/zone.urdf +23 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/zone2.urdf +23 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/block_pushing.py +1092 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/block_pushing_discontinuous.py +338 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/block_pushing_multimodal.py +802 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/oracles/discontinuous_push_oracle.py +70 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/oracles/multimodal_push_oracle.py +187 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/oracles/oriented_push_oracle.py +258 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/oracles/pushing_info.py +35 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/oracles/reach_oracle.py +61 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/utils/pose3d.py +70 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/utils/utils_pybullet.py +451 -0
- third_party/diffusion_policy/diffusion_policy/env/block_pushing/utils/xarm_sim_robot.py +230 -0
- third_party/diffusion_policy/diffusion_policy/env/kitchen/relay_policy_learning/adept_envs/.pylintrc +433 -0
- third_party/diffusion_policy/diffusion_policy/env/kitchen/relay_policy_learning/adept_envs/.style.yapf +323 -0
- third_party/diffusion_policy/diffusion_policy/env/kitchen/relay_policy_learning/adept_envs/adept_envs/__init__.py +19 -0
- third_party/diffusion_policy/diffusion_policy/env/kitchen/relay_policy_learning/adept_envs/adept_envs/base_robot.py +151 -0
- third_party/diffusion_policy/diffusion_policy/env/kitchen/relay_policy_learning/adept_envs/adept_envs/franka/__init__.py +24 -0
- third_party/diffusion_policy/diffusion_policy/env/kitchen/relay_policy_learning/adept_envs/adept_envs/franka/assets/franka_kitchen_jntpos_act_ab.xml +94 -0
third_party/diffusion_policy/diffusion_policy/dataset/kitchen_lowdim_dataset.py
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict
|
| 2 |
+
import torch
|
| 3 |
+
import numpy as np
|
| 4 |
+
import copy
|
| 5 |
+
import pathlib
|
| 6 |
+
from diffusion_policy.common.pytorch_util import dict_apply
|
| 7 |
+
from diffusion_policy.common.replay_buffer import ReplayBuffer
|
| 8 |
+
from diffusion_policy.common.sampler import SequenceSampler, get_val_mask
|
| 9 |
+
from diffusion_policy.model.common.normalizer import LinearNormalizer, SingleFieldLinearNormalizer
|
| 10 |
+
from diffusion_policy.dataset.base_dataset import BaseLowdimDataset
|
| 11 |
+
|
| 12 |
+
class KitchenLowdimDataset(BaseLowdimDataset):
|
| 13 |
+
def __init__(self,
|
| 14 |
+
dataset_dir,
|
| 15 |
+
horizon=1,
|
| 16 |
+
pad_before=0,
|
| 17 |
+
pad_after=0,
|
| 18 |
+
seed=42,
|
| 19 |
+
val_ratio=0.0
|
| 20 |
+
):
|
| 21 |
+
super().__init__()
|
| 22 |
+
|
| 23 |
+
data_directory = pathlib.Path(dataset_dir)
|
| 24 |
+
observations = np.load(data_directory / "observations_seq.npy")
|
| 25 |
+
actions = np.load(data_directory / "actions_seq.npy")
|
| 26 |
+
masks = np.load(data_directory / "existence_mask.npy")
|
| 27 |
+
|
| 28 |
+
self.replay_buffer = ReplayBuffer.create_empty_numpy()
|
| 29 |
+
for i in range(len(masks)):
|
| 30 |
+
eps_len = int(masks[i].sum())
|
| 31 |
+
obs = observations[i,:eps_len].astype(np.float32)
|
| 32 |
+
action = actions[i,:eps_len].astype(np.float32)
|
| 33 |
+
data = {
|
| 34 |
+
'obs': obs,
|
| 35 |
+
'action': action
|
| 36 |
+
}
|
| 37 |
+
self.replay_buffer.add_episode(data)
|
| 38 |
+
|
| 39 |
+
val_mask = get_val_mask(
|
| 40 |
+
n_episodes=self.replay_buffer.n_episodes,
|
| 41 |
+
val_ratio=val_ratio,
|
| 42 |
+
seed=seed)
|
| 43 |
+
train_mask = ~val_mask
|
| 44 |
+
self.sampler = SequenceSampler(
|
| 45 |
+
replay_buffer=self.replay_buffer,
|
| 46 |
+
sequence_length=horizon,
|
| 47 |
+
pad_before=pad_before,
|
| 48 |
+
pad_after=pad_after,
|
| 49 |
+
episode_mask=train_mask)
|
| 50 |
+
|
| 51 |
+
self.train_mask = train_mask
|
| 52 |
+
self.horizon = horizon
|
| 53 |
+
self.pad_before = pad_before
|
| 54 |
+
self.pad_after = pad_after
|
| 55 |
+
|
| 56 |
+
def get_validation_dataset(self):
|
| 57 |
+
val_set = copy.copy(self)
|
| 58 |
+
val_set.sampler = SequenceSampler(
|
| 59 |
+
replay_buffer=self.replay_buffer,
|
| 60 |
+
sequence_length=self.horizon,
|
| 61 |
+
pad_before=self.pad_before,
|
| 62 |
+
pad_after=self.pad_after,
|
| 63 |
+
episode_mask=~self.train_mask
|
| 64 |
+
)
|
| 65 |
+
val_set.train_mask = ~self.train_mask
|
| 66 |
+
return val_set
|
| 67 |
+
|
| 68 |
+
def get_normalizer(self, mode='limits', **kwargs):
|
| 69 |
+
data = {
|
| 70 |
+
'obs': self.replay_buffer['obs'],
|
| 71 |
+
'action': self.replay_buffer['action']
|
| 72 |
+
}
|
| 73 |
+
if 'range_eps' not in kwargs:
|
| 74 |
+
# to prevent blowing up dims that barely change
|
| 75 |
+
kwargs['range_eps'] = 5e-2
|
| 76 |
+
normalizer = LinearNormalizer()
|
| 77 |
+
normalizer.fit(data=data, last_n_dims=1, mode=mode, **kwargs)
|
| 78 |
+
return normalizer
|
| 79 |
+
|
| 80 |
+
def get_all_actions(self) -> torch.Tensor:
|
| 81 |
+
return torch.from_numpy(self.replay_buffer['action'])
|
| 82 |
+
|
| 83 |
+
def __len__(self) -> int:
|
| 84 |
+
return len(self.sampler)
|
| 85 |
+
|
| 86 |
+
def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]:
|
| 87 |
+
sample = self.sampler.sample_sequence(idx)
|
| 88 |
+
data = sample
|
| 89 |
+
|
| 90 |
+
torch_data = dict_apply(data, torch.from_numpy)
|
| 91 |
+
return torch_data
|
third_party/diffusion_policy/diffusion_policy/dataset/kitchen_mjl_lowdim_dataset.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict
|
| 2 |
+
import torch
|
| 3 |
+
import numpy as np
|
| 4 |
+
import copy
|
| 5 |
+
import pathlib
|
| 6 |
+
from tqdm import tqdm
|
| 7 |
+
from diffusion_policy.common.pytorch_util import dict_apply
|
| 8 |
+
from diffusion_policy.common.replay_buffer import ReplayBuffer
|
| 9 |
+
from diffusion_policy.common.sampler import SequenceSampler, get_val_mask
|
| 10 |
+
from diffusion_policy.model.common.normalizer import LinearNormalizer, SingleFieldLinearNormalizer
|
| 11 |
+
from diffusion_policy.dataset.base_dataset import BaseLowdimDataset
|
| 12 |
+
from diffusion_policy.env.kitchen.kitchen_util import parse_mjl_logs
|
| 13 |
+
|
| 14 |
+
class KitchenMjlLowdimDataset(BaseLowdimDataset):
|
| 15 |
+
def __init__(self,
|
| 16 |
+
dataset_dir,
|
| 17 |
+
horizon=1,
|
| 18 |
+
pad_before=0,
|
| 19 |
+
pad_after=0,
|
| 20 |
+
abs_action=True,
|
| 21 |
+
robot_noise_ratio=0.0,
|
| 22 |
+
seed=42,
|
| 23 |
+
val_ratio=0.0
|
| 24 |
+
):
|
| 25 |
+
super().__init__()
|
| 26 |
+
|
| 27 |
+
if not abs_action:
|
| 28 |
+
raise NotImplementedError()
|
| 29 |
+
|
| 30 |
+
robot_pos_noise_amp = np.array([0.1 , 0.1 , 0.1 , 0.1 , 0.1 , 0.1 , 0.1 , 0.1 ,
|
| 31 |
+
0.1 , 0.005 , 0.005 , 0.0005, 0.0005, 0.0005, 0.0005, 0.0005,
|
| 32 |
+
0.0005, 0.005 , 0.005 , 0.005 , 0.1 , 0.1 , 0.1 , 0.005 ,
|
| 33 |
+
0.005 , 0.005 , 0.1 , 0.1 , 0.1 , 0.005 ], dtype=np.float32)
|
| 34 |
+
rng = np.random.default_rng(seed=seed)
|
| 35 |
+
|
| 36 |
+
data_directory = pathlib.Path(dataset_dir)
|
| 37 |
+
self.replay_buffer = ReplayBuffer.create_empty_numpy()
|
| 38 |
+
for i, mjl_path in enumerate(tqdm(list(data_directory.glob('*/*.mjl')))):
|
| 39 |
+
try:
|
| 40 |
+
data = parse_mjl_logs(str(mjl_path.absolute()), skipamount=40)
|
| 41 |
+
qpos = data['qpos'].astype(np.float32)
|
| 42 |
+
obs = np.concatenate([
|
| 43 |
+
qpos[:,:9],
|
| 44 |
+
qpos[:,-21:],
|
| 45 |
+
np.zeros((len(qpos),30),dtype=np.float32)
|
| 46 |
+
], axis=-1)
|
| 47 |
+
if robot_noise_ratio > 0:
|
| 48 |
+
# add observation noise to match real robot
|
| 49 |
+
noise = robot_noise_ratio * robot_pos_noise_amp * rng.uniform(
|
| 50 |
+
low=-1., high=1., size=(obs.shape[0], 30))
|
| 51 |
+
obs[:,:30] += noise
|
| 52 |
+
episode = {
|
| 53 |
+
'obs': obs,
|
| 54 |
+
'action': data['ctrl'].astype(np.float32)
|
| 55 |
+
}
|
| 56 |
+
self.replay_buffer.add_episode(episode)
|
| 57 |
+
except Exception as e:
|
| 58 |
+
print(i, e)
|
| 59 |
+
|
| 60 |
+
val_mask = get_val_mask(
|
| 61 |
+
n_episodes=self.replay_buffer.n_episodes,
|
| 62 |
+
val_ratio=val_ratio,
|
| 63 |
+
seed=seed)
|
| 64 |
+
train_mask = ~val_mask
|
| 65 |
+
self.sampler = SequenceSampler(
|
| 66 |
+
replay_buffer=self.replay_buffer,
|
| 67 |
+
sequence_length=horizon,
|
| 68 |
+
pad_before=pad_before,
|
| 69 |
+
pad_after=pad_after,
|
| 70 |
+
episode_mask=train_mask)
|
| 71 |
+
|
| 72 |
+
self.train_mask = train_mask
|
| 73 |
+
self.horizon = horizon
|
| 74 |
+
self.pad_before = pad_before
|
| 75 |
+
self.pad_after = pad_after
|
| 76 |
+
|
| 77 |
+
def get_validation_dataset(self):
|
| 78 |
+
val_set = copy.copy(self)
|
| 79 |
+
val_set.sampler = SequenceSampler(
|
| 80 |
+
replay_buffer=self.replay_buffer,
|
| 81 |
+
sequence_length=self.horizon,
|
| 82 |
+
pad_before=self.pad_before,
|
| 83 |
+
pad_after=self.pad_after,
|
| 84 |
+
episode_mask=~self.train_mask
|
| 85 |
+
)
|
| 86 |
+
val_set.train_mask = ~self.train_mask
|
| 87 |
+
return val_set
|
| 88 |
+
|
| 89 |
+
def get_normalizer(self, mode='limits', **kwargs):
|
| 90 |
+
data = {
|
| 91 |
+
'obs': self.replay_buffer['obs'],
|
| 92 |
+
'action': self.replay_buffer['action']
|
| 93 |
+
}
|
| 94 |
+
if 'range_eps' not in kwargs:
|
| 95 |
+
# to prevent blowing up dims that barely change
|
| 96 |
+
kwargs['range_eps'] = 5e-2
|
| 97 |
+
normalizer = LinearNormalizer()
|
| 98 |
+
normalizer.fit(data=data, last_n_dims=1, mode=mode, **kwargs)
|
| 99 |
+
return normalizer
|
| 100 |
+
|
| 101 |
+
def get_all_actions(self) -> torch.Tensor:
|
| 102 |
+
return torch.from_numpy(self.replay_buffer['action'])
|
| 103 |
+
|
| 104 |
+
def __len__(self) -> int:
|
| 105 |
+
return len(self.sampler)
|
| 106 |
+
|
| 107 |
+
def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]:
|
| 108 |
+
sample = self.sampler.sample_sequence(idx)
|
| 109 |
+
data = sample
|
| 110 |
+
|
| 111 |
+
torch_data = dict_apply(data, torch.from_numpy)
|
| 112 |
+
return torch_data
|
third_party/diffusion_policy/diffusion_policy/dataset/pusht_dataset.py
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict
|
| 2 |
+
import torch
|
| 3 |
+
import numpy as np
|
| 4 |
+
import copy
|
| 5 |
+
from diffusion_policy.common.pytorch_util import dict_apply
|
| 6 |
+
from diffusion_policy.common.replay_buffer import ReplayBuffer
|
| 7 |
+
from diffusion_policy.common.sampler import (
|
| 8 |
+
SequenceSampler, get_val_mask, downsample_mask)
|
| 9 |
+
from diffusion_policy.model.common.normalizer import LinearNormalizer
|
| 10 |
+
from diffusion_policy.dataset.base_dataset import BaseLowdimDataset
|
| 11 |
+
|
| 12 |
+
class PushTLowdimDataset(BaseLowdimDataset):
|
| 13 |
+
def __init__(self,
|
| 14 |
+
zarr_path,
|
| 15 |
+
horizon=1,
|
| 16 |
+
pad_before=0,
|
| 17 |
+
pad_after=0,
|
| 18 |
+
obs_key='keypoint',
|
| 19 |
+
state_key='state',
|
| 20 |
+
action_key='action',
|
| 21 |
+
seed=42,
|
| 22 |
+
val_ratio=0.0,
|
| 23 |
+
max_train_episodes=None
|
| 24 |
+
):
|
| 25 |
+
super().__init__()
|
| 26 |
+
self.replay_buffer = ReplayBuffer.copy_from_path(
|
| 27 |
+
zarr_path, keys=[obs_key, state_key, action_key])
|
| 28 |
+
|
| 29 |
+
val_mask = get_val_mask(
|
| 30 |
+
n_episodes=self.replay_buffer.n_episodes,
|
| 31 |
+
val_ratio=val_ratio,
|
| 32 |
+
seed=seed)
|
| 33 |
+
train_mask = ~val_mask
|
| 34 |
+
train_mask = downsample_mask(
|
| 35 |
+
mask=train_mask,
|
| 36 |
+
max_n=max_train_episodes,
|
| 37 |
+
seed=seed)
|
| 38 |
+
|
| 39 |
+
self.sampler = SequenceSampler(
|
| 40 |
+
replay_buffer=self.replay_buffer,
|
| 41 |
+
sequence_length=horizon,
|
| 42 |
+
pad_before=pad_before,
|
| 43 |
+
pad_after=pad_after,
|
| 44 |
+
episode_mask=train_mask
|
| 45 |
+
)
|
| 46 |
+
self.obs_key = obs_key
|
| 47 |
+
self.state_key = state_key
|
| 48 |
+
self.action_key = action_key
|
| 49 |
+
self.train_mask = train_mask
|
| 50 |
+
self.horizon = horizon
|
| 51 |
+
self.pad_before = pad_before
|
| 52 |
+
self.pad_after = pad_after
|
| 53 |
+
|
| 54 |
+
def get_validation_dataset(self):
|
| 55 |
+
val_set = copy.copy(self)
|
| 56 |
+
val_set.sampler = SequenceSampler(
|
| 57 |
+
replay_buffer=self.replay_buffer,
|
| 58 |
+
sequence_length=self.horizon,
|
| 59 |
+
pad_before=self.pad_before,
|
| 60 |
+
pad_after=self.pad_after,
|
| 61 |
+
episode_mask=~self.train_mask
|
| 62 |
+
)
|
| 63 |
+
val_set.train_mask = ~self.train_mask
|
| 64 |
+
return val_set
|
| 65 |
+
|
| 66 |
+
def get_normalizer(self, mode='limits', **kwargs):
|
| 67 |
+
data = self._sample_to_data(self.replay_buffer)
|
| 68 |
+
normalizer = LinearNormalizer()
|
| 69 |
+
normalizer.fit(data=data, last_n_dims=1, mode=mode, **kwargs)
|
| 70 |
+
return normalizer
|
| 71 |
+
|
| 72 |
+
def get_all_actions(self) -> torch.Tensor:
|
| 73 |
+
return torch.from_numpy(self.replay_buffer[self.action_key])
|
| 74 |
+
|
| 75 |
+
def __len__(self) -> int:
|
| 76 |
+
return len(self.sampler)
|
| 77 |
+
|
| 78 |
+
def _sample_to_data(self, sample):
|
| 79 |
+
keypoint = sample[self.obs_key]
|
| 80 |
+
state = sample[self.state_key]
|
| 81 |
+
agent_pos = state[:,:2]
|
| 82 |
+
obs = np.concatenate([
|
| 83 |
+
keypoint.reshape(keypoint.shape[0], -1),
|
| 84 |
+
agent_pos], axis=-1)
|
| 85 |
+
|
| 86 |
+
data = {
|
| 87 |
+
'obs': obs, # T, D_o
|
| 88 |
+
'action': sample[self.action_key], # T, D_a
|
| 89 |
+
}
|
| 90 |
+
return data
|
| 91 |
+
|
| 92 |
+
def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]:
|
| 93 |
+
sample = self.sampler.sample_sequence(idx)
|
| 94 |
+
data = self._sample_to_data(sample)
|
| 95 |
+
|
| 96 |
+
torch_data = dict_apply(data, torch.from_numpy)
|
| 97 |
+
return torch_data
|
third_party/diffusion_policy/diffusion_policy/dataset/pusht_image_dataset.py
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict
|
| 2 |
+
import torch
|
| 3 |
+
import numpy as np
|
| 4 |
+
import copy
|
| 5 |
+
from diffusion_policy.common.pytorch_util import dict_apply
|
| 6 |
+
from diffusion_policy.common.replay_buffer import ReplayBuffer
|
| 7 |
+
from diffusion_policy.common.sampler import (
|
| 8 |
+
SequenceSampler, get_val_mask, downsample_mask)
|
| 9 |
+
from diffusion_policy.model.common.normalizer import LinearNormalizer
|
| 10 |
+
from diffusion_policy.dataset.base_dataset import BaseImageDataset
|
| 11 |
+
from diffusion_policy.common.normalize_util import get_image_range_normalizer
|
| 12 |
+
|
| 13 |
+
class PushTImageDataset(BaseImageDataset):
|
| 14 |
+
def __init__(self,
|
| 15 |
+
zarr_path,
|
| 16 |
+
horizon=1,
|
| 17 |
+
pad_before=0,
|
| 18 |
+
pad_after=0,
|
| 19 |
+
seed=42,
|
| 20 |
+
val_ratio=0.0,
|
| 21 |
+
max_train_episodes=None
|
| 22 |
+
):
|
| 23 |
+
|
| 24 |
+
super().__init__()
|
| 25 |
+
self.replay_buffer = ReplayBuffer.copy_from_path(
|
| 26 |
+
zarr_path, keys=['img', 'state', 'action'])
|
| 27 |
+
val_mask = get_val_mask(
|
| 28 |
+
n_episodes=self.replay_buffer.n_episodes,
|
| 29 |
+
val_ratio=val_ratio,
|
| 30 |
+
seed=seed)
|
| 31 |
+
train_mask = ~val_mask
|
| 32 |
+
train_mask = downsample_mask(
|
| 33 |
+
mask=train_mask,
|
| 34 |
+
max_n=max_train_episodes,
|
| 35 |
+
seed=seed)
|
| 36 |
+
|
| 37 |
+
self.sampler = SequenceSampler(
|
| 38 |
+
replay_buffer=self.replay_buffer,
|
| 39 |
+
sequence_length=horizon,
|
| 40 |
+
pad_before=pad_before,
|
| 41 |
+
pad_after=pad_after,
|
| 42 |
+
episode_mask=train_mask)
|
| 43 |
+
self.train_mask = train_mask
|
| 44 |
+
self.horizon = horizon
|
| 45 |
+
self.pad_before = pad_before
|
| 46 |
+
self.pad_after = pad_after
|
| 47 |
+
|
| 48 |
+
def get_validation_dataset(self):
|
| 49 |
+
val_set = copy.copy(self)
|
| 50 |
+
val_set.sampler = SequenceSampler(
|
| 51 |
+
replay_buffer=self.replay_buffer,
|
| 52 |
+
sequence_length=self.horizon,
|
| 53 |
+
pad_before=self.pad_before,
|
| 54 |
+
pad_after=self.pad_after,
|
| 55 |
+
episode_mask=~self.train_mask
|
| 56 |
+
)
|
| 57 |
+
val_set.train_mask = ~self.train_mask
|
| 58 |
+
return val_set
|
| 59 |
+
|
| 60 |
+
def get_normalizer(self, mode='limits', **kwargs):
|
| 61 |
+
data = {
|
| 62 |
+
'action': self.replay_buffer['action'],
|
| 63 |
+
'agent_pos': self.replay_buffer['state'][...,:2]
|
| 64 |
+
}
|
| 65 |
+
normalizer = LinearNormalizer()
|
| 66 |
+
normalizer.fit(data=data, last_n_dims=1, mode=mode, **kwargs)
|
| 67 |
+
normalizer['image'] = get_image_range_normalizer()
|
| 68 |
+
return normalizer
|
| 69 |
+
|
| 70 |
+
def __len__(self) -> int:
|
| 71 |
+
return len(self.sampler)
|
| 72 |
+
|
| 73 |
+
def _sample_to_data(self, sample):
|
| 74 |
+
agent_pos = sample['state'][:,:2].astype(np.float32) # (agent_posx2, block_posex3)
|
| 75 |
+
image = np.moveaxis(sample['img'],-1,1)/255
|
| 76 |
+
|
| 77 |
+
data = {
|
| 78 |
+
'obs': {
|
| 79 |
+
'image': image, # T, 3, 96, 96
|
| 80 |
+
'agent_pos': agent_pos, # T, 2
|
| 81 |
+
},
|
| 82 |
+
'action': sample['action'].astype(np.float32) # T, 2
|
| 83 |
+
}
|
| 84 |
+
return data
|
| 85 |
+
|
| 86 |
+
def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]:
|
| 87 |
+
sample = self.sampler.sample_sequence(idx)
|
| 88 |
+
data = self._sample_to_data(sample)
|
| 89 |
+
torch_data = dict_apply(data, torch.from_numpy)
|
| 90 |
+
return torch_data
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
def test():
|
| 94 |
+
import os
|
| 95 |
+
zarr_path = os.path.expanduser('~/dev/diffusion_policy/data/pusht/pusht_cchi_v7_replay.zarr')
|
| 96 |
+
dataset = PushTImageDataset(zarr_path, horizon=16)
|
| 97 |
+
|
| 98 |
+
# from matplotlib import pyplot as plt
|
| 99 |
+
# normalizer = dataset.get_normalizer()
|
| 100 |
+
# nactions = normalizer['action'].normalize(dataset.replay_buffer['action'])
|
| 101 |
+
# diff = np.diff(nactions, axis=0)
|
| 102 |
+
# dists = np.linalg.norm(np.diff(nactions, axis=0), axis=-1)
|
third_party/diffusion_policy/diffusion_policy/dataset/real_pusht_image_dataset.py
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict, List
|
| 2 |
+
import torch
|
| 3 |
+
import numpy as np
|
| 4 |
+
import zarr
|
| 5 |
+
import os
|
| 6 |
+
import shutil
|
| 7 |
+
from filelock import FileLock
|
| 8 |
+
from threadpoolctl import threadpool_limits
|
| 9 |
+
from omegaconf import OmegaConf
|
| 10 |
+
import cv2
|
| 11 |
+
import json
|
| 12 |
+
import hashlib
|
| 13 |
+
import copy
|
| 14 |
+
from diffusion_policy.common.pytorch_util import dict_apply
|
| 15 |
+
from diffusion_policy.dataset.base_dataset import BaseImageDataset
|
| 16 |
+
from diffusion_policy.model.common.normalizer import LinearNormalizer, SingleFieldLinearNormalizer
|
| 17 |
+
from diffusion_policy.common.replay_buffer import ReplayBuffer
|
| 18 |
+
from diffusion_policy.common.sampler import (
|
| 19 |
+
SequenceSampler, get_val_mask, downsample_mask)
|
| 20 |
+
from diffusion_policy.real_world.real_data_conversion import real_data_to_replay_buffer
|
| 21 |
+
from diffusion_policy.common.normalize_util import (
|
| 22 |
+
get_range_normalizer_from_stat,
|
| 23 |
+
get_image_range_normalizer,
|
| 24 |
+
get_identity_normalizer_from_stat,
|
| 25 |
+
array_to_stats
|
| 26 |
+
)
|
| 27 |
+
|
| 28 |
+
class RealPushTImageDataset(BaseImageDataset):
|
| 29 |
+
def __init__(self,
|
| 30 |
+
shape_meta: dict,
|
| 31 |
+
dataset_path: str,
|
| 32 |
+
horizon=1,
|
| 33 |
+
pad_before=0,
|
| 34 |
+
pad_after=0,
|
| 35 |
+
n_obs_steps=None,
|
| 36 |
+
n_latency_steps=0,
|
| 37 |
+
use_cache=False,
|
| 38 |
+
seed=42,
|
| 39 |
+
val_ratio=0.0,
|
| 40 |
+
max_train_episodes=None,
|
| 41 |
+
delta_action=False,
|
| 42 |
+
):
|
| 43 |
+
assert os.path.isdir(dataset_path)
|
| 44 |
+
|
| 45 |
+
replay_buffer = None
|
| 46 |
+
if use_cache:
|
| 47 |
+
# fingerprint shape_meta
|
| 48 |
+
shape_meta_json = json.dumps(OmegaConf.to_container(shape_meta), sort_keys=True)
|
| 49 |
+
shape_meta_hash = hashlib.md5(shape_meta_json.encode('utf-8')).hexdigest()
|
| 50 |
+
cache_zarr_path = os.path.join(dataset_path, shape_meta_hash + '.zarr.zip')
|
| 51 |
+
cache_lock_path = cache_zarr_path + '.lock'
|
| 52 |
+
print('Acquiring lock on cache.')
|
| 53 |
+
with FileLock(cache_lock_path):
|
| 54 |
+
if not os.path.exists(cache_zarr_path):
|
| 55 |
+
# cache does not exists
|
| 56 |
+
try:
|
| 57 |
+
print('Cache does not exist. Creating!')
|
| 58 |
+
replay_buffer = _get_replay_buffer(
|
| 59 |
+
dataset_path=dataset_path,
|
| 60 |
+
shape_meta=shape_meta,
|
| 61 |
+
store=zarr.MemoryStore()
|
| 62 |
+
)
|
| 63 |
+
print('Saving cache to disk.')
|
| 64 |
+
with zarr.ZipStore(cache_zarr_path) as zip_store:
|
| 65 |
+
replay_buffer.save_to_store(
|
| 66 |
+
store=zip_store
|
| 67 |
+
)
|
| 68 |
+
except Exception as e:
|
| 69 |
+
shutil.rmtree(cache_zarr_path)
|
| 70 |
+
raise e
|
| 71 |
+
else:
|
| 72 |
+
print('Loading cached ReplayBuffer from Disk.')
|
| 73 |
+
with zarr.ZipStore(cache_zarr_path, mode='r') as zip_store:
|
| 74 |
+
replay_buffer = ReplayBuffer.copy_from_store(
|
| 75 |
+
src_store=zip_store, store=zarr.MemoryStore())
|
| 76 |
+
print('Loaded!')
|
| 77 |
+
else:
|
| 78 |
+
replay_buffer = _get_replay_buffer(
|
| 79 |
+
dataset_path=dataset_path,
|
| 80 |
+
shape_meta=shape_meta,
|
| 81 |
+
store=zarr.MemoryStore()
|
| 82 |
+
)
|
| 83 |
+
|
| 84 |
+
if delta_action:
|
| 85 |
+
# replace action as relative to previous frame
|
| 86 |
+
actions = replay_buffer['action'][:]
|
| 87 |
+
# support positions only at this time
|
| 88 |
+
assert actions.shape[1] <= 3
|
| 89 |
+
actions_diff = np.zeros_like(actions)
|
| 90 |
+
episode_ends = replay_buffer.episode_ends[:]
|
| 91 |
+
for i in range(len(episode_ends)):
|
| 92 |
+
start = 0
|
| 93 |
+
if i > 0:
|
| 94 |
+
start = episode_ends[i-1]
|
| 95 |
+
end = episode_ends[i]
|
| 96 |
+
# delta action is the difference between previous desired position and the current
|
| 97 |
+
# it should be scheduled at the previous timestep for the current timestep
|
| 98 |
+
# to ensure consistency with positional mode
|
| 99 |
+
actions_diff[start+1:end] = np.diff(actions[start:end], axis=0)
|
| 100 |
+
replay_buffer['action'][:] = actions_diff
|
| 101 |
+
|
| 102 |
+
rgb_keys = list()
|
| 103 |
+
lowdim_keys = list()
|
| 104 |
+
obs_shape_meta = shape_meta['obs']
|
| 105 |
+
for key, attr in obs_shape_meta.items():
|
| 106 |
+
type = attr.get('type', 'low_dim')
|
| 107 |
+
if type == 'rgb':
|
| 108 |
+
rgb_keys.append(key)
|
| 109 |
+
elif type == 'low_dim':
|
| 110 |
+
lowdim_keys.append(key)
|
| 111 |
+
|
| 112 |
+
key_first_k = dict()
|
| 113 |
+
if n_obs_steps is not None:
|
| 114 |
+
# only take first k obs from images
|
| 115 |
+
for key in rgb_keys + lowdim_keys:
|
| 116 |
+
key_first_k[key] = n_obs_steps
|
| 117 |
+
|
| 118 |
+
val_mask = get_val_mask(
|
| 119 |
+
n_episodes=replay_buffer.n_episodes,
|
| 120 |
+
val_ratio=val_ratio,
|
| 121 |
+
seed=seed)
|
| 122 |
+
train_mask = ~val_mask
|
| 123 |
+
train_mask = downsample_mask(
|
| 124 |
+
mask=train_mask,
|
| 125 |
+
max_n=max_train_episodes,
|
| 126 |
+
seed=seed)
|
| 127 |
+
|
| 128 |
+
sampler = SequenceSampler(
|
| 129 |
+
replay_buffer=replay_buffer,
|
| 130 |
+
sequence_length=horizon+n_latency_steps,
|
| 131 |
+
pad_before=pad_before,
|
| 132 |
+
pad_after=pad_after,
|
| 133 |
+
episode_mask=train_mask,
|
| 134 |
+
key_first_k=key_first_k)
|
| 135 |
+
|
| 136 |
+
self.replay_buffer = replay_buffer
|
| 137 |
+
self.sampler = sampler
|
| 138 |
+
self.shape_meta = shape_meta
|
| 139 |
+
self.rgb_keys = rgb_keys
|
| 140 |
+
self.lowdim_keys = lowdim_keys
|
| 141 |
+
self.n_obs_steps = n_obs_steps
|
| 142 |
+
self.val_mask = val_mask
|
| 143 |
+
self.horizon = horizon
|
| 144 |
+
self.n_latency_steps = n_latency_steps
|
| 145 |
+
self.pad_before = pad_before
|
| 146 |
+
self.pad_after = pad_after
|
| 147 |
+
|
| 148 |
+
def get_validation_dataset(self):
|
| 149 |
+
val_set = copy.copy(self)
|
| 150 |
+
val_set.sampler = SequenceSampler(
|
| 151 |
+
replay_buffer=self.replay_buffer,
|
| 152 |
+
sequence_length=self.horizon+self.n_latency_steps,
|
| 153 |
+
pad_before=self.pad_before,
|
| 154 |
+
pad_after=self.pad_after,
|
| 155 |
+
episode_mask=self.val_mask
|
| 156 |
+
)
|
| 157 |
+
val_set.val_mask = ~self.val_mask
|
| 158 |
+
return val_set
|
| 159 |
+
|
| 160 |
+
def get_normalizer(self, **kwargs) -> LinearNormalizer:
|
| 161 |
+
normalizer = LinearNormalizer()
|
| 162 |
+
|
| 163 |
+
# action
|
| 164 |
+
normalizer['action'] = SingleFieldLinearNormalizer.create_fit(
|
| 165 |
+
self.replay_buffer['action'])
|
| 166 |
+
|
| 167 |
+
# obs
|
| 168 |
+
for key in self.lowdim_keys:
|
| 169 |
+
normalizer[key] = SingleFieldLinearNormalizer.create_fit(
|
| 170 |
+
self.replay_buffer[key])
|
| 171 |
+
|
| 172 |
+
# image
|
| 173 |
+
for key in self.rgb_keys:
|
| 174 |
+
normalizer[key] = get_image_range_normalizer()
|
| 175 |
+
return normalizer
|
| 176 |
+
|
| 177 |
+
def get_all_actions(self) -> torch.Tensor:
|
| 178 |
+
return torch.from_numpy(self.replay_buffer['action'])
|
| 179 |
+
|
| 180 |
+
def __len__(self):
|
| 181 |
+
return len(self.sampler)
|
| 182 |
+
|
| 183 |
+
def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]:
|
| 184 |
+
threadpool_limits(1)
|
| 185 |
+
data = self.sampler.sample_sequence(idx)
|
| 186 |
+
|
| 187 |
+
# to save RAM, only return first n_obs_steps of OBS
|
| 188 |
+
# since the rest will be discarded anyway.
|
| 189 |
+
# when self.n_obs_steps is None
|
| 190 |
+
# this slice does nothing (takes all)
|
| 191 |
+
T_slice = slice(self.n_obs_steps)
|
| 192 |
+
|
| 193 |
+
obs_dict = dict()
|
| 194 |
+
for key in self.rgb_keys:
|
| 195 |
+
# move channel last to channel first
|
| 196 |
+
# T,H,W,C
|
| 197 |
+
# convert uint8 image to float32
|
| 198 |
+
obs_dict[key] = np.moveaxis(data[key][T_slice],-1,1
|
| 199 |
+
).astype(np.float32) / 255.
|
| 200 |
+
# T,C,H,W
|
| 201 |
+
# save ram
|
| 202 |
+
del data[key]
|
| 203 |
+
for key in self.lowdim_keys:
|
| 204 |
+
obs_dict[key] = data[key][T_slice].astype(np.float32)
|
| 205 |
+
# save ram
|
| 206 |
+
del data[key]
|
| 207 |
+
|
| 208 |
+
action = data['action'].astype(np.float32)
|
| 209 |
+
# handle latency by dropping first n_latency_steps action
|
| 210 |
+
# observations are already taken care of by T_slice
|
| 211 |
+
if self.n_latency_steps > 0:
|
| 212 |
+
action = action[self.n_latency_steps:]
|
| 213 |
+
|
| 214 |
+
torch_data = {
|
| 215 |
+
'obs': dict_apply(obs_dict, torch.from_numpy),
|
| 216 |
+
'action': torch.from_numpy(action)
|
| 217 |
+
}
|
| 218 |
+
return torch_data
|
| 219 |
+
|
| 220 |
+
def zarr_resize_index_last_dim(zarr_arr, idxs):
|
| 221 |
+
actions = zarr_arr[:]
|
| 222 |
+
actions = actions[...,idxs]
|
| 223 |
+
zarr_arr.resize(zarr_arr.shape[:-1] + (len(idxs),))
|
| 224 |
+
zarr_arr[:] = actions
|
| 225 |
+
return zarr_arr
|
| 226 |
+
|
| 227 |
+
def _get_replay_buffer(dataset_path, shape_meta, store):
|
| 228 |
+
# parse shape meta
|
| 229 |
+
rgb_keys = list()
|
| 230 |
+
lowdim_keys = list()
|
| 231 |
+
out_resolutions = dict()
|
| 232 |
+
lowdim_shapes = dict()
|
| 233 |
+
obs_shape_meta = shape_meta['obs']
|
| 234 |
+
for key, attr in obs_shape_meta.items():
|
| 235 |
+
type = attr.get('type', 'low_dim')
|
| 236 |
+
shape = tuple(attr.get('shape'))
|
| 237 |
+
if type == 'rgb':
|
| 238 |
+
rgb_keys.append(key)
|
| 239 |
+
c,h,w = shape
|
| 240 |
+
out_resolutions[key] = (w,h)
|
| 241 |
+
elif type == 'low_dim':
|
| 242 |
+
lowdim_keys.append(key)
|
| 243 |
+
lowdim_shapes[key] = tuple(shape)
|
| 244 |
+
if 'pose' in key:
|
| 245 |
+
assert tuple(shape) in [(2,),(6,)]
|
| 246 |
+
|
| 247 |
+
action_shape = tuple(shape_meta['action']['shape'])
|
| 248 |
+
assert action_shape in [(2,),(6,)]
|
| 249 |
+
|
| 250 |
+
# load data
|
| 251 |
+
cv2.setNumThreads(1)
|
| 252 |
+
with threadpool_limits(1):
|
| 253 |
+
replay_buffer = real_data_to_replay_buffer(
|
| 254 |
+
dataset_path=dataset_path,
|
| 255 |
+
out_store=store,
|
| 256 |
+
out_resolutions=out_resolutions,
|
| 257 |
+
lowdim_keys=lowdim_keys + ['action'],
|
| 258 |
+
image_keys=rgb_keys
|
| 259 |
+
)
|
| 260 |
+
|
| 261 |
+
# transform lowdim dimensions
|
| 262 |
+
if action_shape == (2,):
|
| 263 |
+
# 2D action space, only controls X and Y
|
| 264 |
+
zarr_arr = replay_buffer['action']
|
| 265 |
+
zarr_resize_index_last_dim(zarr_arr, idxs=[0,1])
|
| 266 |
+
|
| 267 |
+
for key, shape in lowdim_shapes.items():
|
| 268 |
+
if 'pose' in key and shape == (2,):
|
| 269 |
+
# only take X and Y
|
| 270 |
+
zarr_arr = replay_buffer[key]
|
| 271 |
+
zarr_resize_index_last_dim(zarr_arr, idxs=[0,1])
|
| 272 |
+
|
| 273 |
+
return replay_buffer
|
| 274 |
+
|
| 275 |
+
|
| 276 |
+
def test():
|
| 277 |
+
import hydra
|
| 278 |
+
from omegaconf import OmegaConf
|
| 279 |
+
OmegaConf.register_new_resolver("eval", eval, replace=True)
|
| 280 |
+
|
| 281 |
+
with hydra.initialize('../diffusion_policy/config'):
|
| 282 |
+
cfg = hydra.compose('train_robomimic_real_image_workspace')
|
| 283 |
+
OmegaConf.resolve(cfg)
|
| 284 |
+
dataset = hydra.utils.instantiate(cfg.task.dataset)
|
| 285 |
+
|
| 286 |
+
from matplotlib import pyplot as plt
|
| 287 |
+
normalizer = dataset.get_normalizer()
|
| 288 |
+
nactions = normalizer['action'].normalize(dataset.replay_buffer['action'][:])
|
| 289 |
+
diff = np.diff(nactions, axis=0)
|
| 290 |
+
dists = np.linalg.norm(np.diff(nactions, axis=0), axis=-1)
|
| 291 |
+
_ = plt.hist(dists, bins=100); plt.title('real action velocity')
|
third_party/diffusion_policy/diffusion_policy/dataset/robomimic_replay_image_dataset.py
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict, List
|
| 2 |
+
import torch
|
| 3 |
+
import numpy as np
|
| 4 |
+
import h5py
|
| 5 |
+
from tqdm import tqdm
|
| 6 |
+
import zarr
|
| 7 |
+
import os
|
| 8 |
+
import shutil
|
| 9 |
+
import copy
|
| 10 |
+
import json
|
| 11 |
+
import hashlib
|
| 12 |
+
from filelock import FileLock
|
| 13 |
+
from threadpoolctl import threadpool_limits
|
| 14 |
+
import concurrent.futures
|
| 15 |
+
import multiprocessing
|
| 16 |
+
from omegaconf import OmegaConf
|
| 17 |
+
from diffusion_policy.common.pytorch_util import dict_apply
|
| 18 |
+
from diffusion_policy.dataset.base_dataset import BaseImageDataset, LinearNormalizer
|
| 19 |
+
from diffusion_policy.model.common.normalizer import LinearNormalizer, SingleFieldLinearNormalizer
|
| 20 |
+
from diffusion_policy.model.common.rotation_transformer import RotationTransformer
|
| 21 |
+
from diffusion_policy.codecs.imagecodecs_numcodecs import register_codecs, Jpeg2k
|
| 22 |
+
from diffusion_policy.common.replay_buffer import ReplayBuffer
|
| 23 |
+
from diffusion_policy.common.sampler import SequenceSampler, get_val_mask
|
| 24 |
+
from diffusion_policy.common.normalize_util import (
|
| 25 |
+
robomimic_abs_action_only_normalizer_from_stat,
|
| 26 |
+
robomimic_abs_action_only_dual_arm_normalizer_from_stat,
|
| 27 |
+
get_range_normalizer_from_stat,
|
| 28 |
+
get_image_range_normalizer,
|
| 29 |
+
get_identity_normalizer_from_stat,
|
| 30 |
+
array_to_stats
|
| 31 |
+
)
|
| 32 |
+
register_codecs()
|
| 33 |
+
|
| 34 |
+
class RobomimicReplayImageDataset(BaseImageDataset):
|
| 35 |
+
def __init__(self,
|
| 36 |
+
shape_meta: dict,
|
| 37 |
+
dataset_path: str,
|
| 38 |
+
horizon=1,
|
| 39 |
+
pad_before=0,
|
| 40 |
+
pad_after=0,
|
| 41 |
+
n_obs_steps=None,
|
| 42 |
+
abs_action=False,
|
| 43 |
+
rotation_rep='rotation_6d', # ignored when abs_action=False
|
| 44 |
+
use_legacy_normalizer=False,
|
| 45 |
+
use_cache=False,
|
| 46 |
+
seed=42,
|
| 47 |
+
val_ratio=0.0
|
| 48 |
+
):
|
| 49 |
+
rotation_transformer = RotationTransformer(
|
| 50 |
+
from_rep='axis_angle', to_rep=rotation_rep)
|
| 51 |
+
|
| 52 |
+
replay_buffer = None
|
| 53 |
+
if use_cache:
|
| 54 |
+
cache_zarr_path = dataset_path + '.zarr.zip'
|
| 55 |
+
cache_lock_path = cache_zarr_path + '.lock'
|
| 56 |
+
print('Acquiring lock on cache.')
|
| 57 |
+
with FileLock(cache_lock_path):
|
| 58 |
+
if not os.path.exists(cache_zarr_path):
|
| 59 |
+
# cache does not exists
|
| 60 |
+
try:
|
| 61 |
+
print('Cache does not exist. Creating!')
|
| 62 |
+
# store = zarr.DirectoryStore(cache_zarr_path)
|
| 63 |
+
replay_buffer = _convert_robomimic_to_replay(
|
| 64 |
+
store=zarr.MemoryStore(),
|
| 65 |
+
shape_meta=shape_meta,
|
| 66 |
+
dataset_path=dataset_path,
|
| 67 |
+
abs_action=abs_action,
|
| 68 |
+
rotation_transformer=rotation_transformer)
|
| 69 |
+
print('Saving cache to disk.')
|
| 70 |
+
with zarr.ZipStore(cache_zarr_path) as zip_store:
|
| 71 |
+
replay_buffer.save_to_store(
|
| 72 |
+
store=zip_store
|
| 73 |
+
)
|
| 74 |
+
except Exception as e:
|
| 75 |
+
shutil.rmtree(cache_zarr_path)
|
| 76 |
+
raise e
|
| 77 |
+
else:
|
| 78 |
+
print('Loading cached ReplayBuffer from Disk.')
|
| 79 |
+
with zarr.ZipStore(cache_zarr_path, mode='r') as zip_store:
|
| 80 |
+
replay_buffer = ReplayBuffer.copy_from_store(
|
| 81 |
+
src_store=zip_store, store=zarr.MemoryStore())
|
| 82 |
+
print('Loaded!')
|
| 83 |
+
else:
|
| 84 |
+
replay_buffer = _convert_robomimic_to_replay(
|
| 85 |
+
store=zarr.MemoryStore(),
|
| 86 |
+
shape_meta=shape_meta,
|
| 87 |
+
dataset_path=dataset_path,
|
| 88 |
+
abs_action=abs_action,
|
| 89 |
+
rotation_transformer=rotation_transformer)
|
| 90 |
+
|
| 91 |
+
rgb_keys = list()
|
| 92 |
+
lowdim_keys = list()
|
| 93 |
+
obs_shape_meta = shape_meta['obs']
|
| 94 |
+
for key, attr in obs_shape_meta.items():
|
| 95 |
+
type = attr.get('type', 'low_dim')
|
| 96 |
+
if type == 'rgb':
|
| 97 |
+
rgb_keys.append(key)
|
| 98 |
+
elif type == 'low_dim':
|
| 99 |
+
lowdim_keys.append(key)
|
| 100 |
+
|
| 101 |
+
# for key in rgb_keys:
|
| 102 |
+
# replay_buffer[key].compressor.numthreads=1
|
| 103 |
+
|
| 104 |
+
key_first_k = dict()
|
| 105 |
+
if n_obs_steps is not None:
|
| 106 |
+
# only take first k obs from images
|
| 107 |
+
for key in rgb_keys + lowdim_keys:
|
| 108 |
+
key_first_k[key] = n_obs_steps
|
| 109 |
+
|
| 110 |
+
val_mask = get_val_mask(
|
| 111 |
+
n_episodes=replay_buffer.n_episodes,
|
| 112 |
+
val_ratio=val_ratio,
|
| 113 |
+
seed=seed)
|
| 114 |
+
train_mask = ~val_mask
|
| 115 |
+
sampler = SequenceSampler(
|
| 116 |
+
replay_buffer=replay_buffer,
|
| 117 |
+
sequence_length=horizon,
|
| 118 |
+
pad_before=pad_before,
|
| 119 |
+
pad_after=pad_after,
|
| 120 |
+
episode_mask=train_mask,
|
| 121 |
+
key_first_k=key_first_k)
|
| 122 |
+
|
| 123 |
+
self.replay_buffer = replay_buffer
|
| 124 |
+
self.sampler = sampler
|
| 125 |
+
self.shape_meta = shape_meta
|
| 126 |
+
self.rgb_keys = rgb_keys
|
| 127 |
+
self.lowdim_keys = lowdim_keys
|
| 128 |
+
self.abs_action = abs_action
|
| 129 |
+
self.n_obs_steps = n_obs_steps
|
| 130 |
+
self.train_mask = train_mask
|
| 131 |
+
self.horizon = horizon
|
| 132 |
+
self.pad_before = pad_before
|
| 133 |
+
self.pad_after = pad_after
|
| 134 |
+
self.use_legacy_normalizer = use_legacy_normalizer
|
| 135 |
+
|
| 136 |
+
def get_validation_dataset(self):
|
| 137 |
+
val_set = copy.copy(self)
|
| 138 |
+
val_set.sampler = SequenceSampler(
|
| 139 |
+
replay_buffer=self.replay_buffer,
|
| 140 |
+
sequence_length=self.horizon,
|
| 141 |
+
pad_before=self.pad_before,
|
| 142 |
+
pad_after=self.pad_after,
|
| 143 |
+
episode_mask=~self.train_mask
|
| 144 |
+
)
|
| 145 |
+
val_set.train_mask = ~self.train_mask
|
| 146 |
+
return val_set
|
| 147 |
+
|
| 148 |
+
def get_normalizer(self, **kwargs) -> LinearNormalizer:
|
| 149 |
+
normalizer = LinearNormalizer()
|
| 150 |
+
|
| 151 |
+
# action
|
| 152 |
+
stat = array_to_stats(self.replay_buffer['action'])
|
| 153 |
+
if self.abs_action:
|
| 154 |
+
if stat['mean'].shape[-1] > 10:
|
| 155 |
+
# dual arm
|
| 156 |
+
this_normalizer = robomimic_abs_action_only_dual_arm_normalizer_from_stat(stat)
|
| 157 |
+
else:
|
| 158 |
+
this_normalizer = robomimic_abs_action_only_normalizer_from_stat(stat)
|
| 159 |
+
|
| 160 |
+
if self.use_legacy_normalizer:
|
| 161 |
+
this_normalizer = normalizer_from_stat(stat)
|
| 162 |
+
else:
|
| 163 |
+
# already normalized
|
| 164 |
+
this_normalizer = get_identity_normalizer_from_stat(stat)
|
| 165 |
+
normalizer['action'] = this_normalizer
|
| 166 |
+
|
| 167 |
+
# obs
|
| 168 |
+
for key in self.lowdim_keys:
|
| 169 |
+
stat = array_to_stats(self.replay_buffer[key])
|
| 170 |
+
|
| 171 |
+
if key.endswith('pos'):
|
| 172 |
+
this_normalizer = get_range_normalizer_from_stat(stat)
|
| 173 |
+
elif key.endswith('quat'):
|
| 174 |
+
# quaternion is in [-1,1] already
|
| 175 |
+
this_normalizer = get_identity_normalizer_from_stat(stat)
|
| 176 |
+
elif key.endswith('qpos'):
|
| 177 |
+
this_normalizer = get_range_normalizer_from_stat(stat)
|
| 178 |
+
else:
|
| 179 |
+
raise RuntimeError('unsupported')
|
| 180 |
+
normalizer[key] = this_normalizer
|
| 181 |
+
|
| 182 |
+
# image
|
| 183 |
+
for key in self.rgb_keys:
|
| 184 |
+
normalizer[key] = get_image_range_normalizer()
|
| 185 |
+
return normalizer
|
| 186 |
+
|
| 187 |
+
def get_all_actions(self) -> torch.Tensor:
|
| 188 |
+
return torch.from_numpy(self.replay_buffer['action'])
|
| 189 |
+
|
| 190 |
+
def __len__(self):
|
| 191 |
+
return len(self.sampler)
|
| 192 |
+
|
| 193 |
+
def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]:
|
| 194 |
+
threadpool_limits(1)
|
| 195 |
+
data = self.sampler.sample_sequence(idx)
|
| 196 |
+
|
| 197 |
+
# to save RAM, only return first n_obs_steps of OBS
|
| 198 |
+
# since the rest will be discarded anyway.
|
| 199 |
+
# when self.n_obs_steps is None
|
| 200 |
+
# this slice does nothing (takes all)
|
| 201 |
+
T_slice = slice(self.n_obs_steps)
|
| 202 |
+
|
| 203 |
+
obs_dict = dict()
|
| 204 |
+
for key in self.rgb_keys:
|
| 205 |
+
# move channel last to channel first
|
| 206 |
+
# T,H,W,C
|
| 207 |
+
# convert uint8 image to float32
|
| 208 |
+
obs_dict[key] = np.moveaxis(data[key][T_slice],-1,1
|
| 209 |
+
).astype(np.float32) / 255.
|
| 210 |
+
# T,C,H,W
|
| 211 |
+
del data[key]
|
| 212 |
+
for key in self.lowdim_keys:
|
| 213 |
+
obs_dict[key] = data[key][T_slice].astype(np.float32)
|
| 214 |
+
del data[key]
|
| 215 |
+
|
| 216 |
+
torch_data = {
|
| 217 |
+
'obs': dict_apply(obs_dict, torch.from_numpy),
|
| 218 |
+
'action': torch.from_numpy(data['action'].astype(np.float32))
|
| 219 |
+
}
|
| 220 |
+
return torch_data
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
def _convert_actions(raw_actions, abs_action, rotation_transformer):
|
| 224 |
+
actions = raw_actions
|
| 225 |
+
if abs_action:
|
| 226 |
+
is_dual_arm = False
|
| 227 |
+
if raw_actions.shape[-1] == 14:
|
| 228 |
+
# dual arm
|
| 229 |
+
raw_actions = raw_actions.reshape(-1,2,7)
|
| 230 |
+
is_dual_arm = True
|
| 231 |
+
|
| 232 |
+
pos = raw_actions[...,:3]
|
| 233 |
+
rot = raw_actions[...,3:6]
|
| 234 |
+
gripper = raw_actions[...,6:]
|
| 235 |
+
rot = rotation_transformer.forward(rot)
|
| 236 |
+
raw_actions = np.concatenate([
|
| 237 |
+
pos, rot, gripper
|
| 238 |
+
], axis=-1).astype(np.float32)
|
| 239 |
+
|
| 240 |
+
if is_dual_arm:
|
| 241 |
+
raw_actions = raw_actions.reshape(-1,20)
|
| 242 |
+
actions = raw_actions
|
| 243 |
+
return actions
|
| 244 |
+
|
| 245 |
+
|
| 246 |
+
def _convert_robomimic_to_replay(store, shape_meta, dataset_path, abs_action, rotation_transformer,
|
| 247 |
+
n_workers=None, max_inflight_tasks=None):
|
| 248 |
+
if n_workers is None:
|
| 249 |
+
n_workers = multiprocessing.cpu_count()
|
| 250 |
+
if max_inflight_tasks is None:
|
| 251 |
+
max_inflight_tasks = n_workers * 5
|
| 252 |
+
|
| 253 |
+
# parse shape_meta
|
| 254 |
+
rgb_keys = list()
|
| 255 |
+
lowdim_keys = list()
|
| 256 |
+
# construct compressors and chunks
|
| 257 |
+
obs_shape_meta = shape_meta['obs']
|
| 258 |
+
for key, attr in obs_shape_meta.items():
|
| 259 |
+
shape = attr['shape']
|
| 260 |
+
type = attr.get('type', 'low_dim')
|
| 261 |
+
if type == 'rgb':
|
| 262 |
+
rgb_keys.append(key)
|
| 263 |
+
elif type == 'low_dim':
|
| 264 |
+
lowdim_keys.append(key)
|
| 265 |
+
|
| 266 |
+
root = zarr.group(store)
|
| 267 |
+
data_group = root.require_group('data', overwrite=True)
|
| 268 |
+
meta_group = root.require_group('meta', overwrite=True)
|
| 269 |
+
|
| 270 |
+
with h5py.File(dataset_path) as file:
|
| 271 |
+
# count total steps
|
| 272 |
+
demos = file['data']
|
| 273 |
+
episode_ends = list()
|
| 274 |
+
prev_end = 0
|
| 275 |
+
for i in range(len(demos)):
|
| 276 |
+
demo = demos[f'demo_{i}']
|
| 277 |
+
episode_length = demo['actions'].shape[0]
|
| 278 |
+
episode_end = prev_end + episode_length
|
| 279 |
+
prev_end = episode_end
|
| 280 |
+
episode_ends.append(episode_end)
|
| 281 |
+
n_steps = episode_ends[-1]
|
| 282 |
+
episode_starts = [0] + episode_ends[:-1]
|
| 283 |
+
_ = meta_group.array('episode_ends', episode_ends,
|
| 284 |
+
dtype=np.int64, compressor=None, overwrite=True)
|
| 285 |
+
|
| 286 |
+
# save lowdim data
|
| 287 |
+
for key in tqdm(lowdim_keys + ['action'], desc="Loading lowdim data"):
|
| 288 |
+
data_key = 'obs/' + key
|
| 289 |
+
if key == 'action':
|
| 290 |
+
data_key = 'actions'
|
| 291 |
+
this_data = list()
|
| 292 |
+
for i in range(len(demos)):
|
| 293 |
+
demo = demos[f'demo_{i}']
|
| 294 |
+
this_data.append(demo[data_key][:].astype(np.float32))
|
| 295 |
+
this_data = np.concatenate(this_data, axis=0)
|
| 296 |
+
if key == 'action':
|
| 297 |
+
this_data = _convert_actions(
|
| 298 |
+
raw_actions=this_data,
|
| 299 |
+
abs_action=abs_action,
|
| 300 |
+
rotation_transformer=rotation_transformer
|
| 301 |
+
)
|
| 302 |
+
assert this_data.shape == (n_steps,) + tuple(shape_meta['action']['shape'])
|
| 303 |
+
else:
|
| 304 |
+
assert this_data.shape == (n_steps,) + tuple(shape_meta['obs'][key]['shape'])
|
| 305 |
+
_ = data_group.array(
|
| 306 |
+
name=key,
|
| 307 |
+
data=this_data,
|
| 308 |
+
shape=this_data.shape,
|
| 309 |
+
chunks=this_data.shape,
|
| 310 |
+
compressor=None,
|
| 311 |
+
dtype=this_data.dtype
|
| 312 |
+
)
|
| 313 |
+
|
| 314 |
+
def img_copy(zarr_arr, zarr_idx, hdf5_arr, hdf5_idx):
|
| 315 |
+
try:
|
| 316 |
+
zarr_arr[zarr_idx] = hdf5_arr[hdf5_idx]
|
| 317 |
+
# make sure we can successfully decode
|
| 318 |
+
_ = zarr_arr[zarr_idx]
|
| 319 |
+
return True
|
| 320 |
+
except Exception as e:
|
| 321 |
+
return False
|
| 322 |
+
|
| 323 |
+
with tqdm(total=n_steps*len(rgb_keys), desc="Loading image data", mininterval=1.0) as pbar:
|
| 324 |
+
# one chunk per thread, therefore no synchronization needed
|
| 325 |
+
with concurrent.futures.ThreadPoolExecutor(max_workers=n_workers) as executor:
|
| 326 |
+
futures = set()
|
| 327 |
+
for key in rgb_keys:
|
| 328 |
+
data_key = 'obs/' + key
|
| 329 |
+
shape = tuple(shape_meta['obs'][key]['shape'])
|
| 330 |
+
c,h,w = shape
|
| 331 |
+
this_compressor = Jpeg2k(level=50)
|
| 332 |
+
img_arr = data_group.require_dataset(
|
| 333 |
+
name=key,
|
| 334 |
+
shape=(n_steps,h,w,c),
|
| 335 |
+
chunks=(1,h,w,c),
|
| 336 |
+
compressor=this_compressor,
|
| 337 |
+
dtype=np.uint8
|
| 338 |
+
)
|
| 339 |
+
for episode_idx in range(len(demos)):
|
| 340 |
+
demo = demos[f'demo_{episode_idx}']
|
| 341 |
+
hdf5_arr = demo['obs'][key]
|
| 342 |
+
for hdf5_idx in range(hdf5_arr.shape[0]):
|
| 343 |
+
if len(futures) >= max_inflight_tasks:
|
| 344 |
+
# limit number of inflight tasks
|
| 345 |
+
completed, futures = concurrent.futures.wait(futures,
|
| 346 |
+
return_when=concurrent.futures.FIRST_COMPLETED)
|
| 347 |
+
for f in completed:
|
| 348 |
+
if not f.result():
|
| 349 |
+
raise RuntimeError('Failed to encode image!')
|
| 350 |
+
pbar.update(len(completed))
|
| 351 |
+
|
| 352 |
+
zarr_idx = episode_starts[episode_idx] + hdf5_idx
|
| 353 |
+
futures.add(
|
| 354 |
+
executor.submit(img_copy,
|
| 355 |
+
img_arr, zarr_idx, hdf5_arr, hdf5_idx))
|
| 356 |
+
completed, futures = concurrent.futures.wait(futures)
|
| 357 |
+
for f in completed:
|
| 358 |
+
if not f.result():
|
| 359 |
+
raise RuntimeError('Failed to encode image!')
|
| 360 |
+
pbar.update(len(completed))
|
| 361 |
+
|
| 362 |
+
replay_buffer = ReplayBuffer(root)
|
| 363 |
+
return replay_buffer
|
| 364 |
+
|
| 365 |
+
def normalizer_from_stat(stat):
|
| 366 |
+
max_abs = np.maximum(stat['max'].max(), np.abs(stat['min']).max())
|
| 367 |
+
scale = np.full_like(stat['max'], fill_value=1/max_abs)
|
| 368 |
+
offset = np.zeros_like(stat['max'])
|
| 369 |
+
return SingleFieldLinearNormalizer.create_manual(
|
| 370 |
+
scale=scale,
|
| 371 |
+
offset=offset,
|
| 372 |
+
input_stats_dict=stat
|
| 373 |
+
)
|
third_party/diffusion_policy/diffusion_policy/dataset/robomimic_replay_lowdim_dataset.py
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict, List
|
| 2 |
+
import torch
|
| 3 |
+
import numpy as np
|
| 4 |
+
import h5py
|
| 5 |
+
from tqdm import tqdm
|
| 6 |
+
import copy
|
| 7 |
+
from diffusion_policy.common.pytorch_util import dict_apply
|
| 8 |
+
from diffusion_policy.dataset.base_dataset import BaseLowdimDataset, LinearNormalizer
|
| 9 |
+
from diffusion_policy.model.common.normalizer import LinearNormalizer, SingleFieldLinearNormalizer
|
| 10 |
+
from diffusion_policy.model.common.rotation_transformer import RotationTransformer
|
| 11 |
+
from diffusion_policy.common.replay_buffer import ReplayBuffer
|
| 12 |
+
from diffusion_policy.common.sampler import (
|
| 13 |
+
SequenceSampler, get_val_mask, downsample_mask)
|
| 14 |
+
from diffusion_policy.common.normalize_util import (
|
| 15 |
+
robomimic_abs_action_only_normalizer_from_stat,
|
| 16 |
+
robomimic_abs_action_only_dual_arm_normalizer_from_stat,
|
| 17 |
+
get_identity_normalizer_from_stat,
|
| 18 |
+
array_to_stats
|
| 19 |
+
)
|
| 20 |
+
|
| 21 |
+
class RobomimicReplayLowdimDataset(BaseLowdimDataset):
|
| 22 |
+
def __init__(self,
|
| 23 |
+
dataset_path: str,
|
| 24 |
+
horizon=1,
|
| 25 |
+
pad_before=0,
|
| 26 |
+
pad_after=0,
|
| 27 |
+
obs_keys: List[str]=[
|
| 28 |
+
'object',
|
| 29 |
+
'robot0_eef_pos',
|
| 30 |
+
'robot0_eef_quat',
|
| 31 |
+
'robot0_gripper_qpos'],
|
| 32 |
+
abs_action=False,
|
| 33 |
+
rotation_rep='rotation_6d',
|
| 34 |
+
use_legacy_normalizer=False,
|
| 35 |
+
seed=42,
|
| 36 |
+
val_ratio=0.0,
|
| 37 |
+
max_train_episodes=None
|
| 38 |
+
):
|
| 39 |
+
obs_keys = list(obs_keys)
|
| 40 |
+
rotation_transformer = RotationTransformer(
|
| 41 |
+
from_rep='axis_angle', to_rep=rotation_rep)
|
| 42 |
+
|
| 43 |
+
replay_buffer = ReplayBuffer.create_empty_numpy()
|
| 44 |
+
with h5py.File(dataset_path) as file:
|
| 45 |
+
demos = file['data']
|
| 46 |
+
for i in tqdm(range(len(demos)), desc="Loading hdf5 to ReplayBuffer"):
|
| 47 |
+
demo = demos[f'demo_{i}']
|
| 48 |
+
episode = _data_to_obs(
|
| 49 |
+
raw_obs=demo['obs'],
|
| 50 |
+
raw_actions=demo['actions'][:].astype(np.float32),
|
| 51 |
+
obs_keys=obs_keys,
|
| 52 |
+
abs_action=abs_action,
|
| 53 |
+
rotation_transformer=rotation_transformer)
|
| 54 |
+
replay_buffer.add_episode(episode)
|
| 55 |
+
|
| 56 |
+
val_mask = get_val_mask(
|
| 57 |
+
n_episodes=replay_buffer.n_episodes,
|
| 58 |
+
val_ratio=val_ratio,
|
| 59 |
+
seed=seed)
|
| 60 |
+
train_mask = ~val_mask
|
| 61 |
+
train_mask = downsample_mask(
|
| 62 |
+
mask=train_mask,
|
| 63 |
+
max_n=max_train_episodes,
|
| 64 |
+
seed=seed)
|
| 65 |
+
|
| 66 |
+
sampler = SequenceSampler(
|
| 67 |
+
replay_buffer=replay_buffer,
|
| 68 |
+
sequence_length=horizon,
|
| 69 |
+
pad_before=pad_before,
|
| 70 |
+
pad_after=pad_after,
|
| 71 |
+
episode_mask=train_mask)
|
| 72 |
+
|
| 73 |
+
self.replay_buffer = replay_buffer
|
| 74 |
+
self.sampler = sampler
|
| 75 |
+
self.abs_action = abs_action
|
| 76 |
+
self.train_mask = train_mask
|
| 77 |
+
self.horizon = horizon
|
| 78 |
+
self.pad_before = pad_before
|
| 79 |
+
self.pad_after = pad_after
|
| 80 |
+
self.use_legacy_normalizer = use_legacy_normalizer
|
| 81 |
+
|
| 82 |
+
def get_validation_dataset(self):
|
| 83 |
+
val_set = copy.copy(self)
|
| 84 |
+
val_set.sampler = SequenceSampler(
|
| 85 |
+
replay_buffer=self.replay_buffer,
|
| 86 |
+
sequence_length=self.horizon,
|
| 87 |
+
pad_before=self.pad_before,
|
| 88 |
+
pad_after=self.pad_after,
|
| 89 |
+
episode_mask=~self.train_mask
|
| 90 |
+
)
|
| 91 |
+
val_set.train_mask = ~self.train_mask
|
| 92 |
+
return val_set
|
| 93 |
+
|
| 94 |
+
def get_normalizer(self, **kwargs) -> LinearNormalizer:
|
| 95 |
+
normalizer = LinearNormalizer()
|
| 96 |
+
|
| 97 |
+
# action
|
| 98 |
+
stat = array_to_stats(self.replay_buffer['action'])
|
| 99 |
+
if self.abs_action:
|
| 100 |
+
if stat['mean'].shape[-1] > 10:
|
| 101 |
+
# dual arm
|
| 102 |
+
this_normalizer = robomimic_abs_action_only_dual_arm_normalizer_from_stat(stat)
|
| 103 |
+
else:
|
| 104 |
+
this_normalizer = robomimic_abs_action_only_normalizer_from_stat(stat)
|
| 105 |
+
|
| 106 |
+
if self.use_legacy_normalizer:
|
| 107 |
+
this_normalizer = normalizer_from_stat(stat)
|
| 108 |
+
else:
|
| 109 |
+
# already normalized
|
| 110 |
+
this_normalizer = get_identity_normalizer_from_stat(stat)
|
| 111 |
+
normalizer['action'] = this_normalizer
|
| 112 |
+
|
| 113 |
+
# aggregate obs stats
|
| 114 |
+
obs_stat = array_to_stats(self.replay_buffer['obs'])
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
normalizer['obs'] = normalizer_from_stat(obs_stat)
|
| 118 |
+
return normalizer
|
| 119 |
+
|
| 120 |
+
def get_all_actions(self) -> torch.Tensor:
|
| 121 |
+
return torch.from_numpy(self.replay_buffer['action'])
|
| 122 |
+
|
| 123 |
+
def __len__(self):
|
| 124 |
+
return len(self.sampler)
|
| 125 |
+
|
| 126 |
+
def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]:
|
| 127 |
+
data = self.sampler.sample_sequence(idx)
|
| 128 |
+
torch_data = dict_apply(data, torch.from_numpy)
|
| 129 |
+
return torch_data
|
| 130 |
+
|
| 131 |
+
def normalizer_from_stat(stat):
|
| 132 |
+
max_abs = np.maximum(stat['max'].max(), np.abs(stat['min']).max())
|
| 133 |
+
scale = np.full_like(stat['max'], fill_value=1/max_abs)
|
| 134 |
+
offset = np.zeros_like(stat['max'])
|
| 135 |
+
return SingleFieldLinearNormalizer.create_manual(
|
| 136 |
+
scale=scale,
|
| 137 |
+
offset=offset,
|
| 138 |
+
input_stats_dict=stat
|
| 139 |
+
)
|
| 140 |
+
|
| 141 |
+
def _data_to_obs(raw_obs, raw_actions, obs_keys, abs_action, rotation_transformer):
|
| 142 |
+
obs = np.concatenate([
|
| 143 |
+
raw_obs[key] for key in obs_keys
|
| 144 |
+
], axis=-1).astype(np.float32)
|
| 145 |
+
|
| 146 |
+
if abs_action:
|
| 147 |
+
is_dual_arm = False
|
| 148 |
+
if raw_actions.shape[-1] == 14:
|
| 149 |
+
# dual arm
|
| 150 |
+
raw_actions = raw_actions.reshape(-1,2,7)
|
| 151 |
+
is_dual_arm = True
|
| 152 |
+
|
| 153 |
+
pos = raw_actions[...,:3]
|
| 154 |
+
rot = raw_actions[...,3:6]
|
| 155 |
+
gripper = raw_actions[...,6:]
|
| 156 |
+
rot = rotation_transformer.forward(rot)
|
| 157 |
+
raw_actions = np.concatenate([
|
| 158 |
+
pos, rot, gripper
|
| 159 |
+
], axis=-1).astype(np.float32)
|
| 160 |
+
|
| 161 |
+
if is_dual_arm:
|
| 162 |
+
raw_actions = raw_actions.reshape(-1,20)
|
| 163 |
+
|
| 164 |
+
data = {
|
| 165 |
+
'obs': obs,
|
| 166 |
+
'action': raw_actions
|
| 167 |
+
}
|
| 168 |
+
return data
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/block.urdf
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="0.0" ?>
|
| 2 |
+
<robot name="box.urdf">
|
| 3 |
+
<link name="baseLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="1.0"/>
|
| 6 |
+
<rolling_friction value="0.0001"/>
|
| 7 |
+
<inertia_scaling value="3.0"/>
|
| 8 |
+
</contact>
|
| 9 |
+
<inertial>
|
| 10 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 11 |
+
<mass value=".01"/>
|
| 12 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 13 |
+
</inertial>
|
| 14 |
+
<visual>
|
| 15 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 16 |
+
<geometry>
|
| 17 |
+
<box size="0.04 0.04 0.04"/>
|
| 18 |
+
</geometry>
|
| 19 |
+
<material name="red">
|
| 20 |
+
<color rgba="1 0.3412 0.3490 1"/>
|
| 21 |
+
</material>
|
| 22 |
+
</visual>
|
| 23 |
+
<collision>
|
| 24 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 25 |
+
<geometry>
|
| 26 |
+
<box size="0.04 0.04 0.04"/>
|
| 27 |
+
</geometry>
|
| 28 |
+
</collision>
|
| 29 |
+
</link>
|
| 30 |
+
</robot>
|
| 31 |
+
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/block2.urdf
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="0.0" ?>
|
| 2 |
+
<robot name="box2.urdf">
|
| 3 |
+
<link name="baseLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="1.0"/>
|
| 6 |
+
<rolling_friction value="0.0001"/>
|
| 7 |
+
<inertia_scaling value="3.0"/>
|
| 8 |
+
</contact>
|
| 9 |
+
<inertial>
|
| 10 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 11 |
+
<mass value=".01"/>
|
| 12 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 13 |
+
</inertial>
|
| 14 |
+
<visual>
|
| 15 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 16 |
+
<geometry>
|
| 17 |
+
<box size="0.04 0.04 0.04"/>
|
| 18 |
+
</geometry>
|
| 19 |
+
<material name="red">
|
| 20 |
+
<color rgba="0.3412 1 0.3490 1"/>
|
| 21 |
+
</material>
|
| 22 |
+
</visual>
|
| 23 |
+
<collision>
|
| 24 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 25 |
+
<geometry>
|
| 26 |
+
<box size="0.04 0.04 0.04"/>
|
| 27 |
+
</geometry>
|
| 28 |
+
</collision>
|
| 29 |
+
</link>
|
| 30 |
+
</robot>
|
| 31 |
+
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/blue_cube.urdf
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" ?>
|
| 2 |
+
<robot name="blue_cube.urdf">
|
| 3 |
+
<link name="baseLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="0.5"/>
|
| 6 |
+
<rolling_friction value="0.0001"/>
|
| 7 |
+
<inertia_scaling value="1.0"/>
|
| 8 |
+
</contact>
|
| 9 |
+
<inertial>
|
| 10 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 11 |
+
<mass value=".01"/>
|
| 12 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 13 |
+
</inertial>
|
| 14 |
+
<visual>
|
| 15 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 16 |
+
<geometry>
|
| 17 |
+
<mesh filename="cube.obj" scale="1.0 1.0 1.0"/>
|
| 18 |
+
</geometry>
|
| 19 |
+
<material name="blue">
|
| 20 |
+
<color rgba="0.4 0.4 1.0 1"/>
|
| 21 |
+
</material>
|
| 22 |
+
</visual>
|
| 23 |
+
<collision>
|
| 24 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 25 |
+
<geometry>
|
| 26 |
+
<mesh filename="cube.obj" scale="1.0 1.0 1.0"/>
|
| 27 |
+
</geometry>
|
| 28 |
+
</collision>
|
| 29 |
+
</link>
|
| 30 |
+
</robot>
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/cube.obj
ADDED
|
@@ -0,0 +1,446 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Blender v2.92.0 OBJ File: ''
|
| 2 |
+
# www.blender.org
|
| 3 |
+
mtllib cube.mtl
|
| 4 |
+
o square_blue_block_Cube.001
|
| 5 |
+
v 0.000000 0.000000 -0.000000
|
| 6 |
+
v 0.000000 0.038100 -0.000000
|
| 7 |
+
v -0.014865 0.000000 0.018106
|
| 8 |
+
v -0.016277 0.002032 0.019826
|
| 9 |
+
v -0.015863 0.000595 0.019322
|
| 10 |
+
v -0.019826 0.002032 0.016277
|
| 11 |
+
v -0.018106 0.000000 0.014865
|
| 12 |
+
v -0.019322 0.000595 0.015863
|
| 13 |
+
v -0.018052 0.002032 0.019351
|
| 14 |
+
v -0.016494 0.000000 0.017681
|
| 15 |
+
v -0.017595 0.000595 0.018862
|
| 16 |
+
v -0.019351 0.002032 0.018052
|
| 17 |
+
v -0.017681 0.000000 0.016494
|
| 18 |
+
v -0.018862 0.000595 0.017595
|
| 19 |
+
v -0.018106 0.038100 0.014865
|
| 20 |
+
v -0.019826 0.036068 0.016277
|
| 21 |
+
v -0.019322 0.037505 0.015863
|
| 22 |
+
v -0.016277 0.036068 0.019826
|
| 23 |
+
v -0.014865 0.038100 0.018106
|
| 24 |
+
v -0.015863 0.037505 0.019322
|
| 25 |
+
v -0.017681 0.038100 0.016494
|
| 26 |
+
v -0.019351 0.036068 0.018052
|
| 27 |
+
v -0.018862 0.037505 0.017595
|
| 28 |
+
v -0.016494 0.038100 0.017681
|
| 29 |
+
v -0.018052 0.036068 0.019351
|
| 30 |
+
v -0.017595 0.037505 0.018862
|
| 31 |
+
v -0.018106 0.000000 -0.014865
|
| 32 |
+
v -0.019826 0.002032 -0.016277
|
| 33 |
+
v -0.019322 0.000595 -0.015863
|
| 34 |
+
v -0.016277 0.002032 -0.019826
|
| 35 |
+
v -0.014865 0.000000 -0.018106
|
| 36 |
+
v -0.015863 0.000595 -0.019322
|
| 37 |
+
v -0.017681 0.000000 -0.016494
|
| 38 |
+
v -0.019351 0.002032 -0.018052
|
| 39 |
+
v -0.018862 0.000595 -0.017595
|
| 40 |
+
v -0.016494 0.000000 -0.017681
|
| 41 |
+
v -0.018052 0.002032 -0.019351
|
| 42 |
+
v -0.017595 0.000595 -0.018862
|
| 43 |
+
v -0.014865 0.038100 -0.018106
|
| 44 |
+
v -0.016277 0.036068 -0.019826
|
| 45 |
+
v -0.015863 0.037505 -0.019322
|
| 46 |
+
v -0.019826 0.036068 -0.016277
|
| 47 |
+
v -0.018106 0.038100 -0.014865
|
| 48 |
+
v -0.019322 0.037505 -0.015863
|
| 49 |
+
v -0.018052 0.036068 -0.019351
|
| 50 |
+
v -0.016494 0.038100 -0.017681
|
| 51 |
+
v -0.017595 0.037505 -0.018862
|
| 52 |
+
v -0.019351 0.036068 -0.018052
|
| 53 |
+
v -0.017681 0.038100 -0.016494
|
| 54 |
+
v -0.018862 0.037505 -0.017595
|
| 55 |
+
v 0.018106 0.000000 0.014865
|
| 56 |
+
v 0.019826 0.002032 0.016277
|
| 57 |
+
v 0.019322 0.000595 0.015863
|
| 58 |
+
v 0.016277 0.002032 0.019826
|
| 59 |
+
v 0.014865 0.000000 0.018106
|
| 60 |
+
v 0.015863 0.000595 0.019322
|
| 61 |
+
v 0.017681 0.000000 0.016494
|
| 62 |
+
v 0.019351 0.002032 0.018052
|
| 63 |
+
v 0.018862 0.000595 0.017595
|
| 64 |
+
v 0.016494 0.000000 0.017681
|
| 65 |
+
v 0.018052 0.002032 0.019351
|
| 66 |
+
v 0.017595 0.000595 0.018862
|
| 67 |
+
v 0.014865 0.038100 0.018106
|
| 68 |
+
v 0.016277 0.036068 0.019826
|
| 69 |
+
v 0.015863 0.037505 0.019322
|
| 70 |
+
v 0.019826 0.036068 0.016277
|
| 71 |
+
v 0.018106 0.038100 0.014865
|
| 72 |
+
v 0.019322 0.037505 0.015863
|
| 73 |
+
v 0.018052 0.036068 0.019351
|
| 74 |
+
v 0.016494 0.038100 0.017681
|
| 75 |
+
v 0.017595 0.037505 0.018862
|
| 76 |
+
v 0.019351 0.036068 0.018052
|
| 77 |
+
v 0.017681 0.038100 0.016494
|
| 78 |
+
v 0.018862 0.037505 0.017595
|
| 79 |
+
v 0.014865 0.000000 -0.018106
|
| 80 |
+
v 0.016277 0.002032 -0.019826
|
| 81 |
+
v 0.015863 0.000595 -0.019322
|
| 82 |
+
v 0.019826 0.002032 -0.016277
|
| 83 |
+
v 0.018106 0.000000 -0.014865
|
| 84 |
+
v 0.019322 0.000595 -0.015863
|
| 85 |
+
v 0.016494 0.000000 -0.017681
|
| 86 |
+
v 0.018052 0.002032 -0.019351
|
| 87 |
+
v 0.017595 0.000595 -0.018862
|
| 88 |
+
v 0.017681 0.000000 -0.016494
|
| 89 |
+
v 0.019351 0.002032 -0.018052
|
| 90 |
+
v 0.018862 0.000595 -0.017595
|
| 91 |
+
v 0.018106 0.038100 -0.014865
|
| 92 |
+
v 0.019826 0.036068 -0.016277
|
| 93 |
+
v 0.019322 0.037505 -0.015863
|
| 94 |
+
v 0.016277 0.036068 -0.019826
|
| 95 |
+
v 0.014865 0.038100 -0.018106
|
| 96 |
+
v 0.015863 0.037505 -0.019322
|
| 97 |
+
v 0.019351 0.036068 -0.018052
|
| 98 |
+
v 0.017681 0.038100 -0.016494
|
| 99 |
+
v 0.018862 0.037505 -0.017595
|
| 100 |
+
v 0.018052 0.036068 -0.019351
|
| 101 |
+
v 0.016494 0.038100 -0.017681
|
| 102 |
+
v 0.017595 0.037505 -0.018862
|
| 103 |
+
vt 0.811987 0.285513
|
| 104 |
+
vt 0.811986 0.268118
|
| 105 |
+
vt 0.822561 0.276819
|
| 106 |
+
vt 0.831255 0.287393
|
| 107 |
+
vt 0.813860 0.287394
|
| 108 |
+
vt 0.836073 0.319870
|
| 109 |
+
vt 0.856069 0.319870
|
| 110 |
+
vt 0.856069 0.320950
|
| 111 |
+
vt 0.836073 0.320950
|
| 112 |
+
vt 0.813867 0.266245
|
| 113 |
+
vt 0.831262 0.266244
|
| 114 |
+
vt 0.832202 0.266496
|
| 115 |
+
vt 0.832884 0.267184
|
| 116 |
+
vt 0.856069 0.297507
|
| 117 |
+
vt 0.836074 0.297507
|
| 118 |
+
vt 0.836074 0.278381
|
| 119 |
+
vt 0.856070 0.278381
|
| 120 |
+
vt 0.812238 0.267178
|
| 121 |
+
vt 0.812926 0.266496
|
| 122 |
+
vt 0.856070 0.275143
|
| 123 |
+
vt 0.836074 0.275143
|
| 124 |
+
vt 0.836074 0.256018
|
| 125 |
+
vt 0.856070 0.256018
|
| 126 |
+
vt 0.833135 0.268125
|
| 127 |
+
vt 0.833136 0.285520
|
| 128 |
+
vt 0.833136 0.260613
|
| 129 |
+
vt 0.832884 0.261553
|
| 130 |
+
vt 0.822561 0.251912
|
| 131 |
+
vt 0.836074 0.342234
|
| 132 |
+
vt 0.856070 0.342234
|
| 133 |
+
vt 0.856070 0.343313
|
| 134 |
+
vt 0.836074 0.343313
|
| 135 |
+
vt 0.832196 0.287142
|
| 136 |
+
vt 0.831262 0.241337
|
| 137 |
+
vt 0.832202 0.241589
|
| 138 |
+
vt 0.832884 0.286460
|
| 139 |
+
vt 0.812238 0.286454
|
| 140 |
+
vt 0.811986 0.243211
|
| 141 |
+
vt 0.812238 0.242271
|
| 142 |
+
vt 0.836073 0.300745
|
| 143 |
+
vt 0.856069 0.300745
|
| 144 |
+
vt 0.836073 0.298586
|
| 145 |
+
vt 0.856069 0.298586
|
| 146 |
+
vt 0.856069 0.299665
|
| 147 |
+
vt 0.836073 0.299665
|
| 148 |
+
vt 0.856070 0.276222
|
| 149 |
+
vt 0.836074 0.276222
|
| 150 |
+
vt 0.836074 0.277302
|
| 151 |
+
vt 0.856070 0.277302
|
| 152 |
+
vt 0.836074 0.253859
|
| 153 |
+
vt 0.856070 0.253859
|
| 154 |
+
vt 0.856070 0.254938
|
| 155 |
+
vt 0.836074 0.254938
|
| 156 |
+
vt 0.812920 0.287142
|
| 157 |
+
vt 0.856069 0.322029
|
| 158 |
+
vt 0.836073 0.322029
|
| 159 |
+
vt 0.813860 0.262487
|
| 160 |
+
vt 0.812920 0.262235
|
| 161 |
+
vt 0.836073 0.323108
|
| 162 |
+
vt 0.856069 0.323108
|
| 163 |
+
vt 0.832884 0.242277
|
| 164 |
+
vt 0.833135 0.243218
|
| 165 |
+
vt 0.812238 0.261547
|
| 166 |
+
vt 0.811987 0.260606
|
| 167 |
+
vt 0.813868 0.241338
|
| 168 |
+
vt 0.812926 0.241589
|
| 169 |
+
vt 0.831255 0.262486
|
| 170 |
+
vt 0.832196 0.262235
|
| 171 |
+
vt 0.811196 0.267507
|
| 172 |
+
vt 0.811506 0.266500
|
| 173 |
+
vt 0.810258 0.267085
|
| 174 |
+
vt 0.810726 0.265896
|
| 175 |
+
vt 0.811523 0.262225
|
| 176 |
+
vt 0.811189 0.261224
|
| 177 |
+
vt 0.810732 0.262868
|
| 178 |
+
vt 0.810258 0.261658
|
| 179 |
+
vt 0.812248 0.265781
|
| 180 |
+
vt 0.811605 0.264990
|
| 181 |
+
vt 0.812242 0.262967
|
| 182 |
+
vt 0.811638 0.263747
|
| 183 |
+
vt 0.813249 0.265447
|
| 184 |
+
vt 0.812815 0.264516
|
| 185 |
+
vt 0.813249 0.263277
|
| 186 |
+
vt 0.812827 0.264215
|
| 187 |
+
vt 0.833926 0.261224
|
| 188 |
+
vt 0.833616 0.262231
|
| 189 |
+
vt 0.834864 0.261646
|
| 190 |
+
vt 0.834396 0.262835
|
| 191 |
+
vt 0.833599 0.266506
|
| 192 |
+
vt 0.833933 0.267507
|
| 193 |
+
vt 0.834390 0.265863
|
| 194 |
+
vt 0.834864 0.267073
|
| 195 |
+
vt 0.832874 0.262950
|
| 196 |
+
vt 0.833517 0.263741
|
| 197 |
+
vt 0.832880 0.265764
|
| 198 |
+
vt 0.833484 0.264984
|
| 199 |
+
vt 0.831873 0.263284
|
| 200 |
+
vt 0.832307 0.264215
|
| 201 |
+
vt 0.831873 0.265453
|
| 202 |
+
vt 0.832295 0.264516
|
| 203 |
+
vt 0.831873 0.240547
|
| 204 |
+
vt 0.832880 0.240857
|
| 205 |
+
vt 0.832295 0.239609
|
| 206 |
+
vt 0.833484 0.240077
|
| 207 |
+
vt 0.832874 0.287857
|
| 208 |
+
vt 0.831873 0.288191
|
| 209 |
+
vt 0.833517 0.288648
|
| 210 |
+
vt 0.832307 0.289122
|
| 211 |
+
vt 0.833599 0.241599
|
| 212 |
+
vt 0.834390 0.240956
|
| 213 |
+
vt 0.833616 0.287138
|
| 214 |
+
vt 0.834396 0.287742
|
| 215 |
+
vt 0.833933 0.242600
|
| 216 |
+
vt 0.834864 0.242166
|
| 217 |
+
vt 0.833926 0.286131
|
| 218 |
+
vt 0.834864 0.286553
|
| 219 |
+
vt 0.811196 0.242600
|
| 220 |
+
vt 0.811506 0.241593
|
| 221 |
+
vt 0.810258 0.242178
|
| 222 |
+
vt 0.810726 0.240989
|
| 223 |
+
vt 0.811523 0.287132
|
| 224 |
+
vt 0.811189 0.286131
|
| 225 |
+
vt 0.810732 0.287775
|
| 226 |
+
vt 0.810258 0.286565
|
| 227 |
+
vt 0.812248 0.240874
|
| 228 |
+
vt 0.811605 0.240083
|
| 229 |
+
vt 0.812242 0.287874
|
| 230 |
+
vt 0.811638 0.288654
|
| 231 |
+
vt 0.813249 0.240540
|
| 232 |
+
vt 0.812815 0.239609
|
| 233 |
+
vt 0.813249 0.288184
|
| 234 |
+
vt 0.812827 0.289122
|
| 235 |
+
vn 0.0000 -1.0000 0.0000
|
| 236 |
+
vn 0.9739 0.1816 -0.1363
|
| 237 |
+
vn 0.9739 -0.1816 -0.1363
|
| 238 |
+
vn 0.8444 -0.2052 -0.4948
|
| 239 |
+
vn 0.8444 0.2052 -0.4948
|
| 240 |
+
vn 0.1363 -0.1816 0.9739
|
| 241 |
+
vn 0.1363 0.1816 0.9739
|
| 242 |
+
vn -0.1363 0.1816 0.9739
|
| 243 |
+
vn -0.1363 -0.1816 0.9739
|
| 244 |
+
vn -0.9739 -0.1816 0.1362
|
| 245 |
+
vn -0.9739 0.1816 0.1362
|
| 246 |
+
vn -0.9739 0.1816 -0.1362
|
| 247 |
+
vn -0.9739 -0.1816 -0.1362
|
| 248 |
+
vn -0.0000 1.0000 -0.0000
|
| 249 |
+
vn -0.1363 0.1816 -0.9739
|
| 250 |
+
vn -0.1363 -0.1816 -0.9739
|
| 251 |
+
vn -0.4948 -0.2052 -0.8444
|
| 252 |
+
vn -0.4948 0.2052 -0.8444
|
| 253 |
+
vn 0.9739 0.1816 0.1363
|
| 254 |
+
vn 0.9739 -0.1816 0.1363
|
| 255 |
+
vn 0.4948 0.2052 0.8444
|
| 256 |
+
vn 0.4948 -0.2052 0.8444
|
| 257 |
+
vn 0.8444 -0.2052 0.4948
|
| 258 |
+
vn 0.8444 0.2052 0.4948
|
| 259 |
+
vn -0.8444 -0.2052 0.4948
|
| 260 |
+
vn -0.8444 0.2052 0.4948
|
| 261 |
+
vn -0.4948 0.2052 0.8444
|
| 262 |
+
vn -0.4948 -0.2052 0.8444
|
| 263 |
+
vn -0.8444 -0.2052 -0.4948
|
| 264 |
+
vn -0.8444 0.2052 -0.4948
|
| 265 |
+
vn 0.4948 -0.2052 -0.8444
|
| 266 |
+
vn 0.4948 0.2052 -0.8444
|
| 267 |
+
vn 0.1363 0.1816 -0.9739
|
| 268 |
+
vn 0.1363 -0.1816 -0.9739
|
| 269 |
+
vn -0.0965 -0.9775 0.1874
|
| 270 |
+
vn -0.0187 -0.9731 0.2298
|
| 271 |
+
vn -0.0935 -0.6743 0.7325
|
| 272 |
+
vn -0.3529 -0.6994 0.6215
|
| 273 |
+
vn -0.0187 0.9731 0.2298
|
| 274 |
+
vn -0.0965 0.9775 0.1874
|
| 275 |
+
vn -0.3529 0.6994 0.6215
|
| 276 |
+
vn -0.0935 0.6743 0.7325
|
| 277 |
+
vn -0.1874 -0.9775 0.0965
|
| 278 |
+
vn -0.6215 -0.6994 0.3529
|
| 279 |
+
vn -0.1874 0.9775 0.0965
|
| 280 |
+
vn -0.6215 0.6994 0.3529
|
| 281 |
+
vn -0.2298 -0.9731 0.0187
|
| 282 |
+
vn -0.7325 -0.6743 0.0935
|
| 283 |
+
vn -0.2298 0.9731 0.0187
|
| 284 |
+
vn -0.7325 0.6743 0.0935
|
| 285 |
+
vn -0.0965 0.9775 -0.1874
|
| 286 |
+
vn -0.0187 0.9731 -0.2298
|
| 287 |
+
vn -0.0935 0.6743 -0.7325
|
| 288 |
+
vn -0.3529 0.6994 -0.6215
|
| 289 |
+
vn -0.0187 -0.9731 -0.2298
|
| 290 |
+
vn -0.0965 -0.9775 -0.1874
|
| 291 |
+
vn -0.3529 -0.6994 -0.6215
|
| 292 |
+
vn -0.0935 -0.6743 -0.7325
|
| 293 |
+
vn -0.1874 0.9775 -0.0965
|
| 294 |
+
vn -0.6215 0.6994 -0.3529
|
| 295 |
+
vn -0.1874 -0.9775 -0.0965
|
| 296 |
+
vn -0.6215 -0.6994 -0.3529
|
| 297 |
+
vn -0.2298 0.9731 -0.0187
|
| 298 |
+
vn -0.7325 0.6743 -0.0935
|
| 299 |
+
vn -0.2298 -0.9731 -0.0187
|
| 300 |
+
vn -0.7325 -0.6743 -0.0935
|
| 301 |
+
vn 0.1874 0.9775 -0.0965
|
| 302 |
+
vn 0.2298 0.9731 -0.0187
|
| 303 |
+
vn 0.7325 0.6743 -0.0935
|
| 304 |
+
vn 0.6215 0.6994 -0.3529
|
| 305 |
+
vn 0.2298 -0.9731 -0.0187
|
| 306 |
+
vn 0.1874 -0.9775 -0.0965
|
| 307 |
+
vn 0.6215 -0.6994 -0.3529
|
| 308 |
+
vn 0.7325 -0.6743 -0.0935
|
| 309 |
+
vn 0.0965 0.9775 -0.1874
|
| 310 |
+
vn 0.3529 0.6994 -0.6215
|
| 311 |
+
vn 0.0965 -0.9775 -0.1874
|
| 312 |
+
vn 0.3529 -0.6994 -0.6215
|
| 313 |
+
vn 0.0187 0.9731 -0.2298
|
| 314 |
+
vn 0.0935 0.6743 -0.7325
|
| 315 |
+
vn 0.0187 -0.9731 -0.2298
|
| 316 |
+
vn 0.0935 -0.6743 -0.7325
|
| 317 |
+
vn 0.0965 0.9775 0.1874
|
| 318 |
+
vn 0.0187 0.9731 0.2298
|
| 319 |
+
vn 0.0935 0.6743 0.7325
|
| 320 |
+
vn 0.3529 0.6994 0.6215
|
| 321 |
+
vn 0.0187 -0.9731 0.2298
|
| 322 |
+
vn 0.0965 -0.9775 0.1874
|
| 323 |
+
vn 0.3529 -0.6994 0.6215
|
| 324 |
+
vn 0.0935 -0.6743 0.7325
|
| 325 |
+
vn 0.1874 0.9775 0.0965
|
| 326 |
+
vn 0.6215 0.6994 0.3529
|
| 327 |
+
vn 0.1874 -0.9775 0.0965
|
| 328 |
+
vn 0.6215 -0.6994 0.3529
|
| 329 |
+
vn 0.2298 0.9731 0.0187
|
| 330 |
+
vn 0.7325 0.6743 0.0935
|
| 331 |
+
vn 0.2298 -0.9731 0.0187
|
| 332 |
+
vn 0.7325 -0.6743 0.0935
|
| 333 |
+
usemtl toybox.001
|
| 334 |
+
s 1
|
| 335 |
+
f 55/1/1 3/2/1 1/3/1
|
| 336 |
+
f 79/4/1 51/5/1 1/3/1
|
| 337 |
+
f 88/6/2 78/7/3 85/8/4 93/9/5
|
| 338 |
+
f 7/10/1 27/11/1 1/3/1
|
| 339 |
+
f 33/12/1 36/13/1 1/3/1
|
| 340 |
+
f 54/14/6 64/15/7 18/16/8 4/17/9
|
| 341 |
+
f 10/18/1 13/19/1 1/3/1
|
| 342 |
+
f 6/20/10 16/21/11 42/22/12 28/23/13
|
| 343 |
+
f 31/24/1 75/25/1 1/3/1
|
| 344 |
+
f 39/26/14 46/27/14 2/28/14
|
| 345 |
+
f 40/29/15 30/30/16 37/31/17 45/32/18
|
| 346 |
+
f 84/33/1 79/4/1 1/3/1
|
| 347 |
+
f 87/34/14 94/35/14 2/28/14
|
| 348 |
+
f 75/25/1 81/36/1 1/3/1
|
| 349 |
+
f 60/37/1 55/1/1 1/3/1
|
| 350 |
+
f 63/38/14 70/39/14 2/28/14
|
| 351 |
+
f 78/7/3 88/6/2 66/40/19 52/41/20
|
| 352 |
+
f 69/42/21 61/43/22 58/44/23 72/45/24
|
| 353 |
+
f 13/19/1 7/10/1 1/3/1
|
| 354 |
+
f 12/46/25 22/47/26 16/21/11 6/20/10
|
| 355 |
+
f 81/36/1 84/33/1 1/3/1
|
| 356 |
+
f 4/17/9 18/16/8 25/48/27 9/49/28
|
| 357 |
+
f 45/50/18 37/51/17 34/52/29 48/53/30
|
| 358 |
+
f 72/45/24 58/44/23 52/41/20 66/40/19
|
| 359 |
+
f 57/54/1 60/37/1 1/3/1
|
| 360 |
+
f 93/9/5 85/8/4 82/55/31 96/56/32
|
| 361 |
+
f 9/49/28 25/48/27 22/47/26 12/46/25
|
| 362 |
+
f 48/53/30 34/52/29 28/23/13 42/22/12
|
| 363 |
+
f 36/13/1 31/24/1 1/3/1
|
| 364 |
+
f 15/57/14 21/58/14 2/28/14
|
| 365 |
+
f 30/30/16 40/29/15 90/59/33 76/60/34
|
| 366 |
+
f 64/15/7 54/14/6 61/43/22 69/42/21
|
| 367 |
+
f 97/61/14 91/62/14 2/28/14
|
| 368 |
+
f 51/5/1 57/54/1 1/3/1
|
| 369 |
+
f 24/63/14 19/64/14 2/28/14
|
| 370 |
+
f 67/65/14 87/34/14 2/28/14
|
| 371 |
+
f 73/66/14 67/65/14 2/28/14
|
| 372 |
+
f 21/58/14 24/63/14 2/28/14
|
| 373 |
+
f 43/67/14 15/57/14 2/28/14
|
| 374 |
+
f 70/39/14 73/66/14 2/28/14
|
| 375 |
+
f 19/64/14 63/38/14 2/28/14
|
| 376 |
+
f 46/27/14 49/68/14 2/28/14
|
| 377 |
+
f 49/68/14 43/67/14 2/28/14
|
| 378 |
+
f 91/62/14 39/26/14 2/28/14
|
| 379 |
+
f 96/56/32 82/55/31 76/60/34 90/59/33
|
| 380 |
+
f 94/35/14 97/61/14 2/28/14
|
| 381 |
+
f 27/11/1 33/12/1 1/3/1
|
| 382 |
+
f 10/18/35 3/2/36 5/69/37 11/70/38
|
| 383 |
+
f 11/70/38 5/69/37 4/71/9 9/72/28
|
| 384 |
+
f 19/64/39 24/63/40 26/73/41 20/74/42
|
| 385 |
+
f 20/74/42 26/73/41 25/75/27 18/76/8
|
| 386 |
+
f 13/19/43 10/18/35 11/70/38 14/77/44
|
| 387 |
+
f 14/77/44 11/70/38 9/72/28 12/78/25
|
| 388 |
+
f 24/63/40 21/58/45 23/79/46 26/73/41
|
| 389 |
+
f 26/73/41 23/79/46 22/80/26 25/75/27
|
| 390 |
+
f 7/10/47 13/19/43 14/77/44 8/81/48
|
| 391 |
+
f 8/81/48 14/77/44 12/78/25 6/82/10
|
| 392 |
+
f 21/58/45 15/57/49 17/83/50 23/79/46
|
| 393 |
+
f 23/79/46 17/83/50 16/84/11 22/80/26
|
| 394 |
+
f 46/27/51 39/26/52 41/85/53 47/86/54
|
| 395 |
+
f 47/86/54 41/85/53 40/87/15 45/88/18
|
| 396 |
+
f 31/24/55 36/13/56 38/89/57 32/90/58
|
| 397 |
+
f 32/90/58 38/89/57 37/91/17 30/92/16
|
| 398 |
+
f 49/68/59 46/27/51 47/86/54 50/93/60
|
| 399 |
+
f 50/93/60 47/86/54 45/88/18 48/94/30
|
| 400 |
+
f 36/13/56 33/12/61 35/95/62 38/89/57
|
| 401 |
+
f 38/89/57 35/95/62 34/96/29 37/91/17
|
| 402 |
+
f 43/67/63 49/68/59 50/93/60 44/97/64
|
| 403 |
+
f 44/97/64 50/93/60 48/94/30 42/98/12
|
| 404 |
+
f 33/12/61 27/11/65 29/99/66 35/95/62
|
| 405 |
+
f 35/95/62 29/99/66 28/100/13 34/96/29
|
| 406 |
+
f 94/35/67 87/34/68 89/101/69 95/102/70
|
| 407 |
+
f 95/102/70 89/101/69 88/103/2 93/104/5
|
| 408 |
+
f 79/4/71 84/33/72 86/105/73 80/106/74
|
| 409 |
+
f 80/106/74 86/105/73 85/107/4 78/108/3
|
| 410 |
+
f 97/61/75 94/35/67 95/102/70 98/109/76
|
| 411 |
+
f 98/109/76 95/102/70 93/104/5 96/110/32
|
| 412 |
+
f 84/33/72 81/36/77 83/111/78 86/105/73
|
| 413 |
+
f 86/105/73 83/111/78 82/112/31 85/107/4
|
| 414 |
+
f 91/62/79 97/61/75 98/109/76 92/113/80
|
| 415 |
+
f 92/113/80 98/109/76 96/110/32 90/114/33
|
| 416 |
+
f 81/36/77 75/25/81 77/115/82 83/111/78
|
| 417 |
+
f 83/111/78 77/115/82 76/116/34 82/112/31
|
| 418 |
+
f 70/39/83 63/38/84 65/117/85 71/118/86
|
| 419 |
+
f 71/118/86 65/117/85 64/119/7 69/120/21
|
| 420 |
+
f 55/1/87 60/37/88 62/121/89 56/122/90
|
| 421 |
+
f 56/122/90 62/121/89 61/123/22 54/124/6
|
| 422 |
+
f 73/66/91 70/39/83 71/118/86 74/125/92
|
| 423 |
+
f 74/125/92 71/118/86 69/120/21 72/126/24
|
| 424 |
+
f 60/37/88 57/54/93 59/127/94 62/121/89
|
| 425 |
+
f 62/121/89 59/127/94 58/128/23 61/123/22
|
| 426 |
+
f 67/65/95 73/66/91 74/125/92 68/129/96
|
| 427 |
+
f 68/129/96 74/125/92 72/126/24 66/130/19
|
| 428 |
+
f 57/54/93 51/5/97 53/131/98 59/127/94
|
| 429 |
+
f 59/127/94 53/131/98 52/132/20 58/128/23
|
| 430 |
+
f 6/82/10 28/100/13 29/99/66 8/81/48
|
| 431 |
+
f 8/81/48 29/99/66 27/11/65 7/10/47
|
| 432 |
+
f 30/92/16 76/116/34 77/115/82 32/90/58
|
| 433 |
+
f 32/90/58 77/115/82 75/25/81 31/24/55
|
| 434 |
+
f 78/108/3 52/132/20 53/131/98 80/106/74
|
| 435 |
+
f 80/106/74 53/131/98 51/5/97 79/4/71
|
| 436 |
+
f 54/124/6 4/71/9 5/69/37 56/122/90
|
| 437 |
+
f 56/122/90 5/69/37 3/2/36 55/1/87
|
| 438 |
+
f 15/57/49 43/67/63 44/97/64 17/83/50
|
| 439 |
+
f 17/83/50 44/97/64 42/98/12 16/84/11
|
| 440 |
+
f 63/38/84 19/64/39 20/74/42 65/117/85
|
| 441 |
+
f 65/117/85 20/74/42 18/76/8 64/119/7
|
| 442 |
+
f 66/130/19 88/103/2 89/101/69 68/129/96
|
| 443 |
+
f 68/129/96 89/101/69 87/34/68 67/65/95
|
| 444 |
+
f 90/114/33 40/87/15 41/85/53 92/113/80
|
| 445 |
+
f 92/113/80 41/85/53 39/26/52 91/62/79
|
| 446 |
+
f 3/2/1 10/18/1 1/3/1
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/green_star.urdf
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" ?>
|
| 2 |
+
<robot name="green_star.urdf">
|
| 3 |
+
<link name="baseLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="0.5"/>
|
| 6 |
+
<rolling_friction value="0.0001"/>
|
| 7 |
+
<inertia_scaling value="1.0"/>
|
| 8 |
+
</contact>
|
| 9 |
+
<inertial>
|
| 10 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 11 |
+
<mass value=".01"/>
|
| 12 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 13 |
+
</inertial>
|
| 14 |
+
<visual>
|
| 15 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 16 |
+
<geometry>
|
| 17 |
+
<mesh filename="star.obj" scale="1.0 1.0 1.0"/>
|
| 18 |
+
</geometry>
|
| 19 |
+
<material name="green">
|
| 20 |
+
<color rgba="0.4 1.0 0.4 1"/>
|
| 21 |
+
</material>
|
| 22 |
+
</visual>
|
| 23 |
+
<collision>
|
| 24 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 25 |
+
<geometry>
|
| 26 |
+
<mesh filename="star.obj" scale="1.0 1.0 1.0"/>
|
| 27 |
+
</geometry>
|
| 28 |
+
</collision>
|
| 29 |
+
</link>
|
| 30 |
+
</robot>
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/moon.obj
ADDED
|
@@ -0,0 +1,446 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Blender v2.92.0 OBJ File: ''
|
| 2 |
+
# www.blender.org
|
| 3 |
+
mtllib block.mtl
|
| 4 |
+
o moon_red_block_Cylinder.012
|
| 5 |
+
v -0.009181 0.000000 -0.006901
|
| 6 |
+
v -0.012205 0.002032 -0.009549
|
| 7 |
+
v -0.011319 0.000595 -0.008773
|
| 8 |
+
v -0.021856 0.000000 -0.011560
|
| 9 |
+
v -0.021140 0.002032 -0.012614
|
| 10 |
+
v -0.021633 0.000595 -0.012305
|
| 11 |
+
v -0.021140 0.036068 -0.012614
|
| 12 |
+
v -0.021856 0.038100 -0.011560
|
| 13 |
+
v -0.021633 0.037505 -0.012305
|
| 14 |
+
v -0.014039 0.002032 0.009151
|
| 15 |
+
v -0.012620 0.000000 0.008341
|
| 16 |
+
v -0.013624 0.000595 0.008914
|
| 17 |
+
v -0.012620 0.038100 0.008341
|
| 18 |
+
v -0.014039 0.036068 0.009151
|
| 19 |
+
v -0.013624 0.037505 0.008914
|
| 20 |
+
v -0.024317 0.002032 -0.000986
|
| 21 |
+
v -0.021966 0.000000 -0.000780
|
| 22 |
+
v -0.023628 0.000595 -0.000925
|
| 23 |
+
v -0.012205 0.036068 -0.009549
|
| 24 |
+
v -0.009181 0.038100 -0.006901
|
| 25 |
+
v -0.011319 0.037505 -0.008773
|
| 26 |
+
v -0.021966 0.038100 -0.000780
|
| 27 |
+
v -0.024317 0.036068 -0.000986
|
| 28 |
+
v -0.023628 0.037505 -0.000925
|
| 29 |
+
v -0.023768 0.000000 -0.007207
|
| 30 |
+
v -0.026243 0.002032 -0.008076
|
| 31 |
+
v -0.025518 0.000595 -0.007821
|
| 32 |
+
v -0.023815 0.000000 -0.010019
|
| 33 |
+
v -0.026267 0.002032 -0.011168
|
| 34 |
+
v -0.025549 0.000595 -0.010832
|
| 35 |
+
v -0.024498 0.002032 -0.012861
|
| 36 |
+
v -0.023166 0.000000 -0.011548
|
| 37 |
+
v -0.023825 0.000595 -0.012476
|
| 38 |
+
v -0.026243 0.036068 -0.008076
|
| 39 |
+
v -0.023768 0.038100 -0.007207
|
| 40 |
+
v -0.025518 0.037505 -0.007821
|
| 41 |
+
v -0.023166 0.038100 -0.011548
|
| 42 |
+
v -0.024498 0.036068 -0.012861
|
| 43 |
+
v -0.023825 0.037505 -0.012476
|
| 44 |
+
v -0.026267 0.036068 -0.011168
|
| 45 |
+
v -0.023815 0.038100 -0.010019
|
| 46 |
+
v -0.025549 0.037505 -0.010832
|
| 47 |
+
v -0.000000 0.038100 0.001138
|
| 48 |
+
v -0.000000 0.000000 0.001138
|
| 49 |
+
v -0.000000 0.000000 -0.006070
|
| 50 |
+
v -0.000000 0.002032 -0.008427
|
| 51 |
+
v -0.000000 0.000595 -0.007737
|
| 52 |
+
v -0.000000 0.036068 -0.008427
|
| 53 |
+
v -0.000000 0.038100 -0.006070
|
| 54 |
+
v -0.000000 0.037505 -0.007737
|
| 55 |
+
v 0.009181 0.000000 -0.006901
|
| 56 |
+
v 0.012205 0.002032 -0.009549
|
| 57 |
+
v 0.011319 0.000595 -0.008773
|
| 58 |
+
v 0.021856 0.000000 -0.011560
|
| 59 |
+
v 0.021140 0.002032 -0.012614
|
| 60 |
+
v 0.021633 0.000595 -0.012305
|
| 61 |
+
v 0.021140 0.036068 -0.012614
|
| 62 |
+
v 0.021856 0.038100 -0.011560
|
| 63 |
+
v 0.021633 0.037505 -0.012305
|
| 64 |
+
v -0.000000 0.002032 0.012861
|
| 65 |
+
v -0.000000 0.000000 0.011641
|
| 66 |
+
v -0.000000 0.000595 0.012504
|
| 67 |
+
v -0.000000 0.038100 0.011640
|
| 68 |
+
v -0.000000 0.036068 0.012861
|
| 69 |
+
v -0.000000 0.037505 0.012503
|
| 70 |
+
v 0.014039 0.002032 0.009151
|
| 71 |
+
v 0.012620 0.000000 0.008341
|
| 72 |
+
v 0.013624 0.000595 0.008914
|
| 73 |
+
v 0.012620 0.038100 0.008341
|
| 74 |
+
v 0.014039 0.036068 0.009151
|
| 75 |
+
v 0.013624 0.037505 0.008914
|
| 76 |
+
v 0.024317 0.002032 -0.000986
|
| 77 |
+
v 0.021966 0.000000 -0.000780
|
| 78 |
+
v 0.023628 0.000595 -0.000925
|
| 79 |
+
v 0.012205 0.036068 -0.009549
|
| 80 |
+
v 0.009181 0.038100 -0.006901
|
| 81 |
+
v 0.011319 0.037505 -0.008773
|
| 82 |
+
v 0.021966 0.038100 -0.000780
|
| 83 |
+
v 0.024317 0.036068 -0.000986
|
| 84 |
+
v 0.023628 0.037505 -0.000925
|
| 85 |
+
v 0.023768 0.000000 -0.007207
|
| 86 |
+
v 0.026243 0.002032 -0.008076
|
| 87 |
+
v 0.025518 0.000595 -0.007821
|
| 88 |
+
v 0.023815 0.000000 -0.010019
|
| 89 |
+
v 0.026267 0.002032 -0.011168
|
| 90 |
+
v 0.025549 0.000595 -0.010832
|
| 91 |
+
v 0.024498 0.002032 -0.012861
|
| 92 |
+
v 0.023166 0.000000 -0.011548
|
| 93 |
+
v 0.023825 0.000595 -0.012476
|
| 94 |
+
v 0.026243 0.036068 -0.008076
|
| 95 |
+
v 0.023768 0.038100 -0.007207
|
| 96 |
+
v 0.025518 0.037505 -0.007821
|
| 97 |
+
v 0.023166 0.038100 -0.011548
|
| 98 |
+
v 0.024498 0.036068 -0.012861
|
| 99 |
+
v 0.023825 0.037505 -0.012476
|
| 100 |
+
v 0.026267 0.036068 -0.011168
|
| 101 |
+
v 0.023815 0.038100 -0.010019
|
| 102 |
+
v 0.025549 0.037505 -0.010832
|
| 103 |
+
vt 0.710579 0.167405
|
| 104 |
+
vt 0.710864 0.161788
|
| 105 |
+
vt 0.714864 0.161788
|
| 106 |
+
vt 0.686288 0.163021
|
| 107 |
+
vt 0.706306 0.163021
|
| 108 |
+
vt 0.706306 0.165002
|
| 109 |
+
vt 0.686288 0.165002
|
| 110 |
+
vt 0.708556 0.175784
|
| 111 |
+
vt 0.708475 0.175088
|
| 112 |
+
vt 0.721180 0.161788
|
| 113 |
+
vt 0.719512 0.169043
|
| 114 |
+
vt 0.714650 0.174731
|
| 115 |
+
vt 0.711007 0.176048
|
| 116 |
+
vt 0.720186 0.145021
|
| 117 |
+
vt 0.718589 0.144931
|
| 118 |
+
vt 0.714732 0.130671
|
| 119 |
+
vt 0.709411 0.176139
|
| 120 |
+
vt 0.721121 0.143971
|
| 121 |
+
vt 0.721041 0.144667
|
| 122 |
+
vt 0.686288 0.138411
|
| 123 |
+
vt 0.706306 0.138411
|
| 124 |
+
vt 0.706306 0.146951
|
| 125 |
+
vt 0.686288 0.146951
|
| 126 |
+
vt 0.706306 0.155441
|
| 127 |
+
vt 0.686288 0.155441
|
| 128 |
+
vt 0.706306 0.159762
|
| 129 |
+
vt 0.686288 0.159762
|
| 130 |
+
vt 0.714946 0.143614
|
| 131 |
+
vt 0.686288 0.177766
|
| 132 |
+
vt 0.686288 0.170557
|
| 133 |
+
vt 0.706306 0.170557
|
| 134 |
+
vt 0.706306 0.177766
|
| 135 |
+
vt 0.686288 0.161581
|
| 136 |
+
vt 0.706306 0.161581
|
| 137 |
+
vt 0.718732 0.130671
|
| 138 |
+
vt 0.719018 0.136287
|
| 139 |
+
vt 0.710084 0.137925
|
| 140 |
+
vt 0.708416 0.130671
|
| 141 |
+
vt 0.709447 0.168778
|
| 142 |
+
vt 0.709791 0.161788
|
| 143 |
+
vt 0.708408 0.169256
|
| 144 |
+
vt 0.708838 0.161788
|
| 145 |
+
vt 0.707932 0.175020
|
| 146 |
+
vt 0.707041 0.174762
|
| 147 |
+
vt 0.722722 0.161788
|
| 148 |
+
vt 0.720733 0.170191
|
| 149 |
+
vt 0.719979 0.169645
|
| 150 |
+
vt 0.721789 0.161788
|
| 151 |
+
vt 0.708863 0.139073
|
| 152 |
+
vt 0.706874 0.130671
|
| 153 |
+
vt 0.707807 0.130671
|
| 154 |
+
vt 0.709618 0.138527
|
| 155 |
+
vt 0.715051 0.176717
|
| 156 |
+
vt 0.714702 0.175778
|
| 157 |
+
vt 0.719806 0.130670
|
| 158 |
+
vt 0.720149 0.137661
|
| 159 |
+
vt 0.720758 0.130670
|
| 160 |
+
vt 0.721188 0.138138
|
| 161 |
+
vt 0.721665 0.143903
|
| 162 |
+
vt 0.722555 0.143645
|
| 163 |
+
vt 0.714546 0.145599
|
| 164 |
+
vt 0.714894 0.144661
|
| 165 |
+
vt 0.721564 0.145099
|
| 166 |
+
vt 0.720661 0.146046
|
| 167 |
+
vt 0.722312 0.145803
|
| 168 |
+
vt 0.721098 0.146965
|
| 169 |
+
vt 0.708935 0.177163
|
| 170 |
+
vt 0.708032 0.176217
|
| 171 |
+
vt 0.708498 0.178082
|
| 172 |
+
vt 0.707284 0.176921
|
| 173 |
+
vt 0.718902 0.146070
|
| 174 |
+
vt 0.719002 0.147136
|
| 175 |
+
vt 0.710695 0.177187
|
| 176 |
+
vt 0.710594 0.178254
|
| 177 |
+
vt 0.710579 0.156171
|
| 178 |
+
vt 0.686288 0.192510
|
| 179 |
+
vt 0.686288 0.190530
|
| 180 |
+
vt 0.706306 0.190530
|
| 181 |
+
vt 0.706306 0.192510
|
| 182 |
+
vt 0.708556 0.147792
|
| 183 |
+
vt 0.708475 0.148488
|
| 184 |
+
vt 0.719512 0.154534
|
| 185 |
+
vt 0.714650 0.148845
|
| 186 |
+
vt 0.711007 0.147528
|
| 187 |
+
vt 0.720186 0.116320
|
| 188 |
+
vt 0.718589 0.116410
|
| 189 |
+
vt 0.709411 0.147437
|
| 190 |
+
vt 0.721121 0.117370
|
| 191 |
+
vt 0.721041 0.116674
|
| 192 |
+
vt 0.686288 0.129870
|
| 193 |
+
vt 0.706306 0.129870
|
| 194 |
+
vt 0.686288 0.121380
|
| 195 |
+
vt 0.706306 0.121380
|
| 196 |
+
vt 0.686288 0.117059
|
| 197 |
+
vt 0.706306 0.117059
|
| 198 |
+
vt 0.714946 0.117727
|
| 199 |
+
vt 0.706306 0.184974
|
| 200 |
+
vt 0.686288 0.184974
|
| 201 |
+
vt 0.706306 0.193950
|
| 202 |
+
vt 0.686288 0.193950
|
| 203 |
+
vt 0.719018 0.125054
|
| 204 |
+
vt 0.710084 0.123416
|
| 205 |
+
vt 0.706306 0.115240
|
| 206 |
+
vt 0.686288 0.115240
|
| 207 |
+
vt 0.709447 0.154798
|
| 208 |
+
vt 0.708408 0.154321
|
| 209 |
+
vt 0.707932 0.148556
|
| 210 |
+
vt 0.707041 0.148814
|
| 211 |
+
vt 0.719979 0.153931
|
| 212 |
+
vt 0.720733 0.153385
|
| 213 |
+
vt 0.708863 0.122268
|
| 214 |
+
vt 0.709618 0.122814
|
| 215 |
+
vt 0.714702 0.147798
|
| 216 |
+
vt 0.715051 0.146860
|
| 217 |
+
vt 0.720149 0.123680
|
| 218 |
+
vt 0.721188 0.123203
|
| 219 |
+
vt 0.721665 0.117438
|
| 220 |
+
vt 0.722555 0.117696
|
| 221 |
+
vt 0.714546 0.115742
|
| 222 |
+
vt 0.714894 0.116680
|
| 223 |
+
vt 0.720661 0.115295
|
| 224 |
+
vt 0.721564 0.116241
|
| 225 |
+
vt 0.721098 0.114376
|
| 226 |
+
vt 0.722312 0.115538
|
| 227 |
+
vt 0.708032 0.147359
|
| 228 |
+
vt 0.708935 0.146413
|
| 229 |
+
vt 0.707284 0.146655
|
| 230 |
+
vt 0.708498 0.145494
|
| 231 |
+
vt 0.718901 0.115271
|
| 232 |
+
vt 0.719002 0.114205
|
| 233 |
+
vt 0.710695 0.146389
|
| 234 |
+
vt 0.710595 0.145323
|
| 235 |
+
vn 0.0000 -1.0000 -0.0000
|
| 236 |
+
vn -0.3609 -0.1941 -0.9122
|
| 237 |
+
vn -0.3609 0.1941 -0.9122
|
| 238 |
+
vn 0.2092 0.1359 -0.9684
|
| 239 |
+
vn 0.2092 -0.1359 -0.9684
|
| 240 |
+
vn 0.0000 1.0000 -0.0000
|
| 241 |
+
vn -0.0000 -0.1176 0.9931
|
| 242 |
+
vn -0.0000 0.1176 0.9931
|
| 243 |
+
vn -0.5010 0.1369 0.8546
|
| 244 |
+
vn -0.5010 -0.1369 0.8546
|
| 245 |
+
vn -0.8572 0.1847 0.4806
|
| 246 |
+
vn -0.8572 -0.1847 0.4806
|
| 247 |
+
vn -0.9678 0.2183 0.1257
|
| 248 |
+
vn -0.9678 -0.2183 0.1257
|
| 249 |
+
vn 0.0000 -0.2255 -0.9742
|
| 250 |
+
vn 0.2279 -0.1771 -0.9575
|
| 251 |
+
vn 0.2279 0.1771 -0.9575
|
| 252 |
+
vn 0.0000 0.2255 -0.9742
|
| 253 |
+
vn -0.8945 -0.2361 -0.3797
|
| 254 |
+
vn -0.8945 0.2361 -0.3797
|
| 255 |
+
vn 0.0000 -0.9870 -0.1606
|
| 256 |
+
vn 0.0247 -0.9852 -0.1694
|
| 257 |
+
vn 0.1624 -0.6740 -0.7206
|
| 258 |
+
vn 0.0000 -0.7551 -0.6556
|
| 259 |
+
vn 0.0583 -0.9460 -0.3190
|
| 260 |
+
vn 0.1517 -0.5680 -0.8089
|
| 261 |
+
vn -0.4024 -0.5836 0.7053
|
| 262 |
+
vn 0.0000 -0.5393 0.8421
|
| 263 |
+
vn -0.1318 -0.9470 0.2929
|
| 264 |
+
vn 0.0000 -0.9390 0.3440
|
| 265 |
+
vn 0.0000 0.5393 0.8421
|
| 266 |
+
vn -0.4024 0.5836 0.7053
|
| 267 |
+
vn 0.0000 0.9390 0.3440
|
| 268 |
+
vn -0.1318 0.9470 0.2929
|
| 269 |
+
vn -0.6387 -0.6655 0.3863
|
| 270 |
+
vn -0.2030 -0.9669 0.1548
|
| 271 |
+
vn 0.0247 0.9852 -0.1694
|
| 272 |
+
vn -0.0000 0.9870 -0.1606
|
| 273 |
+
vn 0.0000 0.7551 -0.6556
|
| 274 |
+
vn 0.1624 0.6740 -0.7206
|
| 275 |
+
vn 0.0583 0.9460 -0.3190
|
| 276 |
+
vn 0.1517 0.5680 -0.8089
|
| 277 |
+
vn -0.6387 0.6655 0.3863
|
| 278 |
+
vn -0.2030 0.9669 0.1548
|
| 279 |
+
vn -0.1804 0.9821 -0.0543
|
| 280 |
+
vn -0.0951 0.9531 -0.2874
|
| 281 |
+
vn -0.2234 0.6362 -0.7384
|
| 282 |
+
vn -0.6431 0.7203 -0.2600
|
| 283 |
+
vn -0.0951 -0.9531 -0.2874
|
| 284 |
+
vn -0.1804 -0.9821 -0.0543
|
| 285 |
+
vn -0.6431 -0.7203 -0.2600
|
| 286 |
+
vn -0.2234 -0.6362 -0.7384
|
| 287 |
+
vn -0.1858 0.9820 0.0343
|
| 288 |
+
vn -0.6801 0.7265 0.0987
|
| 289 |
+
vn -0.1858 -0.9820 0.0343
|
| 290 |
+
vn -0.6801 -0.7265 0.0987
|
| 291 |
+
vn 0.3609 -0.1941 -0.9122
|
| 292 |
+
vn -0.2092 -0.1359 -0.9684
|
| 293 |
+
vn -0.2092 0.1359 -0.9684
|
| 294 |
+
vn 0.3609 0.1941 -0.9122
|
| 295 |
+
vn 0.5010 -0.1369 0.8546
|
| 296 |
+
vn 0.5010 0.1369 0.8546
|
| 297 |
+
vn 0.8572 -0.1847 0.4806
|
| 298 |
+
vn 0.8572 0.1847 0.4806
|
| 299 |
+
vn 0.9678 -0.2183 0.1257
|
| 300 |
+
vn 0.9678 0.2183 0.1257
|
| 301 |
+
vn -0.2279 0.1771 -0.9575
|
| 302 |
+
vn -0.2279 -0.1771 -0.9575
|
| 303 |
+
vn 0.8945 0.2361 -0.3797
|
| 304 |
+
vn 0.8945 -0.2361 -0.3797
|
| 305 |
+
vn -0.1624 -0.6740 -0.7206
|
| 306 |
+
vn -0.0247 -0.9852 -0.1694
|
| 307 |
+
vn -0.1517 -0.5680 -0.8089
|
| 308 |
+
vn -0.0583 -0.9460 -0.3190
|
| 309 |
+
vn 0.4024 -0.5836 0.7053
|
| 310 |
+
vn 0.1318 -0.9470 0.2929
|
| 311 |
+
vn 0.4024 0.5836 0.7053
|
| 312 |
+
vn 0.1318 0.9470 0.2929
|
| 313 |
+
vn 0.6387 -0.6655 0.3863
|
| 314 |
+
vn 0.2030 -0.9669 0.1548
|
| 315 |
+
vn -0.0247 0.9852 -0.1694
|
| 316 |
+
vn -0.1624 0.6740 -0.7206
|
| 317 |
+
vn -0.0583 0.9460 -0.3190
|
| 318 |
+
vn -0.1517 0.5680 -0.8089
|
| 319 |
+
vn 0.6387 0.6655 0.3863
|
| 320 |
+
vn 0.2030 0.9669 0.1548
|
| 321 |
+
vn 0.1804 0.9821 -0.0543
|
| 322 |
+
vn 0.6431 0.7203 -0.2600
|
| 323 |
+
vn 0.2234 0.6362 -0.7384
|
| 324 |
+
vn 0.0951 0.9531 -0.2874
|
| 325 |
+
vn 0.0951 -0.9531 -0.2874
|
| 326 |
+
vn 0.2234 -0.6362 -0.7384
|
| 327 |
+
vn 0.6431 -0.7203 -0.2600
|
| 328 |
+
vn 0.1804 -0.9821 -0.0543
|
| 329 |
+
vn 0.1858 0.9820 0.0343
|
| 330 |
+
vn 0.6801 0.7265 0.0987
|
| 331 |
+
vn 0.6801 -0.7265 0.0987
|
| 332 |
+
vn 0.1858 -0.9820 0.0343
|
| 333 |
+
usemtl toybox
|
| 334 |
+
s 1
|
| 335 |
+
f 1/1/1 45/2/1 44/3/1
|
| 336 |
+
f 31/4/2 38/5/3 7/6/4 5/7/5
|
| 337 |
+
f 32/8/1 4/9/1 44/3/1
|
| 338 |
+
f 61/10/1 11/11/1 44/3/1
|
| 339 |
+
f 11/11/1 17/12/1 44/3/1
|
| 340 |
+
f 17/12/1 25/13/1 44/3/1
|
| 341 |
+
f 41/14/6 35/15/6 43/16/6
|
| 342 |
+
f 28/17/1 32/8/1 44/3/1
|
| 343 |
+
f 8/18/6 37/19/6 43/16/6
|
| 344 |
+
f 37/19/6 41/14/6 43/16/6
|
| 345 |
+
f 25/13/1 28/17/1 44/3/1
|
| 346 |
+
f 60/20/7 64/21/8 14/22/9 10/23/10
|
| 347 |
+
f 10/23/10 14/22/9 23/24/11 16/25/12
|
| 348 |
+
f 16/25/12 23/24/11 34/26/13 26/27/14
|
| 349 |
+
f 35/15/6 22/28/6 43/16/6
|
| 350 |
+
f 4/9/1 1/1/1 44/3/1
|
| 351 |
+
f 46/29/15 2/30/16 19/31/17 48/32/18
|
| 352 |
+
f 38/5/3 31/4/2 29/33/19 40/34/20
|
| 353 |
+
f 49/35/6 20/36/6 43/16/6
|
| 354 |
+
f 13/37/6 63/38/6 43/16/6
|
| 355 |
+
f 2/30/16 5/7/5 7/6/4 19/31/17
|
| 356 |
+
f 40/34/20 29/33/19 26/27/14 34/26/13
|
| 357 |
+
f 20/36/6 8/18/6 43/16/6
|
| 358 |
+
f 22/28/6 13/37/6 43/16/6
|
| 359 |
+
f 45/2/21 1/1/22 3/39/23 47/40/24
|
| 360 |
+
f 47/40/24 3/39/23 2/41/16 46/42/15
|
| 361 |
+
f 1/1/22 4/9/25 6/43/26 3/39/23
|
| 362 |
+
f 3/39/23 6/43/26 5/44/5 2/41/16
|
| 363 |
+
f 60/45/7 10/46/10 12/47/27 62/48/28
|
| 364 |
+
f 62/48/28 12/47/27 11/11/29 61/10/30
|
| 365 |
+
f 14/49/9 64/50/8 65/51/31 15/52/32
|
| 366 |
+
f 15/52/32 65/51/31 63/38/33 13/37/34
|
| 367 |
+
f 10/46/10 16/53/12 18/54/35 12/47/27
|
| 368 |
+
f 12/47/27 18/54/35 17/12/36 11/11/29
|
| 369 |
+
f 20/36/37 49/35/38 50/55/39 21/56/40
|
| 370 |
+
f 21/56/40 50/55/39 48/57/18 19/58/17
|
| 371 |
+
f 8/18/41 20/36/37 21/56/40 9/59/42
|
| 372 |
+
f 9/59/42 21/56/40 19/58/17 7/60/4
|
| 373 |
+
f 23/61/11 14/49/9 15/52/32 24/62/43
|
| 374 |
+
f 24/62/43 15/52/32 13/37/34 22/28/44
|
| 375 |
+
f 41/14/45 37/19/46 39/63/47 42/64/48
|
| 376 |
+
f 42/64/48 39/63/47 38/65/3 40/66/20
|
| 377 |
+
f 32/8/49 28/17/50 30/67/51 33/68/52
|
| 378 |
+
f 33/68/52 30/67/51 29/69/19 31/70/2
|
| 379 |
+
f 35/15/53 41/14/45 42/64/48 36/71/54
|
| 380 |
+
f 36/71/54 42/64/48 40/66/20 34/72/13
|
| 381 |
+
f 28/17/50 25/13/55 27/73/56 30/67/51
|
| 382 |
+
f 30/67/51 27/73/56 26/74/14 29/69/19
|
| 383 |
+
f 25/13/55 17/12/36 18/54/35 27/73/56
|
| 384 |
+
f 27/73/56 18/54/35 16/53/12 26/74/14
|
| 385 |
+
f 22/28/44 35/15/53 36/71/54 24/62/43
|
| 386 |
+
f 24/62/43 36/71/54 34/72/13 23/61/11
|
| 387 |
+
f 4/9/25 32/8/49 33/68/52 6/43/26
|
| 388 |
+
f 6/43/26 33/68/52 31/70/2 5/44/5
|
| 389 |
+
f 37/19/46 8/18/41 9/59/42 39/63/47
|
| 390 |
+
f 39/63/47 9/59/42 7/60/4 38/65/3
|
| 391 |
+
f 51/75/1 44/3/1 45/2/1
|
| 392 |
+
f 87/76/57 55/77/58 57/78/59 94/79/60
|
| 393 |
+
f 88/80/1 44/3/1 54/81/1
|
| 394 |
+
f 61/10/1 44/3/1 67/82/1
|
| 395 |
+
f 67/82/1 44/3/1 73/83/1
|
| 396 |
+
f 73/83/1 44/3/1 81/84/1
|
| 397 |
+
f 97/85/6 43/16/6 91/86/6
|
| 398 |
+
f 84/87/1 44/3/1 88/80/1
|
| 399 |
+
f 58/88/6 43/16/6 93/89/6
|
| 400 |
+
f 93/89/6 43/16/6 97/85/6
|
| 401 |
+
f 81/84/1 44/3/1 84/87/1
|
| 402 |
+
f 60/20/7 66/90/61 70/91/62 64/21/8
|
| 403 |
+
f 66/90/61 72/92/63 79/93/64 70/91/62
|
| 404 |
+
f 72/92/63 82/94/65 90/95/66 79/93/64
|
| 405 |
+
f 91/86/6 43/16/6 78/96/6
|
| 406 |
+
f 54/81/1 44/3/1 51/75/1
|
| 407 |
+
f 46/29/15 48/32/18 75/97/67 52/98/68
|
| 408 |
+
f 94/79/60 96/99/69 85/100/70 87/76/57
|
| 409 |
+
f 49/35/6 43/16/6 76/101/6
|
| 410 |
+
f 69/102/6 43/16/6 63/38/6
|
| 411 |
+
f 52/98/68 75/97/67 57/78/59 55/77/58
|
| 412 |
+
f 96/103/69 90/95/66 82/94/65 85/104/70
|
| 413 |
+
f 76/101/6 43/16/6 58/88/6
|
| 414 |
+
f 78/96/6 43/16/6 69/102/6
|
| 415 |
+
f 45/2/21 47/40/24 53/105/71 51/75/72
|
| 416 |
+
f 47/40/24 46/42/15 52/106/68 53/105/71
|
| 417 |
+
f 51/75/72 53/105/71 56/107/73 54/81/74
|
| 418 |
+
f 53/105/71 52/106/68 55/108/58 56/107/73
|
| 419 |
+
f 60/45/7 62/48/28 68/109/75 66/110/61
|
| 420 |
+
f 62/48/28 61/10/30 67/82/76 68/109/75
|
| 421 |
+
f 70/111/62 71/112/77 65/51/31 64/50/8
|
| 422 |
+
f 71/112/77 69/102/78 63/38/33 65/51/31
|
| 423 |
+
f 66/110/61 68/109/75 74/113/79 72/114/63
|
| 424 |
+
f 68/109/75 67/82/76 73/83/80 74/113/79
|
| 425 |
+
f 76/101/81 77/115/82 50/55/39 49/35/38
|
| 426 |
+
f 77/115/82 75/116/67 48/57/18 50/55/39
|
| 427 |
+
f 58/88/83 59/117/84 77/115/82 76/101/81
|
| 428 |
+
f 59/117/84 57/118/59 75/116/67 77/115/82
|
| 429 |
+
f 79/119/64 80/120/85 71/112/77 70/111/62
|
| 430 |
+
f 80/120/85 78/96/86 69/102/78 71/112/77
|
| 431 |
+
f 97/85/87 98/121/88 95/122/89 93/89/90
|
| 432 |
+
f 98/121/88 96/123/69 94/124/60 95/122/89
|
| 433 |
+
f 88/80/91 89/125/92 86/126/93 84/87/94
|
| 434 |
+
f 89/125/92 87/127/57 85/128/70 86/126/93
|
| 435 |
+
f 91/86/95 92/129/96 98/121/88 97/85/87
|
| 436 |
+
f 92/129/96 90/130/66 96/123/69 98/121/88
|
| 437 |
+
f 84/87/94 86/126/93 83/131/97 81/84/98
|
| 438 |
+
f 86/126/93 85/128/70 82/132/65 83/131/97
|
| 439 |
+
f 81/84/98 83/131/97 74/113/79 73/83/80
|
| 440 |
+
f 83/131/97 82/132/65 72/114/63 74/113/79
|
| 441 |
+
f 78/96/86 80/120/85 92/129/96 91/86/95
|
| 442 |
+
f 80/120/85 79/119/64 90/130/66 92/129/96
|
| 443 |
+
f 54/81/74 56/107/73 89/125/92 88/80/91
|
| 444 |
+
f 56/107/73 55/108/58 87/127/57 89/125/92
|
| 445 |
+
f 93/89/90 95/122/89 59/117/84 58/88/83
|
| 446 |
+
f 95/122/89 94/124/60 57/118/59 59/117/84
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/pentagon.obj
ADDED
|
@@ -0,0 +1,419 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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# Blender v2.92.0 OBJ File: ''
|
| 2 |
+
# www.blender.org
|
| 3 |
+
mtllib pentagon.mtl
|
| 4 |
+
o pentagon_yellow_block_Cube.003
|
| 5 |
+
v -0.000000 0.000000 -0.001329
|
| 6 |
+
v -0.000000 0.038100 -0.001329
|
| 7 |
+
v -0.010789 0.000000 0.015873
|
| 8 |
+
v -0.011940 0.002032 0.017708
|
| 9 |
+
v -0.011603 0.000595 0.017170
|
| 10 |
+
v -0.014201 0.002032 0.016092
|
| 11 |
+
v -0.012833 0.000000 0.014413
|
| 12 |
+
v -0.013800 0.000595 0.015600
|
| 13 |
+
v -0.013310 0.002032 0.017235
|
| 14 |
+
v -0.012029 0.000000 0.015448
|
| 15 |
+
v -0.012935 0.000595 0.016711
|
| 16 |
+
v -0.012833 0.038100 0.014413
|
| 17 |
+
v -0.014201 0.036068 0.016092
|
| 18 |
+
v -0.013800 0.037505 0.015600
|
| 19 |
+
v -0.011940 0.036068 0.017708
|
| 20 |
+
v -0.010789 0.038100 0.015873
|
| 21 |
+
v -0.011603 0.037505 0.017170
|
| 22 |
+
v -0.012029 0.038100 0.015448
|
| 23 |
+
v -0.013310 0.036068 0.017235
|
| 24 |
+
v -0.012935 0.037505 0.016711
|
| 25 |
+
v -0.020074 0.000000 -0.006755
|
| 26 |
+
v -0.022213 0.002032 -0.007333
|
| 27 |
+
v -0.021586 0.000595 -0.007164
|
| 28 |
+
v -0.021345 0.002032 -0.009898
|
| 29 |
+
v -0.019288 0.000000 -0.009072
|
| 30 |
+
v -0.020743 0.000595 -0.009656
|
| 31 |
+
v -0.022188 0.002032 -0.008754
|
| 32 |
+
v -0.020054 0.000000 -0.008040
|
| 33 |
+
v -0.021563 0.000595 -0.008545
|
| 34 |
+
v -0.019288 0.038100 -0.009072
|
| 35 |
+
v -0.021345 0.036068 -0.009898
|
| 36 |
+
v -0.020743 0.037505 -0.009656
|
| 37 |
+
v -0.022213 0.036068 -0.007333
|
| 38 |
+
v -0.020074 0.038100 -0.006755
|
| 39 |
+
v -0.021586 0.037505 -0.007164
|
| 40 |
+
v -0.022188 0.036068 -0.008754
|
| 41 |
+
v -0.020054 0.038100 -0.008040
|
| 42 |
+
v -0.021563 0.037505 -0.008545
|
| 43 |
+
v 0.012833 0.000000 0.014413
|
| 44 |
+
v 0.014201 0.002032 0.016092
|
| 45 |
+
v 0.013800 0.000595 0.015600
|
| 46 |
+
v 0.011940 0.002032 0.017708
|
| 47 |
+
v 0.010789 0.000000 0.015873
|
| 48 |
+
v 0.011603 0.000595 0.017170
|
| 49 |
+
v 0.012029 0.000000 0.015448
|
| 50 |
+
v 0.013310 0.002032 0.017235
|
| 51 |
+
v 0.012935 0.000595 0.016711
|
| 52 |
+
v 0.010789 0.038100 0.015873
|
| 53 |
+
v 0.011940 0.036068 0.017708
|
| 54 |
+
v 0.011603 0.037505 0.017170
|
| 55 |
+
v 0.014201 0.036068 0.016092
|
| 56 |
+
v 0.012833 0.038100 0.014413
|
| 57 |
+
v 0.013800 0.037505 0.015600
|
| 58 |
+
v 0.013310 0.036068 0.017235
|
| 59 |
+
v 0.012029 0.038100 0.015448
|
| 60 |
+
v 0.012935 0.037505 0.016711
|
| 61 |
+
v 0.019288 0.000000 -0.009072
|
| 62 |
+
v 0.021345 0.002032 -0.009898
|
| 63 |
+
v 0.020743 0.000595 -0.009656
|
| 64 |
+
v 0.022213 0.002032 -0.007333
|
| 65 |
+
v 0.020074 0.000000 -0.006755
|
| 66 |
+
v 0.021586 0.000595 -0.007164
|
| 67 |
+
v 0.022188 0.002032 -0.008754
|
| 68 |
+
v 0.020054 0.000000 -0.008040
|
| 69 |
+
v 0.021563 0.000595 -0.008545
|
| 70 |
+
v 0.020074 0.038100 -0.006755
|
| 71 |
+
v 0.022213 0.036068 -0.007333
|
| 72 |
+
v 0.021586 0.037505 -0.007164
|
| 73 |
+
v 0.021345 0.036068 -0.009898
|
| 74 |
+
v 0.019288 0.038100 -0.009072
|
| 75 |
+
v 0.020743 0.037505 -0.009656
|
| 76 |
+
v 0.022188 0.036068 -0.008754
|
| 77 |
+
v 0.020054 0.038100 -0.008040
|
| 78 |
+
v 0.021563 0.037505 -0.008545
|
| 79 |
+
v 0.001283 0.038100 -0.021099
|
| 80 |
+
v 0.001420 0.036068 -0.023214
|
| 81 |
+
v 0.001380 0.037505 -0.022595
|
| 82 |
+
v -0.001420 0.036068 -0.023214
|
| 83 |
+
v -0.001283 0.038100 -0.021099
|
| 84 |
+
v -0.001380 0.037505 -0.022595
|
| 85 |
+
v 0.000000 0.036068 -0.023607
|
| 86 |
+
v -0.000000 0.038100 -0.021456
|
| 87 |
+
v -0.000000 0.037505 -0.022977
|
| 88 |
+
v -0.001283 0.000000 -0.021099
|
| 89 |
+
v -0.001420 0.002032 -0.023214
|
| 90 |
+
v -0.001380 0.000595 -0.022595
|
| 91 |
+
v 0.001420 0.002032 -0.023214
|
| 92 |
+
v 0.001283 0.000000 -0.021099
|
| 93 |
+
v 0.001380 0.000595 -0.022595
|
| 94 |
+
v -0.000000 0.000000 -0.021456
|
| 95 |
+
v 0.000000 0.002032 -0.023607
|
| 96 |
+
v -0.000000 0.000595 -0.022977
|
| 97 |
+
vt 0.718822 0.029303
|
| 98 |
+
vt 0.730852 0.033346
|
| 99 |
+
vt 0.721614 0.040891
|
| 100 |
+
vt 0.709480 0.040139
|
| 101 |
+
vt 0.717419 0.029729
|
| 102 |
+
vt 0.717181 0.051685
|
| 103 |
+
vt 0.709481 0.041565
|
| 104 |
+
vt 0.686374 0.033371
|
| 105 |
+
vt 0.706477 0.033371
|
| 106 |
+
vt 0.706477 0.034211
|
| 107 |
+
vt 0.686374 0.034211
|
| 108 |
+
vt 0.731711 0.034535
|
| 109 |
+
vt 0.731731 0.047644
|
| 110 |
+
vt 0.732155 0.013538
|
| 111 |
+
vt 0.732386 0.014251
|
| 112 |
+
vt 0.720023 0.014212
|
| 113 |
+
vt 0.724218 0.025374
|
| 114 |
+
vt 0.723581 0.025796
|
| 115 |
+
vt 0.731459 0.033813
|
| 116 |
+
vt 0.686374 0.065488
|
| 117 |
+
vt 0.706477 0.065488
|
| 118 |
+
vt 0.706477 0.066344
|
| 119 |
+
vt 0.686374 0.066344
|
| 120 |
+
vt 0.730865 0.048779
|
| 121 |
+
vt 0.718604 0.052165
|
| 122 |
+
vt 0.717826 0.052123
|
| 123 |
+
vt 0.710784 0.021757
|
| 124 |
+
vt 0.710178 0.021290
|
| 125 |
+
vt 0.706477 0.050528
|
| 126 |
+
vt 0.686374 0.050528
|
| 127 |
+
vt 0.686374 0.049672
|
| 128 |
+
vt 0.706477 0.049672
|
| 129 |
+
vt 0.709250 0.040852
|
| 130 |
+
vt 0.718055 0.029306
|
| 131 |
+
vt 0.686374 0.051384
|
| 132 |
+
vt 0.706477 0.051384
|
| 133 |
+
vt 0.686374 0.035050
|
| 134 |
+
vt 0.706477 0.035050
|
| 135 |
+
vt 0.686374 0.019217
|
| 136 |
+
vt 0.706477 0.019217
|
| 137 |
+
vt 0.731482 0.048351
|
| 138 |
+
vt 0.709906 0.007458
|
| 139 |
+
vt 0.710155 0.006751
|
| 140 |
+
vt 0.686374 0.003322
|
| 141 |
+
vt 0.706477 0.003322
|
| 142 |
+
vt 0.706477 0.017476
|
| 143 |
+
vt 0.686374 0.017476
|
| 144 |
+
vt 0.706477 0.081821
|
| 145 |
+
vt 0.686374 0.081821
|
| 146 |
+
vt 0.686374 0.067199
|
| 147 |
+
vt 0.706477 0.067199
|
| 148 |
+
vt 0.723811 0.002980
|
| 149 |
+
vt 0.724455 0.003418
|
| 150 |
+
vt 0.706477 0.082661
|
| 151 |
+
vt 0.686374 0.082661
|
| 152 |
+
vt 0.686374 0.002483
|
| 153 |
+
vt 0.706477 0.002483
|
| 154 |
+
vt 0.732157 0.014964
|
| 155 |
+
vt 0.723033 0.002938
|
| 156 |
+
vt 0.722814 0.025800
|
| 157 |
+
vt 0.686374 0.018347
|
| 158 |
+
vt 0.706477 0.018347
|
| 159 |
+
vt 0.709926 0.020568
|
| 160 |
+
vt 0.710771 0.006324
|
| 161 |
+
vt 0.733509 0.048629
|
| 162 |
+
vt 0.733072 0.049555
|
| 163 |
+
vt 0.732273 0.048949
|
| 164 |
+
vt 0.732572 0.048190
|
| 165 |
+
vt 0.732296 0.050225
|
| 166 |
+
vt 0.731620 0.049441
|
| 167 |
+
vt 0.734168 0.013254
|
| 168 |
+
vt 0.734379 0.014256
|
| 169 |
+
vt 0.733377 0.014254
|
| 170 |
+
vt 0.733156 0.013468
|
| 171 |
+
vt 0.734166 0.015257
|
| 172 |
+
vt 0.733156 0.015039
|
| 173 |
+
vt 0.707468 0.041849
|
| 174 |
+
vt 0.707257 0.040847
|
| 175 |
+
vt 0.708259 0.040849
|
| 176 |
+
vt 0.708480 0.041634
|
| 177 |
+
vt 0.707471 0.039846
|
| 178 |
+
vt 0.708480 0.040063
|
| 179 |
+
vt 0.708128 0.006474
|
| 180 |
+
vt 0.708564 0.005547
|
| 181 |
+
vt 0.709364 0.006153
|
| 182 |
+
vt 0.709064 0.006913
|
| 183 |
+
vt 0.709341 0.004877
|
| 184 |
+
vt 0.710016 0.005662
|
| 185 |
+
vt 0.731599 0.032714
|
| 186 |
+
vt 0.732251 0.033244
|
| 187 |
+
vt 0.732301 0.031933
|
| 188 |
+
vt 0.733073 0.032652
|
| 189 |
+
vt 0.723869 0.026728
|
| 190 |
+
vt 0.723033 0.026764
|
| 191 |
+
vt 0.724166 0.027687
|
| 192 |
+
vt 0.723129 0.027790
|
| 193 |
+
vt 0.732546 0.034029
|
| 194 |
+
vt 0.733509 0.033612
|
| 195 |
+
vt 0.724576 0.026281
|
| 196 |
+
vt 0.725089 0.027190
|
| 197 |
+
vt 0.710038 0.022388
|
| 198 |
+
vt 0.709386 0.021859
|
| 199 |
+
vt 0.709336 0.023170
|
| 200 |
+
vt 0.708563 0.022451
|
| 201 |
+
vt 0.717767 0.028375
|
| 202 |
+
vt 0.718604 0.028339
|
| 203 |
+
vt 0.717470 0.027416
|
| 204 |
+
vt 0.718508 0.027313
|
| 205 |
+
vt 0.709090 0.021074
|
| 206 |
+
vt 0.708128 0.021490
|
| 207 |
+
vt 0.717060 0.028822
|
| 208 |
+
vt 0.716547 0.027913
|
| 209 |
+
vt 0.723265 0.002005
|
| 210 |
+
vt 0.724118 0.002071
|
| 211 |
+
vt 0.723385 0.000970
|
| 212 |
+
vt 0.724440 0.001117
|
| 213 |
+
vt 0.717519 0.053032
|
| 214 |
+
vt 0.716801 0.052568
|
| 215 |
+
vt 0.717197 0.053986
|
| 216 |
+
vt 0.716269 0.053464
|
| 217 |
+
vt 0.724836 0.002535
|
| 218 |
+
vt 0.725367 0.001639
|
| 219 |
+
vt 0.718372 0.053098
|
| 220 |
+
vt 0.718251 0.054133
|
| 221 |
+
vn 0.0000 -1.0000 0.0000
|
| 222 |
+
vn -0.6839 0.1913 -0.7040
|
| 223 |
+
vn -0.6839 -0.1913 -0.7040
|
| 224 |
+
vn -0.9271 -0.2054 -0.3134
|
| 225 |
+
vn -0.9271 0.2054 -0.3134
|
| 226 |
+
vn 0.0000 1.0000 -0.0000
|
| 227 |
+
vn 0.1696 0.1897 0.9671
|
| 228 |
+
vn 0.1696 -0.1897 0.9671
|
| 229 |
+
vn 0.5696 -0.2019 0.7968
|
| 230 |
+
vn 0.5696 0.2019 0.7968
|
| 231 |
+
vn -0.5696 -0.2019 0.7968
|
| 232 |
+
vn -0.5696 0.2019 0.7968
|
| 233 |
+
vn -0.8602 0.1898 0.4734
|
| 234 |
+
vn -0.8602 -0.1898 0.4734
|
| 235 |
+
vn -0.1696 0.1897 0.9671
|
| 236 |
+
vn -0.1696 -0.1897 0.9671
|
| 237 |
+
vn -0.9708 0.1916 0.1446
|
| 238 |
+
vn -0.9708 -0.1916 0.1446
|
| 239 |
+
vn -0.4034 0.1878 -0.8955
|
| 240 |
+
vn -0.4034 -0.1878 -0.8955
|
| 241 |
+
vn 0.6839 0.1913 -0.7040
|
| 242 |
+
vn 0.6839 -0.1913 -0.7040
|
| 243 |
+
vn 0.4034 -0.1878 -0.8955
|
| 244 |
+
vn 0.4034 0.1878 -0.8955
|
| 245 |
+
vn 0.9708 -0.1916 0.1446
|
| 246 |
+
vn 0.9708 0.1916 0.1446
|
| 247 |
+
vn 0.8602 0.1898 0.4734
|
| 248 |
+
vn 0.8602 -0.1898 0.4734
|
| 249 |
+
vn 0.9271 -0.2054 -0.3134
|
| 250 |
+
vn 0.9271 0.2054 -0.3134
|
| 251 |
+
vn 0.0000 0.1985 -0.9801
|
| 252 |
+
vn 0.0000 -0.1985 -0.9801
|
| 253 |
+
vn -0.6793 -0.6969 -0.2300
|
| 254 |
+
vn -0.7180 -0.6862 0.1166
|
| 255 |
+
vn -0.2003 -0.9774 -0.0681
|
| 256 |
+
vn -0.2163 -0.9753 0.0454
|
| 257 |
+
vn -0.5001 -0.6857 -0.5289
|
| 258 |
+
vn -0.1444 -0.9752 -0.1679
|
| 259 |
+
vn -0.6793 0.6969 -0.2300
|
| 260 |
+
vn -0.5001 0.6857 -0.5289
|
| 261 |
+
vn -0.2003 0.9774 -0.0681
|
| 262 |
+
vn -0.1444 0.9752 -0.1679
|
| 263 |
+
vn -0.7180 0.6862 0.1166
|
| 264 |
+
vn -0.2163 0.9753 0.0454
|
| 265 |
+
vn 0.6793 -0.6969 -0.2300
|
| 266 |
+
vn 0.5001 -0.6857 -0.5289
|
| 267 |
+
vn 0.2003 -0.9774 -0.0681
|
| 268 |
+
vn 0.1444 -0.9752 -0.1679
|
| 269 |
+
vn 0.7180 -0.6862 0.1166
|
| 270 |
+
vn 0.2163 -0.9753 0.0454
|
| 271 |
+
vn 0.6793 0.6969 -0.2300
|
| 272 |
+
vn 0.7180 0.6862 0.1166
|
| 273 |
+
vn 0.2003 0.9774 -0.0681
|
| 274 |
+
vn 0.2163 0.9753 0.0454
|
| 275 |
+
vn 0.5001 0.6857 -0.5289
|
| 276 |
+
vn 0.1444 0.9752 -0.1679
|
| 277 |
+
vn -0.1241 -0.9769 0.1739
|
| 278 |
+
vn -0.0267 -0.9752 0.2199
|
| 279 |
+
vn -0.1178 -0.6841 0.7198
|
| 280 |
+
vn -0.4189 -0.6935 0.5862
|
| 281 |
+
vn -0.0267 0.9752 0.2199
|
| 282 |
+
vn -0.1242 0.9769 0.1739
|
| 283 |
+
vn -0.4189 0.6935 0.5862
|
| 284 |
+
vn -0.1178 0.6841 0.7198
|
| 285 |
+
vn -0.1992 -0.9752 0.0965
|
| 286 |
+
vn -0.6427 -0.6843 0.3444
|
| 287 |
+
vn -0.1992 0.9752 0.0965
|
| 288 |
+
vn -0.6427 0.6843 0.3444
|
| 289 |
+
vn 0.1242 0.9769 0.1739
|
| 290 |
+
vn 0.0267 0.9752 0.2199
|
| 291 |
+
vn 0.1178 0.6841 0.7198
|
| 292 |
+
vn 0.4189 0.6935 0.5862
|
| 293 |
+
vn 0.0267 -0.9752 0.2199
|
| 294 |
+
vn 0.1241 -0.9769 0.1739
|
| 295 |
+
vn 0.4189 -0.6935 0.5862
|
| 296 |
+
vn 0.1178 -0.6841 0.7198
|
| 297 |
+
vn 0.1992 0.9752 0.0965
|
| 298 |
+
vn 0.6427 0.6843 0.3444
|
| 299 |
+
vn 0.1992 -0.9752 0.0965
|
| 300 |
+
vn 0.6427 -0.6843 0.3444
|
| 301 |
+
vn -0.0000 0.9764 -0.2159
|
| 302 |
+
vn 0.1005 0.9750 -0.1981
|
| 303 |
+
vn 0.3067 0.6821 -0.6638
|
| 304 |
+
vn -0.0000 0.6900 -0.7238
|
| 305 |
+
vn 0.1005 -0.9750 -0.1981
|
| 306 |
+
vn 0.0000 -0.9764 -0.2159
|
| 307 |
+
vn 0.0000 -0.6900 -0.7238
|
| 308 |
+
vn 0.3067 -0.6821 -0.6638
|
| 309 |
+
vn -0.1005 0.9750 -0.1981
|
| 310 |
+
vn -0.3067 0.6821 -0.6638
|
| 311 |
+
vn -0.1005 -0.9750 -0.1981
|
| 312 |
+
vn -0.3067 -0.6821 -0.6638
|
| 313 |
+
usemtl toybox
|
| 314 |
+
s 1
|
| 315 |
+
f 43/1/1 3/2/1 1/3/1
|
| 316 |
+
f 61/4/1 39/5/1 1/3/1
|
| 317 |
+
f 88/6/1 57/7/1 1/3/1
|
| 318 |
+
f 31/8/2 24/9/3 27/10/4 36/11/5
|
| 319 |
+
f 7/12/1 21/13/1 1/3/1
|
| 320 |
+
f 30/14/6 37/15/6 2/16/6
|
| 321 |
+
f 12/17/6 18/18/6 2/16/6
|
| 322 |
+
f 10/19/1 7/12/1 1/3/1
|
| 323 |
+
f 49/20/7 42/21/8 46/22/9 54/23/10
|
| 324 |
+
f 25/24/1 84/25/1 1/3/1
|
| 325 |
+
f 90/26/1 88/6/1 1/3/1
|
| 326 |
+
f 3/2/1 10/19/1 1/3/1
|
| 327 |
+
f 48/27/6 55/28/6 2/16/6
|
| 328 |
+
f 9/29/11 19/30/12 13/31/13 6/32/14
|
| 329 |
+
f 64/33/1 61/4/1 1/3/1
|
| 330 |
+
f 39/5/1 45/34/1 1/3/1
|
| 331 |
+
f 42/21/8 49/20/7 15/35/15 4/36/16
|
| 332 |
+
f 6/32/14 13/31/13 33/37/17 22/38/18
|
| 333 |
+
f 24/9/3 31/8/2 78/39/19 85/40/20
|
| 334 |
+
f 21/13/1 28/41/1 1/3/1
|
| 335 |
+
f 66/42/6 73/43/6 2/16/6
|
| 336 |
+
f 69/44/21 58/45/22 87/46/23 76/47/24
|
| 337 |
+
f 45/34/1 43/1/1 1/3/1
|
| 338 |
+
f 60/48/25 67/49/26 51/50/27 40/51/28
|
| 339 |
+
f 82/52/6 79/53/6 2/16/6
|
| 340 |
+
f 84/25/1 90/26/1 1/3/1
|
| 341 |
+
f 67/49/26 60/48/25 63/54/29 72/55/30
|
| 342 |
+
f 28/41/1 25/24/1 1/3/1
|
| 343 |
+
f 72/56/30 63/57/29 58/45/22 69/44/21
|
| 344 |
+
f 37/15/6 34/58/6 2/16/6
|
| 345 |
+
f 79/53/6 30/14/6 2/16/6
|
| 346 |
+
f 75/59/6 82/52/6 2/16/6
|
| 347 |
+
f 18/18/6 16/60/6 2/16/6
|
| 348 |
+
f 54/23/10 46/22/9 40/51/28 51/50/27
|
| 349 |
+
f 81/61/31 91/62/32 85/40/20 78/39/19
|
| 350 |
+
f 16/60/6 48/27/6 2/16/6
|
| 351 |
+
f 52/63/6 66/42/6 2/16/6
|
| 352 |
+
f 36/11/5 27/10/4 22/38/18 33/37/17
|
| 353 |
+
f 73/43/6 70/64/6 2/16/6
|
| 354 |
+
f 57/7/1 64/33/1 1/3/1
|
| 355 |
+
f 70/64/6 75/59/6 2/16/6
|
| 356 |
+
f 34/58/6 12/17/6 2/16/6
|
| 357 |
+
f 76/47/24 87/46/23 91/62/32 81/61/31
|
| 358 |
+
f 55/28/6 52/63/6 2/16/6
|
| 359 |
+
f 22/65/18 27/66/4 29/67/33 23/68/34
|
| 360 |
+
f 23/68/34 29/67/33 28/41/35 21/13/36
|
| 361 |
+
f 27/66/4 24/69/3 26/70/37 29/67/33
|
| 362 |
+
f 29/67/33 26/70/37 25/24/38 28/41/35
|
| 363 |
+
f 31/71/2 36/72/5 38/73/39 32/74/40
|
| 364 |
+
f 32/74/40 38/73/39 37/15/41 30/14/42
|
| 365 |
+
f 36/72/5 33/75/17 35/76/43 38/73/39
|
| 366 |
+
f 38/73/39 35/76/43 34/58/44 37/15/41
|
| 367 |
+
f 58/77/22 63/78/29 65/79/45 59/80/46
|
| 368 |
+
f 59/80/46 65/79/45 64/33/47 57/7/48
|
| 369 |
+
f 63/78/29 60/81/25 62/82/49 65/79/45
|
| 370 |
+
f 65/79/45 62/82/49 61/4/50 64/33/47
|
| 371 |
+
f 67/83/26 72/84/30 74/85/51 68/86/52
|
| 372 |
+
f 68/86/52 74/85/51 73/43/53 66/42/54
|
| 373 |
+
f 72/84/30 69/87/21 71/88/55 74/85/51
|
| 374 |
+
f 74/85/51 71/88/55 70/64/56 73/43/53
|
| 375 |
+
f 10/19/57 3/2/58 5/89/59 11/90/60
|
| 376 |
+
f 11/90/60 5/89/59 4/91/16 9/92/11
|
| 377 |
+
f 16/60/61 18/18/62 20/93/63 17/94/64
|
| 378 |
+
f 17/94/64 20/93/63 19/95/12 15/96/15
|
| 379 |
+
f 7/12/65 10/19/57 11/90/60 8/97/66
|
| 380 |
+
f 8/97/66 11/90/60 9/92/11 6/98/14
|
| 381 |
+
f 18/18/62 12/17/67 14/99/68 20/93/63
|
| 382 |
+
f 20/93/63 14/99/68 13/100/13 19/95/12
|
| 383 |
+
f 55/28/69 48/27/70 50/101/71 56/102/72
|
| 384 |
+
f 56/102/72 50/101/71 49/103/7 54/104/10
|
| 385 |
+
f 43/1/73 45/34/74 47/105/75 44/106/76
|
| 386 |
+
f 44/106/76 47/105/75 46/107/9 42/108/8
|
| 387 |
+
f 52/63/77 55/28/69 56/102/72 53/109/78
|
| 388 |
+
f 53/109/78 56/102/72 54/104/10 51/110/27
|
| 389 |
+
f 45/34/74 39/5/79 41/111/80 47/105/75
|
| 390 |
+
f 47/105/75 41/111/80 40/112/28 46/107/9
|
| 391 |
+
f 82/52/81 75/59/82 77/113/83 83/114/84
|
| 392 |
+
f 83/114/84 77/113/83 76/115/24 81/116/31
|
| 393 |
+
f 88/6/85 90/26/86 92/117/87 89/118/88
|
| 394 |
+
f 89/118/88 92/117/87 91/119/32 87/120/23
|
| 395 |
+
f 79/53/89 82/52/81 83/114/84 80/121/90
|
| 396 |
+
f 80/121/90 83/114/84 81/116/31 78/122/19
|
| 397 |
+
f 90/26/86 84/25/91 86/123/92 92/117/87
|
| 398 |
+
f 92/117/87 86/123/92 85/124/20 91/119/32
|
| 399 |
+
f 6/98/14 22/65/18 23/68/34 8/97/66
|
| 400 |
+
f 8/97/66 23/68/34 21/13/36 7/12/65
|
| 401 |
+
f 60/81/25 40/112/28 41/111/80 62/82/49
|
| 402 |
+
f 62/82/49 41/111/80 39/5/79 61/4/50
|
| 403 |
+
f 42/108/8 4/91/16 5/89/59 44/106/76
|
| 404 |
+
f 44/106/76 5/89/59 3/2/58 43/1/73
|
| 405 |
+
f 12/17/67 34/58/44 35/76/43 14/99/68
|
| 406 |
+
f 14/99/68 35/76/43 33/75/17 13/100/13
|
| 407 |
+
f 48/27/70 16/60/61 17/94/64 50/101/71
|
| 408 |
+
f 50/101/71 17/94/64 15/96/15 49/103/7
|
| 409 |
+
f 51/110/27 67/83/26 68/86/52 53/109/78
|
| 410 |
+
f 53/109/78 68/86/52 66/42/54 52/63/77
|
| 411 |
+
f 84/25/91 25/24/38 26/70/37 86/123/92
|
| 412 |
+
f 86/123/92 26/70/37 24/69/3 85/124/20
|
| 413 |
+
f 30/14/42 79/53/89 80/121/90 32/74/40
|
| 414 |
+
f 32/74/40 80/121/90 78/122/19 31/71/2
|
| 415 |
+
f 87/120/23 58/77/22 59/80/46 89/118/88
|
| 416 |
+
f 89/118/88 59/80/46 57/7/48 88/6/85
|
| 417 |
+
f 69/87/21 76/115/24 77/113/83 71/88/55
|
| 418 |
+
f 71/88/55 77/113/83 75/59/82 70/64/56
|
| 419 |
+
f 4/36/16 15/35/15 19/30/12 9/29/11
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/red_moon.urdf
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" ?>
|
| 2 |
+
<robot name="red_moon.urdf">
|
| 3 |
+
<link name="baseLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="0.5"/>
|
| 6 |
+
<rolling_friction value="0.0001"/>
|
| 7 |
+
<inertia_scaling value="1.0"/>
|
| 8 |
+
</contact>
|
| 9 |
+
<inertial>
|
| 10 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 11 |
+
<mass value=".01"/>
|
| 12 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 13 |
+
</inertial>
|
| 14 |
+
<visual>
|
| 15 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 16 |
+
<geometry>
|
| 17 |
+
<mesh filename="moon.obj" scale="1.0 1.0 1.0"/>
|
| 18 |
+
</geometry>
|
| 19 |
+
<material name="red">
|
| 20 |
+
<color rgba="1 0.4 0.4 1"/>
|
| 21 |
+
</material>
|
| 22 |
+
</visual>
|
| 23 |
+
<collision>
|
| 24 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 25 |
+
<geometry>
|
| 26 |
+
<mesh filename="moon.obj" scale="1.0 1.0 1.0"/>
|
| 27 |
+
</geometry>
|
| 28 |
+
</collision>
|
| 29 |
+
</link>
|
| 30 |
+
</robot>
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/star.obj
ADDED
|
@@ -0,0 +1,689 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Blender v2.92.0 OBJ File: ''
|
| 2 |
+
# www.blender.org
|
| 3 |
+
mtllib star.mtl
|
| 4 |
+
o star_green_block_star0_block
|
| 5 |
+
v -0.000030 0.000000 0.001549
|
| 6 |
+
v -0.000030 0.038100 0.001549
|
| 7 |
+
v 0.006429 0.000000 -0.009092
|
| 8 |
+
v 0.007380 0.002032 -0.010659
|
| 9 |
+
v 0.007101 0.000595 -0.010200
|
| 10 |
+
v 0.009909 0.002032 -0.008940
|
| 11 |
+
v 0.008636 0.000000 -0.007597
|
| 12 |
+
v 0.009536 0.000595 -0.008547
|
| 13 |
+
v 0.008636 0.038100 -0.007597
|
| 14 |
+
v 0.009909 0.036068 -0.008940
|
| 15 |
+
v 0.009536 0.037505 -0.008547
|
| 16 |
+
v 0.007380 0.036068 -0.010659
|
| 17 |
+
v 0.006429 0.038100 -0.009092
|
| 18 |
+
v 0.007101 0.037505 -0.010200
|
| 19 |
+
v -0.006436 0.038100 -0.009091
|
| 20 |
+
v -0.007380 0.036068 -0.010659
|
| 21 |
+
v -0.007103 0.037505 -0.010200
|
| 22 |
+
v -0.009909 0.036068 -0.008940
|
| 23 |
+
v -0.008642 0.038100 -0.007595
|
| 24 |
+
v -0.009538 0.037505 -0.008546
|
| 25 |
+
v -0.008642 0.000000 -0.007595
|
| 26 |
+
v -0.009909 0.002032 -0.008940
|
| 27 |
+
v -0.009538 0.000595 -0.008546
|
| 28 |
+
v -0.007380 0.002032 -0.010659
|
| 29 |
+
v -0.006436 0.000000 -0.009091
|
| 30 |
+
v -0.007103 0.000595 -0.010200
|
| 31 |
+
v -0.011672 0.000000 0.006854
|
| 32 |
+
v -0.013354 0.002032 0.007620
|
| 33 |
+
v -0.012861 0.000595 0.007396
|
| 34 |
+
v -0.014336 0.002032 0.004714
|
| 35 |
+
v -0.012526 0.000000 0.004313
|
| 36 |
+
v -0.013806 0.000595 0.004596
|
| 37 |
+
v -0.012526 0.038100 0.004313
|
| 38 |
+
v -0.014336 0.036068 0.004714
|
| 39 |
+
v -0.013806 0.037505 0.004596
|
| 40 |
+
v -0.013354 0.036068 0.007620
|
| 41 |
+
v -0.011672 0.038100 0.006854
|
| 42 |
+
v -0.012861 0.037505 0.007396
|
| 43 |
+
v 0.012521 0.000000 0.004314
|
| 44 |
+
v 0.014336 0.002032 0.004714
|
| 45 |
+
v 0.013805 0.000595 0.004597
|
| 46 |
+
v 0.013354 0.002032 0.007620
|
| 47 |
+
v 0.011668 0.000000 0.006855
|
| 48 |
+
v 0.012860 0.000595 0.007396
|
| 49 |
+
v 0.011668 0.038100 0.006855
|
| 50 |
+
v 0.013354 0.036068 0.007620
|
| 51 |
+
v 0.012860 0.037505 0.007396
|
| 52 |
+
v 0.014336 0.036068 0.004714
|
| 53 |
+
v 0.012521 0.038100 0.004314
|
| 54 |
+
v 0.013805 0.037505 0.004597
|
| 55 |
+
v -0.010002 0.000000 0.018088
|
| 56 |
+
v -0.011405 0.002032 0.020414
|
| 57 |
+
v -0.010994 0.000595 0.019733
|
| 58 |
+
v -0.013985 0.002032 0.018583
|
| 59 |
+
v -0.012256 0.000000 0.016473
|
| 60 |
+
v -0.013478 0.000595 0.017965
|
| 61 |
+
v -0.013300 0.002032 0.020351
|
| 62 |
+
v -0.011669 0.000000 0.018040
|
| 63 |
+
v -0.012822 0.000595 0.019674
|
| 64 |
+
v -0.012256 0.038100 0.016473
|
| 65 |
+
v -0.013985 0.036068 0.018583
|
| 66 |
+
v -0.013478 0.037505 0.017965
|
| 67 |
+
v -0.011405 0.036068 0.020414
|
| 68 |
+
v -0.010002 0.038100 0.018088
|
| 69 |
+
v -0.010994 0.037505 0.019733
|
| 70 |
+
v -0.011669 0.038100 0.018040
|
| 71 |
+
v -0.013300 0.036068 0.020351
|
| 72 |
+
v -0.012822 0.037505 0.019674
|
| 73 |
+
v -0.018964 0.000000 -0.003158
|
| 74 |
+
v -0.021672 0.002032 -0.003831
|
| 75 |
+
v -0.020879 0.000595 -0.003634
|
| 76 |
+
v -0.020696 0.002032 -0.006698
|
| 77 |
+
v -0.018097 0.000000 -0.005661
|
| 78 |
+
v -0.019935 0.000595 -0.006394
|
| 79 |
+
v -0.019426 0.000000 -0.004715
|
| 80 |
+
v -0.022190 0.002032 -0.005607
|
| 81 |
+
v -0.021380 0.000595 -0.005346
|
| 82 |
+
v -0.018097 0.038100 -0.005661
|
| 83 |
+
v -0.020696 0.036068 -0.006698
|
| 84 |
+
v -0.019935 0.037505 -0.006394
|
| 85 |
+
v -0.021672 0.036068 -0.003831
|
| 86 |
+
v -0.018964 0.038100 -0.003158
|
| 87 |
+
v -0.020879 0.037505 -0.003634
|
| 88 |
+
v -0.022190 0.036068 -0.005607
|
| 89 |
+
v -0.019426 0.038100 -0.004715
|
| 90 |
+
v -0.021380 0.037505 -0.005346
|
| 91 |
+
v 0.012251 0.000000 0.016476
|
| 92 |
+
v 0.013985 0.002032 0.018583
|
| 93 |
+
v 0.013477 0.000595 0.017966
|
| 94 |
+
v 0.011405 0.002032 0.020414
|
| 95 |
+
v 0.009996 0.000000 0.018089
|
| 96 |
+
v 0.010992 0.000595 0.019733
|
| 97 |
+
v 0.011663 0.000000 0.018043
|
| 98 |
+
v 0.013300 0.002032 0.020351
|
| 99 |
+
v 0.012821 0.000595 0.019675
|
| 100 |
+
v 0.009996 0.038100 0.018089
|
| 101 |
+
v 0.011405 0.036068 0.020414
|
| 102 |
+
v 0.010992 0.037505 0.019733
|
| 103 |
+
v 0.013985 0.036068 0.018583
|
| 104 |
+
v 0.012251 0.038100 0.016476
|
| 105 |
+
v 0.013477 0.037505 0.017966
|
| 106 |
+
v 0.013300 0.036068 0.020351
|
| 107 |
+
v 0.011663 0.038100 0.018043
|
| 108 |
+
v 0.012821 0.037505 0.019675
|
| 109 |
+
v 0.018094 0.000000 -0.005663
|
| 110 |
+
v 0.020696 0.002032 -0.006698
|
| 111 |
+
v 0.019934 0.000595 -0.006395
|
| 112 |
+
v 0.021672 0.002032 -0.003831
|
| 113 |
+
v 0.018961 0.000000 -0.003159
|
| 114 |
+
v 0.020878 0.000595 -0.003635
|
| 115 |
+
v 0.019423 0.000000 -0.004716
|
| 116 |
+
v 0.022190 0.002032 -0.005607
|
| 117 |
+
v 0.021380 0.000595 -0.005346
|
| 118 |
+
v 0.018961 0.038100 -0.003159
|
| 119 |
+
v 0.021672 0.036068 -0.003831
|
| 120 |
+
v 0.020878 0.037505 -0.003635
|
| 121 |
+
v 0.020696 0.036068 -0.006698
|
| 122 |
+
v 0.018094 0.038100 -0.005663
|
| 123 |
+
v 0.019934 0.037505 -0.006395
|
| 124 |
+
v 0.022190 0.036068 -0.005607
|
| 125 |
+
v 0.019423 0.038100 -0.004716
|
| 126 |
+
v 0.021380 0.037505 -0.005346
|
| 127 |
+
v 0.001426 0.038100 -0.016730
|
| 128 |
+
v 0.001638 0.036068 -0.019383
|
| 129 |
+
v 0.001576 0.037505 -0.018606
|
| 130 |
+
v -0.001638 0.036068 -0.019383
|
| 131 |
+
v -0.001434 0.038100 -0.016729
|
| 132 |
+
v -0.001578 0.037505 -0.018606
|
| 133 |
+
v 0.000000 0.036068 -0.020414
|
| 134 |
+
v -0.000004 0.038100 -0.017644
|
| 135 |
+
v -0.000001 0.037505 -0.019603
|
| 136 |
+
v -0.001434 0.000000 -0.016729
|
| 137 |
+
v -0.001638 0.002032 -0.019383
|
| 138 |
+
v -0.001578 0.000595 -0.018606
|
| 139 |
+
v 0.001638 0.002032 -0.019383
|
| 140 |
+
v 0.001426 0.000000 -0.016730
|
| 141 |
+
v 0.001576 0.000595 -0.018606
|
| 142 |
+
v -0.000004 0.000000 -0.017644
|
| 143 |
+
v 0.000000 0.002032 -0.020414
|
| 144 |
+
v -0.000001 0.000595 -0.019603
|
| 145 |
+
v 0.001733 0.000000 0.015081
|
| 146 |
+
v 0.001984 0.002032 0.017005
|
| 147 |
+
v 0.001910 0.000595 0.016441
|
| 148 |
+
v -0.001984 0.002032 0.017005
|
| 149 |
+
v -0.001741 0.000000 0.015080
|
| 150 |
+
v -0.001912 0.000595 0.016441
|
| 151 |
+
v -0.001741 0.038100 0.015080
|
| 152 |
+
v -0.001984 0.036068 0.017005
|
| 153 |
+
v -0.001912 0.037505 0.016441
|
| 154 |
+
v 0.001984 0.036068 0.017005
|
| 155 |
+
v 0.001733 0.038100 0.015081
|
| 156 |
+
v 0.001910 0.037505 0.016441
|
| 157 |
+
vt 0.884326 0.143054
|
| 158 |
+
vt 0.881637 0.147199
|
| 159 |
+
vt 0.874485 0.145636
|
| 160 |
+
vt 0.870501 0.139220
|
| 161 |
+
vt 0.873534 0.134807
|
| 162 |
+
vt 0.837942 0.112414
|
| 163 |
+
vt 0.837942 0.131533
|
| 164 |
+
vt 0.832314 0.131533
|
| 165 |
+
vt 0.832314 0.112414
|
| 166 |
+
vt 0.883572 0.123603
|
| 167 |
+
vt 0.883611 0.122735
|
| 168 |
+
vt 0.892897 0.129050
|
| 169 |
+
vt 0.881240 0.148682
|
| 170 |
+
vt 0.881539 0.153913
|
| 171 |
+
vt 0.898370 0.134009
|
| 172 |
+
vt 0.897030 0.139070
|
| 173 |
+
vt 0.873770 0.153188
|
| 174 |
+
vt 0.868788 0.154800
|
| 175 |
+
vt 0.903052 0.129620
|
| 176 |
+
vt 0.899208 0.132723
|
| 177 |
+
vt 0.862147 0.112414
|
| 178 |
+
vt 0.862147 0.131533
|
| 179 |
+
vt 0.855821 0.131533
|
| 180 |
+
vt 0.855821 0.112414
|
| 181 |
+
vt 0.830184 0.112414
|
| 182 |
+
vt 0.830184 0.131533
|
| 183 |
+
vt 0.824015 0.131533
|
| 184 |
+
vt 0.824015 0.112414
|
| 185 |
+
vt 0.874942 0.134807
|
| 186 |
+
vt 0.877932 0.139104
|
| 187 |
+
vt 0.880430 0.154782
|
| 188 |
+
vt 0.875317 0.153178
|
| 189 |
+
vt 0.866663 0.147297
|
| 190 |
+
vt 0.863946 0.143378
|
| 191 |
+
vt 0.884646 0.135960
|
| 192 |
+
vt 0.883837 0.135640
|
| 193 |
+
vt 0.874236 0.134337
|
| 194 |
+
vt 0.813888 0.131533
|
| 195 |
+
vt 0.813888 0.112414
|
| 196 |
+
vt 0.814927 0.112414
|
| 197 |
+
vt 0.814927 0.131533
|
| 198 |
+
vt 0.881273 0.154719
|
| 199 |
+
vt 0.863186 0.112414
|
| 200 |
+
vt 0.863186 0.131533
|
| 201 |
+
vt 0.867919 0.154747
|
| 202 |
+
vt 0.867585 0.153944
|
| 203 |
+
vt 0.845799 0.112414
|
| 204 |
+
vt 0.845799 0.131533
|
| 205 |
+
vt 0.840171 0.131533
|
| 206 |
+
vt 0.840171 0.112414
|
| 207 |
+
vt 0.903484 0.128858
|
| 208 |
+
vt 0.883832 0.141627
|
| 209 |
+
vt 0.884500 0.142196
|
| 210 |
+
vt 0.864368 0.141965
|
| 211 |
+
vt 0.869278 0.140166
|
| 212 |
+
vt 0.854097 0.112414
|
| 213 |
+
vt 0.854097 0.131533
|
| 214 |
+
vt 0.847929 0.131533
|
| 215 |
+
vt 0.847929 0.112414
|
| 216 |
+
vt 0.896527 0.139753
|
| 217 |
+
vt 0.867312 0.149178
|
| 218 |
+
vt 0.822292 0.112414
|
| 219 |
+
vt 0.822292 0.131533
|
| 220 |
+
vt 0.872132 0.131533
|
| 221 |
+
vt 0.872132 0.112414
|
| 222 |
+
vt 0.877999 0.112414
|
| 223 |
+
vt 0.877999 0.131533
|
| 224 |
+
vt 0.864225 0.131533
|
| 225 |
+
vt 0.864225 0.112414
|
| 226 |
+
vt 0.870414 0.112414
|
| 227 |
+
vt 0.870414 0.131533
|
| 228 |
+
vt 0.815966 0.112414
|
| 229 |
+
vt 0.815966 0.131533
|
| 230 |
+
vt 0.891348 0.136441
|
| 231 |
+
vt 0.889875 0.135971
|
| 232 |
+
vt 0.846864 0.131533
|
| 233 |
+
vt 0.846864 0.112414
|
| 234 |
+
vt 0.831249 0.131533
|
| 235 |
+
vt 0.831249 0.112414
|
| 236 |
+
vt 0.879159 0.140026
|
| 237 |
+
vt 0.896695 0.118860
|
| 238 |
+
vt 0.898202 0.123877
|
| 239 |
+
vt 0.895355 0.118422
|
| 240 |
+
vt 0.896169 0.118193
|
| 241 |
+
vt 0.863717 0.142542
|
| 242 |
+
vt 0.889642 0.122199
|
| 243 |
+
vt 0.891100 0.121679
|
| 244 |
+
vt 0.899083 0.125135
|
| 245 |
+
vt 0.805981 0.112414
|
| 246 |
+
vt 0.805981 0.131533
|
| 247 |
+
vt 0.800114 0.131533
|
| 248 |
+
vt 0.800114 0.112414
|
| 249 |
+
vt 0.807699 0.112414
|
| 250 |
+
vt 0.807699 0.131533
|
| 251 |
+
vt 0.884410 0.122387
|
| 252 |
+
vt 0.895707 0.139551
|
| 253 |
+
vt 0.879086 0.112414
|
| 254 |
+
vt 0.879086 0.131533
|
| 255 |
+
vt 0.883766 0.134776
|
| 256 |
+
vt 0.884979 0.130164
|
| 257 |
+
vt 0.903027 0.128111
|
| 258 |
+
vt 0.799027 0.131533
|
| 259 |
+
vt 0.799027 0.112414
|
| 260 |
+
vt 0.884945 0.128175
|
| 261 |
+
vt 0.882437 0.147351
|
| 262 |
+
vt 0.881976 0.149022
|
| 263 |
+
vt 0.883261 0.147612
|
| 264 |
+
vt 0.882837 0.149234
|
| 265 |
+
vt 0.898778 0.123306
|
| 266 |
+
vt 0.899783 0.124719
|
| 267 |
+
vt 0.899515 0.122813
|
| 268 |
+
vt 0.900468 0.124192
|
| 269 |
+
vt 0.899922 0.133113
|
| 270 |
+
vt 0.898965 0.134558
|
| 271 |
+
vt 0.900624 0.133616
|
| 272 |
+
vt 0.899718 0.135026
|
| 273 |
+
vt 0.878303 0.138385
|
| 274 |
+
vt 0.879696 0.139416
|
| 275 |
+
vt 0.878850 0.137688
|
| 276 |
+
vt 0.880184 0.138702
|
| 277 |
+
vt 0.889274 0.121462
|
| 278 |
+
vt 0.890920 0.120885
|
| 279 |
+
vt 0.889004 0.120636
|
| 280 |
+
vt 0.890592 0.120060
|
| 281 |
+
vt 0.875420 0.153985
|
| 282 |
+
vt 0.873676 0.154006
|
| 283 |
+
vt 0.875394 0.154873
|
| 284 |
+
vt 0.873704 0.154874
|
| 285 |
+
vt 0.891195 0.137238
|
| 286 |
+
vt 0.889532 0.136718
|
| 287 |
+
vt 0.890894 0.138073
|
| 288 |
+
vt 0.889289 0.137551
|
| 289 |
+
vt 0.868700 0.139582
|
| 290 |
+
vt 0.870085 0.138524
|
| 291 |
+
vt 0.868187 0.138882
|
| 292 |
+
vt 0.869517 0.137842
|
| 293 |
+
vt 0.862942 0.143128
|
| 294 |
+
vt 0.862743 0.142252
|
| 295 |
+
vt 0.862000 0.143160
|
| 296 |
+
vt 0.861880 0.141993
|
| 297 |
+
vt 0.883020 0.136246
|
| 298 |
+
vt 0.882908 0.135355
|
| 299 |
+
vt 0.882298 0.136785
|
| 300 |
+
vt 0.882012 0.135647
|
| 301 |
+
vt 0.863391 0.141636
|
| 302 |
+
vt 0.862626 0.141085
|
| 303 |
+
vt 0.883840 0.136603
|
| 304 |
+
vt 0.883310 0.137383
|
| 305 |
+
vt 0.897417 0.140057
|
| 306 |
+
vt 0.896867 0.140740
|
| 307 |
+
vt 0.898025 0.140801
|
| 308 |
+
vt 0.897174 0.141610
|
| 309 |
+
vt 0.874217 0.133293
|
| 310 |
+
vt 0.874968 0.133747
|
| 311 |
+
vt 0.874208 0.132371
|
| 312 |
+
vt 0.875284 0.132840
|
| 313 |
+
vt 0.896006 0.140567
|
| 314 |
+
vt 0.896002 0.141529
|
| 315 |
+
vt 0.873468 0.133750
|
| 316 |
+
vt 0.873134 0.132848
|
| 317 |
+
vt 0.895621 0.117396
|
| 318 |
+
vt 0.896476 0.117194
|
| 319 |
+
vt 0.895584 0.116434
|
| 320 |
+
vt 0.896753 0.116313
|
| 321 |
+
vt 0.881903 0.155553
|
| 322 |
+
vt 0.881031 0.155656
|
| 323 |
+
vt 0.882465 0.156286
|
| 324 |
+
vt 0.881325 0.156572
|
| 325 |
+
vt 0.897048 0.117859
|
| 326 |
+
vt 0.897631 0.117095
|
| 327 |
+
vt 0.882214 0.154732
|
| 328 |
+
vt 0.883023 0.155251
|
| 329 |
+
vt 0.882691 0.123051
|
| 330 |
+
vt 0.882773 0.122155
|
| 331 |
+
vt 0.881783 0.122789
|
| 332 |
+
vt 0.882031 0.121638
|
| 333 |
+
vt 0.867329 0.155578
|
| 334 |
+
vt 0.866946 0.154764
|
| 335 |
+
vt 0.866810 0.156317
|
| 336 |
+
vt 0.866182 0.155321
|
| 337 |
+
vt 0.883582 0.121769
|
| 338 |
+
vt 0.883025 0.121005
|
| 339 |
+
vt 0.868222 0.155664
|
| 340 |
+
vt 0.867960 0.156572
|
| 341 |
+
vt 0.904030 0.128049
|
| 342 |
+
vt 0.904478 0.128840
|
| 343 |
+
vt 0.904906 0.127731
|
| 344 |
+
vt 0.905368 0.128825
|
| 345 |
+
vt 0.885439 0.141872
|
| 346 |
+
vt 0.885289 0.142769
|
| 347 |
+
vt 0.886281 0.141582
|
| 348 |
+
vt 0.886221 0.142768
|
| 349 |
+
vt 0.904056 0.129646
|
| 350 |
+
vt 0.904943 0.129934
|
| 351 |
+
vt 0.884767 0.141260
|
| 352 |
+
vt 0.885502 0.140686
|
| 353 |
+
vt 0.865721 0.149838
|
| 354 |
+
vt 0.865007 0.147749
|
| 355 |
+
vt 0.865827 0.147457
|
| 356 |
+
vt 0.866565 0.149562
|
| 357 |
+
vt 0.883268 0.130306
|
| 358 |
+
vt 0.883225 0.128099
|
| 359 |
+
vt 0.884112 0.128070
|
| 360 |
+
vt 0.884138 0.130300
|
| 361 |
+
vn 0.0000 -1.0000 0.0000
|
| 362 |
+
vn 0.1760 -0.1821 0.9674
|
| 363 |
+
vn 0.1760 0.1821 0.9674
|
| 364 |
+
vn 0.1373 0.1995 0.9702
|
| 365 |
+
vn 0.1373 -0.1995 0.9702
|
| 366 |
+
vn -0.0000 1.0000 -0.0000
|
| 367 |
+
vn 0.8706 -0.1992 0.4499
|
| 368 |
+
vn 0.8706 0.1992 0.4499
|
| 369 |
+
vn 0.8522 0.1751 0.4930
|
| 370 |
+
vn 0.8522 -0.1751 0.4930
|
| 371 |
+
vn -0.9656 -0.1964 0.1706
|
| 372 |
+
vn -0.9656 0.1964 0.1706
|
| 373 |
+
vn -0.9767 0.1745 0.1252
|
| 374 |
+
vn -0.9767 -0.1745 0.1252
|
| 375 |
+
vn -0.4160 0.1947 -0.8883
|
| 376 |
+
vn -0.4160 -0.1947 -0.8883
|
| 377 |
+
vn -0.9185 -0.2428 -0.3119
|
| 378 |
+
vn -0.9185 0.2428 -0.3119
|
| 379 |
+
vn 0.9185 -0.2429 -0.3119
|
| 380 |
+
vn 0.9185 0.2429 -0.3119
|
| 381 |
+
vn -0.1372 -0.1993 0.9703
|
| 382 |
+
vn -0.1372 0.1993 0.9703
|
| 383 |
+
vn -0.1761 0.1819 0.9674
|
| 384 |
+
vn -0.1761 -0.1819 0.9674
|
| 385 |
+
vn 0.9766 -0.1749 0.1252
|
| 386 |
+
vn 0.9766 0.1749 0.1252
|
| 387 |
+
vn 0.9655 0.1968 0.1705
|
| 388 |
+
vn 0.9655 -0.1968 0.1705
|
| 389 |
+
vn -0.8523 -0.1748 0.4930
|
| 390 |
+
vn -0.8523 0.1748 0.4930
|
| 391 |
+
vn 0.7051 0.1756 -0.6870
|
| 392 |
+
vn 0.7051 -0.1756 -0.6870
|
| 393 |
+
vn 0.6736 -0.1964 -0.7125
|
| 394 |
+
vn 0.6736 0.1964 -0.7125
|
| 395 |
+
vn 0.4161 0.1947 -0.8883
|
| 396 |
+
vn 0.4161 -0.1947 -0.8883
|
| 397 |
+
vn 0.3770 -0.1709 -0.9103
|
| 398 |
+
vn 0.3770 0.1709 -0.9103
|
| 399 |
+
vn -0.8706 -0.1990 0.4499
|
| 400 |
+
vn -0.8706 0.1990 0.4499
|
| 401 |
+
vn 0.5621 0.2389 0.7918
|
| 402 |
+
vn 0.5621 -0.2389 0.7918
|
| 403 |
+
vn -0.5620 0.2388 0.7919
|
| 404 |
+
vn -0.5620 -0.2388 0.7919
|
| 405 |
+
vn -0.7052 -0.1752 -0.6870
|
| 406 |
+
vn -0.7052 0.1752 -0.6870
|
| 407 |
+
vn -0.6736 0.1961 -0.7126
|
| 408 |
+
vn -0.6736 -0.1961 -0.7126
|
| 409 |
+
vn -0.3770 -0.1709 -0.9103
|
| 410 |
+
vn -0.3770 0.1709 -0.9103
|
| 411 |
+
vn 0.0001 -0.2357 -0.9718
|
| 412 |
+
vn 0.0001 0.2357 -0.9718
|
| 413 |
+
vn 0.0822 -0.9807 -0.1776
|
| 414 |
+
vn 0.1339 -0.9813 -0.1382
|
| 415 |
+
vn 0.5148 -0.6952 -0.5016
|
| 416 |
+
vn 0.2776 -0.6869 -0.6716
|
| 417 |
+
vn 0.1339 0.9813 -0.1382
|
| 418 |
+
vn 0.0822 0.9807 -0.1776
|
| 419 |
+
vn 0.2776 0.6869 -0.6716
|
| 420 |
+
vn 0.5148 0.6952 -0.5016
|
| 421 |
+
vn -0.0822 0.9807 -0.1777
|
| 422 |
+
vn -0.1341 0.9812 -0.1385
|
| 423 |
+
vn -0.5153 0.6946 -0.5020
|
| 424 |
+
vn -0.2777 0.6868 -0.6717
|
| 425 |
+
vn -0.1341 -0.9812 -0.1385
|
| 426 |
+
vn -0.0822 -0.9807 -0.1777
|
| 427 |
+
vn -0.2777 -0.6868 -0.6717
|
| 428 |
+
vn -0.5153 -0.6946 -0.5020
|
| 429 |
+
vn 0.1701 0.9813 0.0905
|
| 430 |
+
vn 0.1906 0.9812 0.0307
|
| 431 |
+
vn 0.7146 0.6935 0.0914
|
| 432 |
+
vn 0.6235 0.6939 0.3603
|
| 433 |
+
vn 0.1906 -0.9812 0.0307
|
| 434 |
+
vn 0.1701 -0.9813 0.0905
|
| 435 |
+
vn 0.6235 -0.6939 0.3603
|
| 436 |
+
vn 0.7146 -0.6935 0.0914
|
| 437 |
+
vn -0.1911 0.9811 0.0308
|
| 438 |
+
vn -0.1703 0.9812 0.0907
|
| 439 |
+
vn -0.6239 0.6934 0.3605
|
| 440 |
+
vn -0.7153 0.6928 0.0914
|
| 441 |
+
vn -0.1703 -0.9812 0.0907
|
| 442 |
+
vn -0.1911 -0.9811 0.0308
|
| 443 |
+
vn -0.7153 -0.6928 0.0914
|
| 444 |
+
vn -0.6239 -0.6934 0.3605
|
| 445 |
+
vn -0.1140 -0.9807 0.1590
|
| 446 |
+
vn 0.0574 -0.9732 0.2225
|
| 447 |
+
vn 0.1230 -0.6920 0.7113
|
| 448 |
+
vn -0.3997 -0.7242 0.5619
|
| 449 |
+
vn 0.0574 0.9732 0.2225
|
| 450 |
+
vn -0.1140 0.9807 0.1590
|
| 451 |
+
vn -0.3997 0.7242 0.5619
|
| 452 |
+
vn 0.1230 0.6920 0.7113
|
| 453 |
+
vn -0.2413 -0.9704 0.0099
|
| 454 |
+
vn -0.7222 -0.6844 0.1004
|
| 455 |
+
vn -0.2413 0.9704 0.0099
|
| 456 |
+
vn -0.7222 0.6844 0.1004
|
| 457 |
+
vn -0.1821 0.9811 -0.0651
|
| 458 |
+
vn -0.0726 0.9686 -0.2377
|
| 459 |
+
vn -0.2844 0.6806 -0.6752
|
| 460 |
+
vn -0.6483 0.7279 -0.2233
|
| 461 |
+
vn -0.0726 -0.9686 -0.2377
|
| 462 |
+
vn -0.1821 -0.9811 -0.0651
|
| 463 |
+
vn -0.6483 -0.7279 -0.2233
|
| 464 |
+
vn -0.2844 -0.6806 -0.6752
|
| 465 |
+
vn -0.1966 0.9707 0.1379
|
| 466 |
+
vn -0.6321 0.6875 0.3576
|
| 467 |
+
vn -0.1966 -0.9707 0.1379
|
| 468 |
+
vn -0.6321 -0.6875 0.3576
|
| 469 |
+
vn 0.1820 0.9811 -0.0652
|
| 470 |
+
vn 0.1964 0.9708 0.1377
|
| 471 |
+
vn 0.6318 0.6878 0.3574
|
| 472 |
+
vn 0.6481 0.7280 -0.2234
|
| 473 |
+
vn 0.1964 -0.9708 0.1377
|
| 474 |
+
vn 0.1820 -0.9811 -0.0652
|
| 475 |
+
vn 0.6481 -0.7280 -0.2234
|
| 476 |
+
vn 0.6318 -0.6878 0.3574
|
| 477 |
+
vn 0.0726 0.9686 -0.2378
|
| 478 |
+
vn 0.2843 0.6806 -0.6752
|
| 479 |
+
vn 0.0726 -0.9686 -0.2378
|
| 480 |
+
vn 0.2843 -0.6806 -0.6752
|
| 481 |
+
vn 0.1137 0.9807 0.1592
|
| 482 |
+
vn -0.0576 0.9731 0.2229
|
| 483 |
+
vn -0.1231 0.6917 0.7116
|
| 484 |
+
vn 0.3994 0.7243 0.5620
|
| 485 |
+
vn -0.0576 -0.9731 0.2229
|
| 486 |
+
vn 0.1137 -0.9807 0.1592
|
| 487 |
+
vn 0.3994 -0.7243 0.5620
|
| 488 |
+
vn -0.1231 -0.6917 0.7116
|
| 489 |
+
vn 0.2406 0.9706 0.0100
|
| 490 |
+
vn 0.7217 0.6849 0.1003
|
| 491 |
+
vn 0.2407 -0.9706 0.0100
|
| 492 |
+
vn 0.7217 -0.6849 0.1003
|
| 493 |
+
vn -0.0002 0.9803 -0.1975
|
| 494 |
+
vn 0.1845 0.9711 -0.1512
|
| 495 |
+
vn 0.5181 0.6852 -0.5119
|
| 496 |
+
vn -0.0002 0.7214 -0.6926
|
| 497 |
+
vn 0.1845 -0.9711 -0.1512
|
| 498 |
+
vn -0.0002 -0.9803 -0.1975
|
| 499 |
+
vn -0.0002 -0.7214 -0.6926
|
| 500 |
+
vn 0.5181 -0.6852 -0.5119
|
| 501 |
+
vn -0.1850 0.9710 -0.1515
|
| 502 |
+
vn -0.5185 0.6847 -0.5122
|
| 503 |
+
vn -0.1850 -0.9710 -0.1515
|
| 504 |
+
vn -0.5185 -0.6847 -0.5122
|
| 505 |
+
vn 0.1263 -0.7034 0.6995
|
| 506 |
+
vn -0.1265 -0.7031 0.6997
|
| 507 |
+
vn 0.0277 -0.9822 0.1859
|
| 508 |
+
vn -0.0277 -0.9821 0.1861
|
| 509 |
+
vn -0.1265 0.7031 0.6997
|
| 510 |
+
vn 0.1263 0.7034 0.6995
|
| 511 |
+
vn -0.0277 0.9821 0.1861
|
| 512 |
+
vn 0.0277 0.9822 0.1859
|
| 513 |
+
usemtl toybox.002
|
| 514 |
+
s 1
|
| 515 |
+
f 136/1/1 3/2/1 1/3/1
|
| 516 |
+
f 31/4/1 69/5/1 1/3/1
|
| 517 |
+
f 144/6/2 148/7/3 63/8/4 52/9/5
|
| 518 |
+
f 96/10/6 103/11/6 2/12/6
|
| 519 |
+
f 7/13/1 105/14/1 1/3/1
|
| 520 |
+
f 19/15/6 78/16/6 2/12/6
|
| 521 |
+
f 43/17/1 87/18/1 1/3/1
|
| 522 |
+
f 127/19/6 15/20/6 2/12/6
|
| 523 |
+
f 15/20/6 19/15/6 2/12/6
|
| 524 |
+
f 108/21/7 115/22/8 48/23/9 40/24/10
|
| 525 |
+
f 54/25/11 61/26/12 36/27/13 28/28/14
|
| 526 |
+
f 73/29/1 21/30/1 1/3/1
|
| 527 |
+
f 109/31/1 39/32/1 1/3/1
|
| 528 |
+
f 1/3/1 145/33/1 51/34/1
|
| 529 |
+
f 60/35/6 66/36/6 2/12/6
|
| 530 |
+
f 75/37/1 73/29/1 1/3/1
|
| 531 |
+
f 79/38/15 72/39/16 76/40/17 84/41/18
|
| 532 |
+
f 111/42/1 109/31/1 1/3/1
|
| 533 |
+
f 115/22/8 108/21/7 112/43/19 120/44/20
|
| 534 |
+
f 93/45/1 91/46/1 1/3/1
|
| 535 |
+
f 90/47/21 97/48/22 150/49/23 142/50/24
|
| 536 |
+
f 130/51/6 127/19/6 2/12/6
|
| 537 |
+
f 132/52/1 138/53/1 1/3/1
|
| 538 |
+
f 55/54/1 27/55/1 1/3/1
|
| 539 |
+
f 42/56/25 46/57/26 99/58/27 88/59/28
|
| 540 |
+
f 78/16/6 85/60/6 2/12/6
|
| 541 |
+
f 91/46/1 141/61/1 1/3/1
|
| 542 |
+
f 69/5/1 75/37/1 1/3/1
|
| 543 |
+
f 30/62/29 28/28/14 36/27/13 34/63/30
|
| 544 |
+
f 12/64/31 4/65/32 135/66/33 124/67/34
|
| 545 |
+
f 117/68/35 106/69/36 6/70/37 10/71/38
|
| 546 |
+
f 84/41/18 76/40/17 70/72/39 81/73/40
|
| 547 |
+
f 33/74/6 37/75/6 2/12/6
|
| 548 |
+
f 42/56/25 40/24/10 48/23/9 46/57/26
|
| 549 |
+
f 102/76/41 94/77/42 88/59/28 99/58/27
|
| 550 |
+
f 31/4/1 1/3/1 27/55/1
|
| 551 |
+
f 52/9/5 63/8/4 67/78/43 57/79/44
|
| 552 |
+
f 25/80/1 132/52/1 1/3/1
|
| 553 |
+
f 118/81/6 9/82/6 2/12/6
|
| 554 |
+
f 114/83/6 121/84/6 2/12/6
|
| 555 |
+
f 58/85/1 55/54/1 1/3/1
|
| 556 |
+
f 148/7/3 144/6/2 142/50/24 150/49/23
|
| 557 |
+
f 57/79/44 67/78/43 61/26/12 54/25/11
|
| 558 |
+
f 45/86/6 49/87/6 2/12/6
|
| 559 |
+
f 120/44/20 112/43/19 106/69/36 117/68/35
|
| 560 |
+
f 138/53/1 136/1/1 1/3/1
|
| 561 |
+
f 9/82/6 13/88/6 2/12/6
|
| 562 |
+
f 30/62/29 34/63/30 81/73/40 70/72/39
|
| 563 |
+
f 39/32/1 43/17/1 1/3/1
|
| 564 |
+
f 51/34/1 58/85/1 1/3/1
|
| 565 |
+
f 24/89/45 16/90/46 126/91/47 133/92/48
|
| 566 |
+
f 24/89/45 22/93/49 18/94/50 16/90/46
|
| 567 |
+
f 87/18/1 93/45/1 1/3/1
|
| 568 |
+
f 103/11/6 100/95/6 2/12/6
|
| 569 |
+
f 105/14/1 111/42/1 1/3/1
|
| 570 |
+
f 82/96/6 33/74/6 2/12/6
|
| 571 |
+
f 37/75/6 60/35/6 2/12/6
|
| 572 |
+
f 72/39/16 79/38/15 18/94/50 22/93/49
|
| 573 |
+
f 121/84/6 118/81/6 2/12/6
|
| 574 |
+
f 100/95/6 45/86/6 2/12/6
|
| 575 |
+
f 124/67/34 135/66/33 139/97/51 129/98/52
|
| 576 |
+
f 25/80/1 1/3/1 21/30/1
|
| 577 |
+
f 64/99/6 147/100/6 2/12/6
|
| 578 |
+
f 123/101/6 130/51/6 2/12/6
|
| 579 |
+
f 66/36/6 64/99/6 2/12/6
|
| 580 |
+
f 129/102/52 139/103/51 133/92/48 126/91/47
|
| 581 |
+
f 49/87/6 114/83/6 2/12/6
|
| 582 |
+
f 13/88/6 123/101/6 2/12/6
|
| 583 |
+
f 85/60/6 82/96/6 2/12/6
|
| 584 |
+
f 2/12/6 151/104/6 96/10/6
|
| 585 |
+
f 3/2/1 7/13/1 1/3/1
|
| 586 |
+
f 147/100/6 151/104/6 2/12/6
|
| 587 |
+
f 141/61/1 145/33/1 1/3/1
|
| 588 |
+
f 97/48/22 90/47/21 94/77/42 102/76/41
|
| 589 |
+
f 7/13/53 3/2/54 5/105/55 8/106/56
|
| 590 |
+
f 8/106/56 5/105/55 4/107/32 6/108/37
|
| 591 |
+
f 13/88/57 9/82/58 11/109/59 14/110/60
|
| 592 |
+
f 14/110/60 11/109/59 10/111/38 12/112/31
|
| 593 |
+
f 19/15/61 15/20/62 17/113/63 20/114/64
|
| 594 |
+
f 20/114/64 17/113/63 16/115/46 18/116/50
|
| 595 |
+
f 25/80/65 21/30/66 23/117/67 26/118/68
|
| 596 |
+
f 26/118/68 23/117/67 22/119/49 24/120/45
|
| 597 |
+
f 49/87/69 45/86/70 47/121/71 50/122/72
|
| 598 |
+
f 50/122/72 47/121/71 46/123/26 48/124/9
|
| 599 |
+
f 43/17/73 39/32/74 41/125/75 44/126/76
|
| 600 |
+
f 44/126/76 41/125/75 40/127/10 42/128/25
|
| 601 |
+
f 37/75/77 33/74/78 35/129/79 38/130/80
|
| 602 |
+
f 38/130/80 35/129/79 34/131/30 36/132/13
|
| 603 |
+
f 31/4/81 27/55/82 29/133/83 32/134/84
|
| 604 |
+
f 32/134/84 29/133/83 28/135/14 30/136/29
|
| 605 |
+
f 58/85/85 51/34/86 53/137/87 59/138/88
|
| 606 |
+
f 59/138/88 53/137/87 52/139/5 57/140/44
|
| 607 |
+
f 64/99/89 66/36/90 68/141/91 65/142/92
|
| 608 |
+
f 65/142/92 68/141/91 67/143/43 63/144/4
|
| 609 |
+
f 55/54/93 58/85/85 59/138/88 56/145/94
|
| 610 |
+
f 56/145/94 59/138/88 57/140/44 54/146/11
|
| 611 |
+
f 66/36/90 60/35/95 62/147/96 68/141/91
|
| 612 |
+
f 68/141/91 62/147/96 61/148/12 67/143/43
|
| 613 |
+
f 85/60/97 78/16/98 80/149/99 86/150/100
|
| 614 |
+
f 86/150/100 80/149/99 79/151/15 84/152/18
|
| 615 |
+
f 73/29/101 75/37/102 77/153/103 74/154/104
|
| 616 |
+
f 74/154/104 77/153/103 76/155/17 72/156/16
|
| 617 |
+
f 82/96/105 85/60/97 86/150/100 83/157/106
|
| 618 |
+
f 83/157/106 86/150/100 84/152/18 81/158/40
|
| 619 |
+
f 75/37/102 69/5/107 71/159/108 77/153/103
|
| 620 |
+
f 77/153/103 71/159/108 70/160/39 76/155/17
|
| 621 |
+
f 121/84/109 114/83/110 116/161/111 122/162/112
|
| 622 |
+
f 122/162/112 116/161/111 115/163/8 120/164/20
|
| 623 |
+
f 109/31/113 111/42/114 113/165/115 110/166/116
|
| 624 |
+
f 110/166/116 113/165/115 112/167/19 108/168/7
|
| 625 |
+
f 118/81/117 121/84/109 122/162/112 119/169/118
|
| 626 |
+
f 119/169/118 122/162/112 120/164/20 117/170/35
|
| 627 |
+
f 111/42/114 105/14/119 107/171/120 113/165/115
|
| 628 |
+
f 113/165/115 107/171/120 106/172/36 112/167/19
|
| 629 |
+
f 103/11/121 96/10/122 98/173/123 104/174/124
|
| 630 |
+
f 104/174/124 98/173/123 97/175/22 102/176/41
|
| 631 |
+
f 91/46/125 93/45/126 95/177/127 92/178/128
|
| 632 |
+
f 92/178/128 95/177/127 94/179/42 90/180/21
|
| 633 |
+
f 100/95/129 103/11/121 104/174/124 101/181/130
|
| 634 |
+
f 101/181/130 104/174/124 102/176/41 99/182/27
|
| 635 |
+
f 93/45/126 87/18/131 89/183/132 95/177/127
|
| 636 |
+
f 95/177/127 89/183/132 88/184/28 94/179/42
|
| 637 |
+
f 130/51/133 123/101/134 125/185/135 131/186/136
|
| 638 |
+
f 131/186/136 125/185/135 124/187/34 129/188/52
|
| 639 |
+
f 136/1/137 138/53/138 140/189/139 137/190/140
|
| 640 |
+
f 137/190/140 140/189/139 139/191/51 135/192/33
|
| 641 |
+
f 127/19/141 130/51/133 131/186/136 128/193/142
|
| 642 |
+
f 128/193/142 131/186/136 129/188/52 126/194/47
|
| 643 |
+
f 138/53/138 132/52/143 134/195/144 140/189/139
|
| 644 |
+
f 140/189/139 134/195/144 133/196/48 139/191/51
|
| 645 |
+
f 27/55/82 55/54/93 56/145/94 29/133/83
|
| 646 |
+
f 29/133/83 56/145/94 54/146/11 28/135/14
|
| 647 |
+
f 60/35/95 37/75/77 38/130/80 62/147/96
|
| 648 |
+
f 62/147/96 38/130/80 36/132/13 61/148/12
|
| 649 |
+
f 69/5/107 31/4/81 32/134/84 71/159/108
|
| 650 |
+
f 71/159/108 32/134/84 30/136/29 70/160/39
|
| 651 |
+
f 33/74/78 82/96/105 83/157/106 35/129/79
|
| 652 |
+
f 35/129/79 83/157/106 81/158/40 34/131/30
|
| 653 |
+
f 21/30/66 73/29/101 74/154/104 23/117/67
|
| 654 |
+
f 23/117/67 74/154/104 72/156/16 22/119/49
|
| 655 |
+
f 78/16/98 19/15/61 20/114/64 80/149/99
|
| 656 |
+
f 80/149/99 20/114/64 18/116/50 79/151/15
|
| 657 |
+
f 87/18/131 43/17/73 44/126/76 89/183/132
|
| 658 |
+
f 89/183/132 44/126/76 42/128/25 88/184/28
|
| 659 |
+
f 45/86/70 100/95/129 101/181/130 47/121/71
|
| 660 |
+
f 47/121/71 101/181/130 99/182/27 46/123/26
|
| 661 |
+
f 9/82/58 118/81/117 119/169/118 11/109/59
|
| 662 |
+
f 11/109/59 119/169/118 117/170/35 10/111/38
|
| 663 |
+
f 105/14/119 7/13/53 8/106/56 107/171/120
|
| 664 |
+
f 107/171/120 8/106/56 6/108/37 106/172/36
|
| 665 |
+
f 39/32/74 109/31/113 110/166/116 41/125/75
|
| 666 |
+
f 41/125/75 110/166/116 108/168/7 40/127/10
|
| 667 |
+
f 114/83/110 49/87/69 50/122/72 116/161/111
|
| 668 |
+
f 116/161/111 50/122/72 48/124/9 115/163/8
|
| 669 |
+
f 123/101/134 13/88/57 14/110/60 125/185/135
|
| 670 |
+
f 125/185/135 14/110/60 12/112/31 124/187/34
|
| 671 |
+
f 3/2/54 136/1/137 137/190/140 5/105/55
|
| 672 |
+
f 5/105/55 137/190/140 135/192/33 4/107/32
|
| 673 |
+
f 132/52/143 25/80/65 26/118/68 134/195/144
|
| 674 |
+
f 134/195/144 26/118/68 24/120/45 133/196/48
|
| 675 |
+
f 15/20/62 127/19/141 128/193/142 17/113/63
|
| 676 |
+
f 17/113/63 128/193/142 126/194/47 16/115/46
|
| 677 |
+
f 142/197/24 144/198/2 146/199/145 143/200/146
|
| 678 |
+
f 143/200/146 146/199/145 145/33/147 141/61/148
|
| 679 |
+
f 148/201/3 150/202/23 152/203/149 149/204/150
|
| 680 |
+
f 149/204/150 152/203/149 151/104/151 147/100/152
|
| 681 |
+
f 141/61/148 91/46/125 92/178/128 143/200/146
|
| 682 |
+
f 143/200/146 92/178/128 90/180/21 142/197/24
|
| 683 |
+
f 96/10/122 151/104/151 152/203/149 98/173/123
|
| 684 |
+
f 98/173/123 152/203/149 150/202/23 97/175/22
|
| 685 |
+
f 51/34/86 145/33/147 146/199/145 53/137/87
|
| 686 |
+
f 53/137/87 146/199/145 144/198/2 52/139/5
|
| 687 |
+
f 147/100/152 64/99/89 65/142/92 149/204/150
|
| 688 |
+
f 149/204/150 65/142/92 63/144/4 148/201/3
|
| 689 |
+
f 12/64/31 10/71/38 6/70/37 4/65/32
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/blocks/yellow_pentagon.urdf
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" ?>
|
| 2 |
+
<robot name="yellow_pentagon.urdf">
|
| 3 |
+
<link name="baseLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="0.5"/>
|
| 6 |
+
<rolling_friction value="0.0001"/>
|
| 7 |
+
<inertia_scaling value="1.0"/>
|
| 8 |
+
</contact>
|
| 9 |
+
<inertial>
|
| 10 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 11 |
+
<mass value=".01"/>
|
| 12 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 13 |
+
</inertial>
|
| 14 |
+
<visual>
|
| 15 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 16 |
+
<geometry>
|
| 17 |
+
<mesh filename="pentagon.obj" scale="1.0 1.0 1.0"/>
|
| 18 |
+
</geometry>
|
| 19 |
+
<material name="yellow">
|
| 20 |
+
<color rgba="1 1 0.4 1"/>
|
| 21 |
+
</material>
|
| 22 |
+
</visual>
|
| 23 |
+
<collision>
|
| 24 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 25 |
+
<geometry>
|
| 26 |
+
<mesh filename="pentagon.obj" scale="1.0 1.0 1.0"/>
|
| 27 |
+
</geometry>
|
| 28 |
+
</collision>
|
| 29 |
+
</link>
|
| 30 |
+
</robot>
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/insert.urdf
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="0.0" ?>
|
| 2 |
+
<robot name="ell.urdf">
|
| 3 |
+
<link name="baseLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="0.3"/>
|
| 6 |
+
<rolling_friction value="0.0001"/>
|
| 7 |
+
<inertia_scaling value="3.0"/>
|
| 8 |
+
</contact>
|
| 9 |
+
<inertial>
|
| 10 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 11 |
+
<mass value=".1"/>
|
| 12 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 13 |
+
</inertial>
|
| 14 |
+
|
| 15 |
+
<visual>
|
| 16 |
+
<origin rpy="0 0 0" xyz="0.025 0 0"/>
|
| 17 |
+
<geometry>
|
| 18 |
+
<box size=".08 .03 .04"/>
|
| 19 |
+
</geometry>
|
| 20 |
+
<material name="red">
|
| 21 |
+
<color rgba="0. 0.3412 0.3490 1"/>
|
| 22 |
+
</material>
|
| 23 |
+
</visual>
|
| 24 |
+
<collision>
|
| 25 |
+
<origin rpy="0 0 0" xyz="0.025 0 0"/>
|
| 26 |
+
<geometry>
|
| 27 |
+
<box size=".08 .03 .04"/>
|
| 28 |
+
</geometry>
|
| 29 |
+
</collision>
|
| 30 |
+
|
| 31 |
+
<visual>
|
| 32 |
+
<origin rpy="0 0 0" xyz="0 0.025 0"/>
|
| 33 |
+
<geometry>
|
| 34 |
+
<box size=".03 .08 .0399"/>
|
| 35 |
+
</geometry>
|
| 36 |
+
<material name="dark">
|
| 37 |
+
<color rgba="0. 0.3412 0.3490 1"/>
|
| 38 |
+
</material>
|
| 39 |
+
</visual>
|
| 40 |
+
<collision>
|
| 41 |
+
<origin rpy="0 0 0" xyz="0 0.025 0"/>
|
| 42 |
+
<geometry>
|
| 43 |
+
<box size=".03 .08 .0399"/>
|
| 44 |
+
</geometry>
|
| 45 |
+
</collision>
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
<visual>
|
| 49 |
+
<origin rpy="0 0 0" xyz="0.075 0.025 0"/>
|
| 50 |
+
<geometry>
|
| 51 |
+
<box size=".03 .08 .0399"/>
|
| 52 |
+
</geometry>
|
| 53 |
+
<material name="dark">
|
| 54 |
+
<color rgba="0. 0.3412 0.3490 1"/>
|
| 55 |
+
</material>
|
| 56 |
+
</visual>
|
| 57 |
+
<collision>
|
| 58 |
+
<origin rpy="0 0 0" xyz="0.075 0.025 0"/>
|
| 59 |
+
<geometry>
|
| 60 |
+
<box size=".03 .08 .0399"/>
|
| 61 |
+
</geometry>
|
| 62 |
+
</collision>
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
</link>
|
| 66 |
+
</robot>
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/plane.obj
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Blender v2.66 (sub 1) OBJ File: ''
|
| 2 |
+
# www.blender.org
|
| 3 |
+
mtllib plane.mtl
|
| 4 |
+
o Plane
|
| 5 |
+
v 15.000000 -15.000000 0.000000
|
| 6 |
+
v 15.000000 15.000000 0.000000
|
| 7 |
+
v -15.000000 15.000000 0.000000
|
| 8 |
+
v -15.000000 -15.000000 0.000000
|
| 9 |
+
|
| 10 |
+
vt 15.000000 0.000000
|
| 11 |
+
vt 15.000000 15.000000
|
| 12 |
+
vt 0.000000 15.000000
|
| 13 |
+
vt 0.000000 0.000000
|
| 14 |
+
|
| 15 |
+
usemtl Material
|
| 16 |
+
s off
|
| 17 |
+
f 1/1 2/2 3/3
|
| 18 |
+
f 1/1 3/3 4/4
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/base.obj
ADDED
|
@@ -0,0 +1,396 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Object Export From Tinkercad Server 2015
|
| 2 |
+
|
| 3 |
+
mtllib obj.mtl
|
| 4 |
+
|
| 5 |
+
o obj_0
|
| 6 |
+
v 7.413 37.27 25
|
| 7 |
+
v 7.413 37.27 0
|
| 8 |
+
v 33.513 17.913 25
|
| 9 |
+
v 35.107 14.542 25
|
| 10 |
+
v 35.107 14.542 0
|
| 11 |
+
v 33.513 17.913 0
|
| 12 |
+
v -31.596 21.112 25
|
| 13 |
+
v -31.596 21.112 0
|
| 14 |
+
v -33.513 17.913 0
|
| 15 |
+
v -33.513 17.913 25
|
| 16 |
+
v 3.725 37.817 0
|
| 17 |
+
v 3.725 37.817 25
|
| 18 |
+
v -29.374 24.107 25
|
| 19 |
+
v -29.374 24.107 0
|
| 20 |
+
v 0 38 0
|
| 21 |
+
v 11.031 36.364 25
|
| 22 |
+
v 11.031 36.364 0
|
| 23 |
+
v 14.542 35.107 25
|
| 24 |
+
v 14.542 35.107 0
|
| 25 |
+
v -37.27 -7.413 25
|
| 26 |
+
v 17.913 33.513 25
|
| 27 |
+
v -37.27 -7.413 0
|
| 28 |
+
v -11.031 -36.364 25
|
| 29 |
+
v 17.913 33.513 0
|
| 30 |
+
v -36.364 -11.031 0
|
| 31 |
+
v -14.542 -35.107 25
|
| 32 |
+
v -26.87 26.87 25
|
| 33 |
+
v -36.364 -11.031 25
|
| 34 |
+
v -14.542 -35.107 0
|
| 35 |
+
v -26.87 26.87 0
|
| 36 |
+
v -3.725 37.817 0
|
| 37 |
+
v -11.031 -36.364 0
|
| 38 |
+
v 24.107 -29.374 25
|
| 39 |
+
v -17.913 -33.513 25
|
| 40 |
+
v -17.913 -33.513 0
|
| 41 |
+
v 21.112 -31.596 25
|
| 42 |
+
v 21.112 -31.596 0
|
| 43 |
+
v 24.107 -29.374 0
|
| 44 |
+
v -3.725 37.817 25
|
| 45 |
+
v 0 38 25
|
| 46 |
+
v 17.913 -33.513 25
|
| 47 |
+
v 17.913 -33.513 0
|
| 48 |
+
v 37.817 -3.725 25
|
| 49 |
+
v -37.817 -3.725 25
|
| 50 |
+
v -37.817 -3.725 0
|
| 51 |
+
v 37.817 -3.725 0
|
| 52 |
+
v 38 0 0
|
| 53 |
+
v -21.112 -31.596 25
|
| 54 |
+
v 38 0 25
|
| 55 |
+
v 14.542 -35.107 25
|
| 56 |
+
v -21.112 -31.596 0
|
| 57 |
+
v 36.364 11.031 25
|
| 58 |
+
v 14.542 -35.107 0
|
| 59 |
+
v 36.364 11.031 0
|
| 60 |
+
v 37.27 -7.413 25
|
| 61 |
+
v 37.27 -7.413 0
|
| 62 |
+
v -24.107 29.374 25
|
| 63 |
+
v 21.112 31.596 25
|
| 64 |
+
v -24.107 29.374 0
|
| 65 |
+
v 36.364 -11.031 25
|
| 66 |
+
v 21.112 31.596 0
|
| 67 |
+
v 36.364 -11.031 0
|
| 68 |
+
v -38 0 25
|
| 69 |
+
v 11.031 -36.364 25
|
| 70 |
+
v 11.031 -36.364 0
|
| 71 |
+
v -21.112 31.596 25
|
| 72 |
+
v -21.112 31.596 0
|
| 73 |
+
v 7.413 -37.27 25
|
| 74 |
+
v 7.413 -37.27 0
|
| 75 |
+
v -17.913 33.513 25
|
| 76 |
+
v -17.913 33.513 0
|
| 77 |
+
v 24.107 29.374 0
|
| 78 |
+
v -38 0 0
|
| 79 |
+
v 26.87 26.87 0
|
| 80 |
+
v 35.107 -14.542 25
|
| 81 |
+
v 29.374 24.107 0
|
| 82 |
+
v 35.107 -14.542 0
|
| 83 |
+
v 31.596 21.112 0
|
| 84 |
+
v 3.725 -37.817 25
|
| 85 |
+
v 37.27 7.413 25
|
| 86 |
+
v 3.725 -37.817 0
|
| 87 |
+
v 24.107 29.374 25
|
| 88 |
+
v -24.107 -29.374 25
|
| 89 |
+
v -14.542 35.107 25
|
| 90 |
+
v -24.107 -29.374 0
|
| 91 |
+
v -14.542 35.107 0
|
| 92 |
+
v 37.27 7.413 0
|
| 93 |
+
v 33.513 -17.913 25
|
| 94 |
+
v 37.817 3.725 0
|
| 95 |
+
v 33.513 -17.913 0
|
| 96 |
+
v -11.031 36.364 25
|
| 97 |
+
v -11.031 36.364 0
|
| 98 |
+
v -7.413 37.27 25
|
| 99 |
+
v 26.87 26.87 25
|
| 100 |
+
v -7.413 37.27 0
|
| 101 |
+
v -26.87 -26.87 25
|
| 102 |
+
v -26.87 -26.87 0
|
| 103 |
+
v 37.817 3.725 25
|
| 104 |
+
v 0 -38 25
|
| 105 |
+
v 31.596 -21.112 25
|
| 106 |
+
v 0 -38 0
|
| 107 |
+
v 31.596 -21.112 0
|
| 108 |
+
v 29.374 24.107 25
|
| 109 |
+
v -29.374 -24.107 25
|
| 110 |
+
v -29.374 -24.107 0
|
| 111 |
+
v 29.374 -24.107 25
|
| 112 |
+
v 31.596 21.112 25
|
| 113 |
+
v 29.374 -24.107 0
|
| 114 |
+
v -3.725 -37.817 25
|
| 115 |
+
v -31.596 -21.112 25
|
| 116 |
+
v -3.725 -37.817 0
|
| 117 |
+
v -31.596 -21.112 0
|
| 118 |
+
v -37.817 3.725 25
|
| 119 |
+
v -37.817 3.725 0
|
| 120 |
+
v 26.87 -26.87 25
|
| 121 |
+
v 26.87 -26.87 0
|
| 122 |
+
v -37.27 7.413 0
|
| 123 |
+
v -37.27 7.413 25
|
| 124 |
+
v -7.413 -37.27 25
|
| 125 |
+
v -33.513 -17.913 25
|
| 126 |
+
v -33.513 -17.913 0
|
| 127 |
+
v -7.413 -37.27 0
|
| 128 |
+
v -36.364 11.031 25
|
| 129 |
+
v -36.364 11.031 0
|
| 130 |
+
v -35.107 -14.542 25
|
| 131 |
+
v -35.107 -14.542 0
|
| 132 |
+
v -35.107 14.542 25
|
| 133 |
+
v -35.107 14.542 0
|
| 134 |
+
# 128 vertices
|
| 135 |
+
|
| 136 |
+
g group_0_2829873
|
| 137 |
+
|
| 138 |
+
usemtl color_2829873
|
| 139 |
+
s 0
|
| 140 |
+
|
| 141 |
+
f 3 4 5
|
| 142 |
+
f 3 5 6
|
| 143 |
+
f 7 8 9
|
| 144 |
+
f 7 9 10
|
| 145 |
+
f 1 2 11
|
| 146 |
+
f 1 11 12
|
| 147 |
+
f 16 17 2
|
| 148 |
+
f 16 2 1
|
| 149 |
+
f 13 14 8
|
| 150 |
+
f 13 8 7
|
| 151 |
+
f 18 19 17
|
| 152 |
+
f 18 17 16
|
| 153 |
+
f 23 26 29
|
| 154 |
+
f 23 29 32
|
| 155 |
+
f 26 34 35
|
| 156 |
+
f 26 35 29
|
| 157 |
+
f 33 36 37
|
| 158 |
+
f 33 37 38
|
| 159 |
+
f 15 31 39
|
| 160 |
+
f 15 39 40
|
| 161 |
+
f 20 22 25
|
| 162 |
+
f 20 25 28
|
| 163 |
+
f 36 41 42
|
| 164 |
+
f 36 42 37
|
| 165 |
+
f 44 45 22
|
| 166 |
+
f 44 22 20
|
| 167 |
+
f 21 24 19
|
| 168 |
+
f 21 19 18
|
| 169 |
+
f 43 46 47
|
| 170 |
+
f 43 47 49
|
| 171 |
+
f 27 30 14
|
| 172 |
+
f 27 14 13
|
| 173 |
+
f 41 50 53
|
| 174 |
+
f 41 53 42
|
| 175 |
+
f 43 55 56
|
| 176 |
+
f 43 56 46
|
| 177 |
+
f 34 48 51
|
| 178 |
+
f 34 51 35
|
| 179 |
+
f 4 52 54
|
| 180 |
+
f 4 54 5
|
| 181 |
+
f 50 64 65
|
| 182 |
+
f 50 65 53
|
| 183 |
+
f 57 59 30
|
| 184 |
+
f 57 30 27
|
| 185 |
+
f 55 60 62
|
| 186 |
+
f 55 62 56
|
| 187 |
+
f 66 67 59
|
| 188 |
+
f 66 59 57
|
| 189 |
+
f 64 68 69
|
| 190 |
+
f 64 69 65
|
| 191 |
+
f 58 61 24
|
| 192 |
+
f 58 24 21
|
| 193 |
+
f 63 73 45
|
| 194 |
+
f 63 45 44
|
| 195 |
+
f 70 71 67
|
| 196 |
+
f 70 67 66
|
| 197 |
+
f 60 75 77
|
| 198 |
+
f 60 77 62
|
| 199 |
+
f 82 72 61
|
| 200 |
+
f 82 61 58
|
| 201 |
+
f 68 79 81
|
| 202 |
+
f 68 81 69
|
| 203 |
+
f 48 83 85
|
| 204 |
+
f 48 85 51
|
| 205 |
+
f 84 86 71
|
| 206 |
+
f 84 71 70
|
| 207 |
+
f 75 88 90
|
| 208 |
+
f 75 90 77
|
| 209 |
+
f 91 92 86
|
| 210 |
+
f 91 86 84
|
| 211 |
+
f 15 11 2
|
| 212 |
+
f 15 2 17
|
| 213 |
+
f 15 17 19
|
| 214 |
+
f 15 19 24
|
| 215 |
+
f 15 24 61
|
| 216 |
+
f 15 61 72
|
| 217 |
+
f 15 72 74
|
| 218 |
+
f 15 74 76
|
| 219 |
+
f 15 76 78
|
| 220 |
+
f 15 78 6
|
| 221 |
+
f 15 6 5
|
| 222 |
+
f 15 5 54
|
| 223 |
+
f 15 54 87
|
| 224 |
+
f 15 87 89
|
| 225 |
+
f 15 89 47
|
| 226 |
+
f 52 80 87
|
| 227 |
+
f 52 87 54
|
| 228 |
+
f 94 74 72
|
| 229 |
+
f 94 72 82
|
| 230 |
+
f 93 95 92
|
| 231 |
+
f 93 92 91
|
| 232 |
+
f 83 96 97
|
| 233 |
+
f 83 97 85
|
| 234 |
+
f 80 98 89
|
| 235 |
+
f 80 89 87
|
| 236 |
+
f 79 99 101
|
| 237 |
+
f 79 101 81
|
| 238 |
+
f 88 100 102
|
| 239 |
+
f 88 102 90
|
| 240 |
+
f 94 103 76
|
| 241 |
+
f 94 76 74
|
| 242 |
+
f 39 31 95
|
| 243 |
+
f 39 95 93
|
| 244 |
+
f 104 105 97
|
| 245 |
+
f 104 97 96
|
| 246 |
+
f 98 49 47
|
| 247 |
+
f 98 47 89
|
| 248 |
+
f 100 106 108
|
| 249 |
+
f 100 108 102
|
| 250 |
+
f 103 107 78
|
| 251 |
+
f 103 78 76
|
| 252 |
+
f 101 99 109
|
| 253 |
+
f 101 109 111
|
| 254 |
+
f 110 112 105
|
| 255 |
+
f 110 105 104
|
| 256 |
+
f 113 114 73
|
| 257 |
+
f 113 73 63
|
| 258 |
+
f 106 115 116
|
| 259 |
+
f 106 116 108
|
| 260 |
+
f 107 3 6
|
| 261 |
+
f 107 6 78
|
| 262 |
+
f 118 117 114
|
| 263 |
+
f 118 114 113
|
| 264 |
+
f 120 121 112
|
| 265 |
+
f 120 112 110
|
| 266 |
+
f 109 119 122
|
| 267 |
+
f 109 122 111
|
| 268 |
+
f 123 124 117
|
| 269 |
+
f 123 117 118
|
| 270 |
+
f 125 126 121
|
| 271 |
+
f 125 121 120
|
| 272 |
+
f 127 128 124
|
| 273 |
+
f 127 124 123
|
| 274 |
+
f 115 33 38
|
| 275 |
+
f 115 38 116
|
| 276 |
+
f 10 9 128
|
| 277 |
+
f 10 128 127
|
| 278 |
+
f 28 25 126
|
| 279 |
+
f 28 126 125
|
| 280 |
+
f 119 23 32
|
| 281 |
+
f 119 32 122
|
| 282 |
+
f 73 114 117
|
| 283 |
+
f 73 117 124
|
| 284 |
+
f 73 124 128
|
| 285 |
+
f 73 128 9
|
| 286 |
+
f 73 9 8
|
| 287 |
+
f 73 8 14
|
| 288 |
+
f 73 14 30
|
| 289 |
+
f 73 30 59
|
| 290 |
+
f 73 59 67
|
| 291 |
+
f 73 67 71
|
| 292 |
+
f 73 71 86
|
| 293 |
+
f 73 86 92
|
| 294 |
+
f 73 92 95
|
| 295 |
+
f 73 95 31
|
| 296 |
+
f 73 31 15
|
| 297 |
+
f 81 101 15
|
| 298 |
+
f 47 46 15
|
| 299 |
+
f 46 56 15
|
| 300 |
+
f 56 62 15
|
| 301 |
+
f 62 77 15
|
| 302 |
+
f 77 90 15
|
| 303 |
+
f 90 102 15
|
| 304 |
+
f 102 108 15
|
| 305 |
+
f 108 116 15
|
| 306 |
+
f 116 38 15
|
| 307 |
+
f 38 37 15
|
| 308 |
+
f 37 42 15
|
| 309 |
+
f 42 53 15
|
| 310 |
+
f 53 65 15
|
| 311 |
+
f 69 15 65
|
| 312 |
+
f 81 15 69
|
| 313 |
+
f 45 73 15
|
| 314 |
+
f 101 111 15
|
| 315 |
+
f 111 122 15
|
| 316 |
+
f 122 32 15
|
| 317 |
+
f 32 29 15
|
| 318 |
+
f 29 35 15
|
| 319 |
+
f 35 51 15
|
| 320 |
+
f 51 85 15
|
| 321 |
+
f 85 97 15
|
| 322 |
+
f 97 105 15
|
| 323 |
+
f 105 112 15
|
| 324 |
+
f 112 121 15
|
| 325 |
+
f 121 126 15
|
| 326 |
+
f 126 25 15
|
| 327 |
+
f 22 15 25
|
| 328 |
+
f 45 15 22
|
| 329 |
+
f 49 98 80
|
| 330 |
+
f 49 80 52
|
| 331 |
+
f 49 52 4
|
| 332 |
+
f 49 4 3
|
| 333 |
+
f 49 3 107
|
| 334 |
+
f 49 107 103
|
| 335 |
+
f 49 103 94
|
| 336 |
+
f 49 94 82
|
| 337 |
+
f 49 82 58
|
| 338 |
+
f 49 58 21
|
| 339 |
+
f 49 21 18
|
| 340 |
+
f 49 18 16
|
| 341 |
+
f 49 16 1
|
| 342 |
+
f 49 1 12
|
| 343 |
+
f 49 12 40
|
| 344 |
+
f 40 39 93
|
| 345 |
+
f 40 93 91
|
| 346 |
+
f 40 91 84
|
| 347 |
+
f 40 84 70
|
| 348 |
+
f 40 70 66
|
| 349 |
+
f 40 66 57
|
| 350 |
+
f 40 57 27
|
| 351 |
+
f 40 27 13
|
| 352 |
+
f 40 13 7
|
| 353 |
+
f 40 7 10
|
| 354 |
+
f 40 10 127
|
| 355 |
+
f 40 127 123
|
| 356 |
+
f 40 123 118
|
| 357 |
+
f 40 118 113
|
| 358 |
+
f 63 40 113
|
| 359 |
+
f 68 40 79
|
| 360 |
+
f 64 40 68
|
| 361 |
+
f 50 40 64
|
| 362 |
+
f 41 40 50
|
| 363 |
+
f 36 40 41
|
| 364 |
+
f 33 40 36
|
| 365 |
+
f 115 40 33
|
| 366 |
+
f 106 40 115
|
| 367 |
+
f 100 40 106
|
| 368 |
+
f 88 40 100
|
| 369 |
+
f 75 40 88
|
| 370 |
+
f 60 40 75
|
| 371 |
+
f 55 40 60
|
| 372 |
+
f 43 40 55
|
| 373 |
+
f 49 40 43
|
| 374 |
+
f 99 79 40
|
| 375 |
+
f 20 40 44
|
| 376 |
+
f 28 40 20
|
| 377 |
+
f 125 40 28
|
| 378 |
+
f 120 40 125
|
| 379 |
+
f 110 40 120
|
| 380 |
+
f 104 40 110
|
| 381 |
+
f 96 40 104
|
| 382 |
+
f 83 40 96
|
| 383 |
+
f 48 40 83
|
| 384 |
+
f 34 40 48
|
| 385 |
+
f 26 40 34
|
| 386 |
+
f 23 40 26
|
| 387 |
+
f 119 40 23
|
| 388 |
+
f 109 40 119
|
| 389 |
+
f 99 40 109
|
| 390 |
+
f 63 44 40
|
| 391 |
+
f 12 11 15
|
| 392 |
+
f 12 15 40
|
| 393 |
+
# 252 faces
|
| 394 |
+
|
| 395 |
+
#end of obj_0
|
| 396 |
+
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/cylinder.urdf
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="0.0" ?>
|
| 2 |
+
<robot name="cylinder.urdf">
|
| 3 |
+
<link name="headLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="1.0"/>
|
| 6 |
+
<rolling_friction value="0.0001"/>
|
| 7 |
+
<inertia_scaling value="3.0"/>
|
| 8 |
+
</contact>
|
| 9 |
+
<inertial>
|
| 10 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 11 |
+
<mass value=".1"/>
|
| 12 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 13 |
+
</inertial>
|
| 14 |
+
<visual>
|
| 15 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 16 |
+
<geometry>
|
| 17 |
+
<mesh filename="head.obj" scale="0.001 0.001 0.001"/>
|
| 18 |
+
</geometry>
|
| 19 |
+
<material name="darkgrey">
|
| 20 |
+
<color rgba="0.2 0.2 0.2 1"/>
|
| 21 |
+
</material>
|
| 22 |
+
</visual>
|
| 23 |
+
<collision>
|
| 24 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 25 |
+
<geometry>
|
| 26 |
+
<mesh filename="head.obj" scale="0.001 0.001 0.001"/>
|
| 27 |
+
</geometry>
|
| 28 |
+
</collision>
|
| 29 |
+
</link>
|
| 30 |
+
|
| 31 |
+
<joint name="tipJoint" type="fixed">
|
| 32 |
+
<parent link="headLink"/>
|
| 33 |
+
<child link="tipLink"/>
|
| 34 |
+
<origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.029"/>
|
| 35 |
+
<axis xyz="0 0 1"/>
|
| 36 |
+
<limit effort="150.0" lower="-6.28318530718" upper="6.28318530718" velocity="3.15"/>
|
| 37 |
+
<dynamics damping="10.0" friction="0.0"/>
|
| 38 |
+
</joint>
|
| 39 |
+
|
| 40 |
+
<link name="tipLink">
|
| 41 |
+
<contact>
|
| 42 |
+
<lateral_friction value="1.0"/>
|
| 43 |
+
<rolling_friction value="0.0001"/>
|
| 44 |
+
<inertia_scaling value="3.0"/>
|
| 45 |
+
</contact>
|
| 46 |
+
<inertial>
|
| 47 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 48 |
+
<mass value=".1"/>
|
| 49 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 50 |
+
</inertial>
|
| 51 |
+
<visual>
|
| 52 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 53 |
+
<geometry>
|
| 54 |
+
<cylinder length="0.05" radius="0.005"/>
|
| 55 |
+
</geometry>
|
| 56 |
+
<material name="blue">
|
| 57 |
+
<color rgba="0.18039216, 0.50588235, 0.77254902 1"/>
|
| 58 |
+
</material>
|
| 59 |
+
</visual>
|
| 60 |
+
<collision>
|
| 61 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 62 |
+
<geometry>
|
| 63 |
+
<cylinder length="0.05" radius="0.005"/>
|
| 64 |
+
</geometry>
|
| 65 |
+
</collision>
|
| 66 |
+
</link>
|
| 67 |
+
|
| 68 |
+
<!-- <link name="asdfLink">
|
| 69 |
+
<contact>
|
| 70 |
+
<lateral_friction value="1.0"/>
|
| 71 |
+
<rolling_friction value="0.0001"/>
|
| 72 |
+
<inertia_scaling value="3.0"/>
|
| 73 |
+
</contact>
|
| 74 |
+
<inertial>
|
| 75 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 76 |
+
<mass value=".1"/>
|
| 77 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 78 |
+
</inertial>
|
| 79 |
+
<visual>
|
| 80 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 81 |
+
<geometry>
|
| 82 |
+
<cylinder length="0.028" radius="0.001"/>
|
| 83 |
+
</geometry>
|
| 84 |
+
</visual>
|
| 85 |
+
</link>
|
| 86 |
+
|
| 87 |
+
<joint name="asdfoint" type="fixed">
|
| 88 |
+
<parent link="tipLink"/>
|
| 89 |
+
<child link="asdfLink"/>
|
| 90 |
+
<origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0"/>
|
| 91 |
+
<axis xyz="0 0 1"/>
|
| 92 |
+
<limit effort="150.0" lower="-6.28318530718" upper="6.28318530718" velocity="3.15"/>
|
| 93 |
+
<dynamics damping="10.0" friction="0.0"/>
|
| 94 |
+
</joint> -->
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
</robot>
|
| 98 |
+
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/cylinder_real.urdf
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="0.0" ?>
|
| 2 |
+
<robot name="cylinder_real.urdf">
|
| 3 |
+
<link name="headLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="1.0"/>
|
| 6 |
+
<rolling_friction value="0.0001"/>
|
| 7 |
+
<inertia_scaling value="3.0"/>
|
| 8 |
+
</contact>
|
| 9 |
+
<inertial>
|
| 10 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 11 |
+
<mass value=".1"/>
|
| 12 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 13 |
+
</inertial>
|
| 14 |
+
<visual>
|
| 15 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 16 |
+
<geometry>
|
| 17 |
+
<mesh filename="head.obj" scale="0.001 0.001 0.001"/>
|
| 18 |
+
</geometry>
|
| 19 |
+
<material name="darkgrey">
|
| 20 |
+
<color rgba="0.2 0.2 0.2 1"/>
|
| 21 |
+
</material>
|
| 22 |
+
</visual>
|
| 23 |
+
<collision>
|
| 24 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 25 |
+
<geometry>
|
| 26 |
+
<mesh filename="head.obj" scale="0.001 0.001 0.001"/>
|
| 27 |
+
</geometry>
|
| 28 |
+
</collision>
|
| 29 |
+
</link>
|
| 30 |
+
|
| 31 |
+
<joint name="tipJoint" type="fixed">
|
| 32 |
+
<parent link="headLink"/>
|
| 33 |
+
<child link="tipLink"/>
|
| 34 |
+
<origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.029"/>
|
| 35 |
+
<axis xyz="0 0 1"/>
|
| 36 |
+
<limit effort="150.0" lower="-6.28318530718" upper="6.28318530718" velocity="3.15"/>
|
| 37 |
+
<dynamics damping="10.0" friction="0.0"/>
|
| 38 |
+
</joint>
|
| 39 |
+
|
| 40 |
+
<link name="tipLink">
|
| 41 |
+
<contact>
|
| 42 |
+
<lateral_friction value="1.0"/>
|
| 43 |
+
<rolling_friction value="0.0001"/>
|
| 44 |
+
<inertia_scaling value="3.0"/>
|
| 45 |
+
</contact>
|
| 46 |
+
<inertial>
|
| 47 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 48 |
+
<mass value=".1"/>
|
| 49 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 50 |
+
</inertial>
|
| 51 |
+
<visual>
|
| 52 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 53 |
+
<geometry>
|
| 54 |
+
<cylinder length="0.135" radius="0.0127"/>
|
| 55 |
+
</geometry>
|
| 56 |
+
<material name="blue">
|
| 57 |
+
<color rgba="0.5, 0.5, 0.5 1"/>
|
| 58 |
+
</material>
|
| 59 |
+
</visual>
|
| 60 |
+
<collision>
|
| 61 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 62 |
+
<geometry>
|
| 63 |
+
<cylinder length="0.135" radius="0.0127"/>
|
| 64 |
+
</geometry>
|
| 65 |
+
</collision>
|
| 66 |
+
</link>
|
| 67 |
+
|
| 68 |
+
<!-- <link name="asdfLink">
|
| 69 |
+
<contact>
|
| 70 |
+
<lateral_friction value="1.0"/>
|
| 71 |
+
<rolling_friction value="0.0001"/>
|
| 72 |
+
<inertia_scaling value="3.0"/>
|
| 73 |
+
</contact>
|
| 74 |
+
<inertial>
|
| 75 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 76 |
+
<mass value=".1"/>
|
| 77 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 78 |
+
</inertial>
|
| 79 |
+
<visual>
|
| 80 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 81 |
+
<geometry>
|
| 82 |
+
<cylinder length="0.028" radius="0.001"/>
|
| 83 |
+
</geometry>
|
| 84 |
+
</visual>
|
| 85 |
+
</link>
|
| 86 |
+
|
| 87 |
+
<joint name="asdfoint" type="fixed">
|
| 88 |
+
<parent link="tipLink"/>
|
| 89 |
+
<child link="asdfLink"/>
|
| 90 |
+
<origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0"/>
|
| 91 |
+
<axis xyz="0 0 1"/>
|
| 92 |
+
<limit effort="150.0" lower="-6.28318530718" upper="6.28318530718" velocity="3.15"/>
|
| 93 |
+
<dynamics damping="10.0" friction="0.0"/>
|
| 94 |
+
</joint> -->
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
</robot>
|
| 98 |
+
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/head.obj
ADDED
|
@@ -0,0 +1,396 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
v 3.537 3.537 0
|
| 15 |
+
v 3.866 3.173 0
|
| 16 |
+
v 4.159 2.779 0
|
| 17 |
+
v 4.411 2.358 0
|
| 18 |
+
v 4.621 1.915 0
|
| 19 |
+
v 4.786 1.453 0
|
| 20 |
+
v 4.905 0.977 0
|
| 21 |
+
v 4.977 0.492 0
|
| 22 |
+
v 5.001 0.001 0
|
| 23 |
+
v -2.776 4.159 0
|
| 24 |
+
v 4.159 -2.776 30
|
| 25 |
+
v -2.356 4.411 0
|
| 26 |
+
v -1.912 4.621 0
|
| 27 |
+
v -1.45 4.786 0
|
| 28 |
+
v -0.974 4.905 0
|
| 29 |
+
v -0.489 4.977 0
|
| 30 |
+
v 4.411 -2.356 30
|
| 31 |
+
v 4.621 -1.912 30
|
| 32 |
+
v 4.786 -1.45 30
|
| 33 |
+
v -4.999 0.001 0
|
| 34 |
+
v -4.974 0.492 0
|
| 35 |
+
v -4.903 0.977 0
|
| 36 |
+
v -4.783 1.453 0
|
| 37 |
+
v -4.618 1.915 0
|
| 38 |
+
v -4.408 2.358 0
|
| 39 |
+
v 4.905 -0.974 30
|
| 40 |
+
v -4.156 2.779 0
|
| 41 |
+
v -3.864 3.173 0
|
| 42 |
+
v -3.534 3.537 0
|
| 43 |
+
v -3.171 3.866 0
|
| 44 |
+
v 4.977 -0.489 30
|
| 45 |
+
v 4.977 -0.489 0
|
| 46 |
+
v 4.905 -0.974 0
|
| 47 |
+
v 4.786 -1.45 0
|
| 48 |
+
v 4.621 -1.912 0
|
| 49 |
+
v 4.411 -2.356 0
|
| 50 |
+
v 4.159 -2.776 0
|
| 51 |
+
v 0.001 -4.999 30
|
| 52 |
+
v 3.866 -3.171 0
|
| 53 |
+
v 3.537 -3.534 0
|
| 54 |
+
v 3.173 -3.864 0
|
| 55 |
+
v 2.779 -4.156 0
|
| 56 |
+
v 2.358 -4.408 0
|
| 57 |
+
v 1.915 -4.618 0
|
| 58 |
+
v 0.492 -4.974 30
|
| 59 |
+
v 1.453 -4.783 0
|
| 60 |
+
v 0.977 -4.902 0
|
| 61 |
+
v 0.492 -4.974 0
|
| 62 |
+
v 0.001 -4.999 0
|
| 63 |
+
v 0.977 -4.902 30
|
| 64 |
+
v 1.453 -4.783 30
|
| 65 |
+
v 1.915 -4.618 30
|
| 66 |
+
v -3.171 -3.864 0
|
| 67 |
+
v -3.534 -3.534 0
|
| 68 |
+
v -3.864 -3.171 0
|
| 69 |
+
v -4.156 -2.776 0
|
| 70 |
+
v -4.408 -2.356 0
|
| 71 |
+
v -4.618 -1.912 0
|
| 72 |
+
v -4.783 -1.45 0
|
| 73 |
+
v -4.903 -0.974 0
|
| 74 |
+
v -4.974 -0.489 0
|
| 75 |
+
v 2.358 -4.408 30
|
| 76 |
+
v 2.779 -4.156 30
|
| 77 |
+
v -0.489 -4.974 0
|
| 78 |
+
v -0.974 -4.902 0
|
| 79 |
+
v -1.45 -4.783 0
|
| 80 |
+
v -1.912 -4.618 0
|
| 81 |
+
v -2.356 -4.408 0
|
| 82 |
+
v -2.776 -4.156 0
|
| 83 |
+
v 3.173 -3.864 30
|
| 84 |
+
v 3.537 -3.534 30
|
| 85 |
+
v 0.001 5.001 30
|
| 86 |
+
v 2.779 4.159 30
|
| 87 |
+
v 2.358 4.411 30
|
| 88 |
+
v 1.915 4.621 30
|
| 89 |
+
v 3.866 -3.171 30
|
| 90 |
+
v 1.453 4.786 30
|
| 91 |
+
v 0.977 4.905 30
|
| 92 |
+
v 0.492 4.977 30
|
| 93 |
+
v 5.001 0.001 30
|
| 94 |
+
v 4.977 0.492 30
|
| 95 |
+
v 4.905 0.977 30
|
| 96 |
+
v 4.786 1.453 30
|
| 97 |
+
v 4.621 1.915 30
|
| 98 |
+
v 4.411 2.358 30
|
| 99 |
+
v 4.159 2.779 30
|
| 100 |
+
v 3.866 3.173 30
|
| 101 |
+
v 3.537 3.537 30
|
| 102 |
+
v 3.173 3.866 30
|
| 103 |
+
v -0.489 4.977 30
|
| 104 |
+
v -0.974 4.905 30
|
| 105 |
+
v -1.45 4.786 30
|
| 106 |
+
v -1.912 4.621 30
|
| 107 |
+
v -2.356 4.411 30
|
| 108 |
+
v -2.776 4.159 30
|
| 109 |
+
v -3.171 3.866 30
|
| 110 |
+
v -3.534 3.537 30
|
| 111 |
+
v -3.864 3.173 30
|
| 112 |
+
v -4.156 2.779 30
|
| 113 |
+
v -4.408 2.358 30
|
| 114 |
+
v -4.618 1.915 30
|
| 115 |
+
v -4.783 1.453 30
|
| 116 |
+
v -4.903 0.977 30
|
| 117 |
+
v -4.974 0.492 30
|
| 118 |
+
v -4.999 0.001 30
|
| 119 |
+
v -4.974 -0.489 30
|
| 120 |
+
v -4.903 -0.974 30
|
| 121 |
+
v -4.783 -1.45 30
|
| 122 |
+
v -4.618 -1.912 30
|
| 123 |
+
v -4.408 -2.356 30
|
| 124 |
+
v -4.156 -2.776 30
|
| 125 |
+
v -3.864 -3.171 30
|
| 126 |
+
v -3.534 -3.534 30
|
| 127 |
+
v -3.171 -3.864 30
|
| 128 |
+
v -0.489 -4.974 30
|
| 129 |
+
v -2.776 -4.156 30
|
| 130 |
+
v -2.356 -4.408 30
|
| 131 |
+
v -1.912 -4.618 30
|
| 132 |
+
v -1.45 -4.783 30
|
| 133 |
+
v -0.974 -4.902 30
|
| 134 |
+
# 128 vertices
|
| 135 |
+
|
| 136 |
+
g group_0_16089887
|
| 137 |
+
|
| 138 |
+
usemtl color_16089887
|
| 139 |
+
s 0
|
| 140 |
+
|
| 141 |
+
f 2 3 1
|
| 142 |
+
f 1 3 4
|
| 143 |
+
f 1 4 5
|
| 144 |
+
f 1 5 6
|
| 145 |
+
f 1 6 7
|
| 146 |
+
f 1 7 8
|
| 147 |
+
f 9 10 8
|
| 148 |
+
f 8 10 11
|
| 149 |
+
f 8 11 12
|
| 150 |
+
f 8 12 13
|
| 151 |
+
f 8 13 14
|
| 152 |
+
f 8 14 15
|
| 153 |
+
f 8 15 16
|
| 154 |
+
f 8 16 17
|
| 155 |
+
f 8 17 40
|
| 156 |
+
f 22 8 21
|
| 157 |
+
f 20 21 8
|
| 158 |
+
f 23 8 22
|
| 159 |
+
f 24 8 23
|
| 160 |
+
f 1 8 24
|
| 161 |
+
f 18 20 8
|
| 162 |
+
f 31 8 30
|
| 163 |
+
f 32 8 31
|
| 164 |
+
f 33 8 32
|
| 165 |
+
f 35 8 33
|
| 166 |
+
f 29 30 8
|
| 167 |
+
f 36 8 35
|
| 168 |
+
f 37 8 36
|
| 169 |
+
f 38 8 37
|
| 170 |
+
f 18 8 38
|
| 171 |
+
f 28 29 8
|
| 172 |
+
f 44 8 43
|
| 173 |
+
f 42 43 8
|
| 174 |
+
f 41 42 8
|
| 175 |
+
f 45 8 44
|
| 176 |
+
f 47 8 45
|
| 177 |
+
f 50 8 49
|
| 178 |
+
f 51 8 50
|
| 179 |
+
f 48 49 8
|
| 180 |
+
f 52 8 51
|
| 181 |
+
f 54 8 52
|
| 182 |
+
f 55 8 54
|
| 183 |
+
f 56 8 55
|
| 184 |
+
f 57 8 56
|
| 185 |
+
f 72 8 57
|
| 186 |
+
f 47 48 8
|
| 187 |
+
f 40 41 8
|
| 188 |
+
f 64 8 63
|
| 189 |
+
f 65 8 64
|
| 190 |
+
f 66 8 65
|
| 191 |
+
f 62 63 8
|
| 192 |
+
f 67 8 66
|
| 193 |
+
f 68 8 67
|
| 194 |
+
f 69 8 68
|
| 195 |
+
f 28 8 69
|
| 196 |
+
f 61 62 8
|
| 197 |
+
f 72 73 8
|
| 198 |
+
f 75 8 74
|
| 199 |
+
f 73 74 8
|
| 200 |
+
f 76 8 75
|
| 201 |
+
f 77 8 76
|
| 202 |
+
f 61 8 77
|
| 203 |
+
f 98 82 80
|
| 204 |
+
f 80 83 85
|
| 205 |
+
f 80 85 86
|
| 206 |
+
f 80 86 87
|
| 207 |
+
f 19 45 44
|
| 208 |
+
f 19 44 25
|
| 209 |
+
f 43 26 44
|
| 210 |
+
f 43 42 27
|
| 211 |
+
f 42 41 27
|
| 212 |
+
f 89 90 88
|
| 213 |
+
f 88 90 91
|
| 214 |
+
f 88 91 92
|
| 215 |
+
f 88 92 93
|
| 216 |
+
f 88 93 94
|
| 217 |
+
f 88 94 95
|
| 218 |
+
f 96 97 88
|
| 219 |
+
f 97 81 88
|
| 220 |
+
f 82 88 81
|
| 221 |
+
f 95 96 88
|
| 222 |
+
f 114 115 82
|
| 223 |
+
f 25 44 26
|
| 224 |
+
f 34 27 41
|
| 225 |
+
f 43 27 26
|
| 226 |
+
f 34 41 40
|
| 227 |
+
f 99 82 98
|
| 228 |
+
f 100 82 99
|
| 229 |
+
f 101 82 100
|
| 230 |
+
f 102 82 101
|
| 231 |
+
f 103 82 102
|
| 232 |
+
f 83 80 82
|
| 233 |
+
f 55 58 53
|
| 234 |
+
f 34 40 39
|
| 235 |
+
f 58 55 54
|
| 236 |
+
f 82 103 104
|
| 237 |
+
f 82 104 105
|
| 238 |
+
f 82 105 106
|
| 239 |
+
f 82 106 107
|
| 240 |
+
f 82 107 108
|
| 241 |
+
f 82 108 109
|
| 242 |
+
f 82 109 110
|
| 243 |
+
f 82 110 111
|
| 244 |
+
f 82 111 112
|
| 245 |
+
f 82 112 113
|
| 246 |
+
f 82 113 114
|
| 247 |
+
f 56 53 57
|
| 248 |
+
f 53 56 55
|
| 249 |
+
f 39 88 82
|
| 250 |
+
f 19 25 82
|
| 251 |
+
f 25 26 82
|
| 252 |
+
f 27 82 26
|
| 253 |
+
f 34 82 27
|
| 254 |
+
f 39 82 34
|
| 255 |
+
f 57 53 46
|
| 256 |
+
f 70 82 60
|
| 257 |
+
f 59 60 82
|
| 258 |
+
f 58 59 82
|
| 259 |
+
f 71 82 70
|
| 260 |
+
f 53 58 82
|
| 261 |
+
f 78 82 71
|
| 262 |
+
f 79 82 78
|
| 263 |
+
f 84 82 79
|
| 264 |
+
f 19 82 84
|
| 265 |
+
f 46 53 82
|
| 266 |
+
f 122 124 82
|
| 267 |
+
f 71 50 78
|
| 268 |
+
f 54 59 58
|
| 269 |
+
f 5 83 82
|
| 270 |
+
f 71 51 50
|
| 271 |
+
f 48 78 49
|
| 272 |
+
f 59 54 60
|
| 273 |
+
f 52 60 54
|
| 274 |
+
f 5 85 83
|
| 275 |
+
f 49 78 50
|
| 276 |
+
f 52 51 60
|
| 277 |
+
f 70 60 51
|
| 278 |
+
f 116 82 115
|
| 279 |
+
f 117 82 116
|
| 280 |
+
f 118 82 117
|
| 281 |
+
f 119 82 118
|
| 282 |
+
f 120 82 119
|
| 283 |
+
f 121 82 120
|
| 284 |
+
f 122 82 121
|
| 285 |
+
f 85 4 3
|
| 286 |
+
f 71 70 51
|
| 287 |
+
f 46 82 123
|
| 288 |
+
f 125 126 82
|
| 289 |
+
f 123 82 128
|
| 290 |
+
f 127 82 126
|
| 291 |
+
f 128 82 127
|
| 292 |
+
f 124 125 82
|
| 293 |
+
f 48 79 78
|
| 294 |
+
f 24 98 80
|
| 295 |
+
f 48 47 79
|
| 296 |
+
f 84 79 47
|
| 297 |
+
f 16 89 88
|
| 298 |
+
f 84 47 19
|
| 299 |
+
f 16 90 89
|
| 300 |
+
f 95 94 11
|
| 301 |
+
f 14 91 90
|
| 302 |
+
f 82 7 6
|
| 303 |
+
f 92 91 13
|
| 304 |
+
f 12 92 13
|
| 305 |
+
f 80 1 24
|
| 306 |
+
f 8 97 96
|
| 307 |
+
f 76 75 125
|
| 308 |
+
f 57 46 72
|
| 309 |
+
f 126 75 127
|
| 310 |
+
f 72 123 128
|
| 311 |
+
f 46 123 72
|
| 312 |
+
f 81 97 7
|
| 313 |
+
f 7 82 81
|
| 314 |
+
f 69 68 114
|
| 315 |
+
f 85 3 86
|
| 316 |
+
f 115 67 116
|
| 317 |
+
f 117 116 66
|
| 318 |
+
f 86 3 87
|
| 319 |
+
f 2 87 3
|
| 320 |
+
f 37 105 104
|
| 321 |
+
f 116 67 66
|
| 322 |
+
f 2 80 87
|
| 323 |
+
f 121 120 62
|
| 324 |
+
f 66 65 118
|
| 325 |
+
f 66 118 117
|
| 326 |
+
f 121 62 122
|
| 327 |
+
f 61 122 62
|
| 328 |
+
f 65 119 118
|
| 329 |
+
f 120 119 63
|
| 330 |
+
f 107 35 33
|
| 331 |
+
f 115 114 68
|
| 332 |
+
f 122 61 124
|
| 333 |
+
f 120 63 62
|
| 334 |
+
f 68 67 115
|
| 335 |
+
f 14 13 91
|
| 336 |
+
f 77 124 61
|
| 337 |
+
f 113 29 28
|
| 338 |
+
f 77 76 124
|
| 339 |
+
f 125 124 76
|
| 340 |
+
f 12 93 92
|
| 341 |
+
f 126 125 75
|
| 342 |
+
f 119 65 64
|
| 343 |
+
f 113 28 114
|
| 344 |
+
f 69 114 28
|
| 345 |
+
f 127 75 74
|
| 346 |
+
f 112 111 29
|
| 347 |
+
f 94 93 12
|
| 348 |
+
f 74 73 127
|
| 349 |
+
f 64 63 119
|
| 350 |
+
f 128 73 72
|
| 351 |
+
f 112 29 113
|
| 352 |
+
f 104 18 38
|
| 353 |
+
f 104 38 37
|
| 354 |
+
f 98 24 23
|
| 355 |
+
f 8 7 97
|
| 356 |
+
f 35 107 106
|
| 357 |
+
f 40 88 39
|
| 358 |
+
f 110 109 31
|
| 359 |
+
f 101 21 20
|
| 360 |
+
f 128 127 73
|
| 361 |
+
f 98 23 99
|
| 362 |
+
f 23 100 99
|
| 363 |
+
f 6 5 82
|
| 364 |
+
f 101 20 102
|
| 365 |
+
f 85 5 4
|
| 366 |
+
f 20 18 103
|
| 367 |
+
f 20 103 102
|
| 368 |
+
f 18 104 103
|
| 369 |
+
f 1 80 2
|
| 370 |
+
f 37 106 105
|
| 371 |
+
f 107 33 108
|
| 372 |
+
f 33 109 108
|
| 373 |
+
f 88 17 16
|
| 374 |
+
f 15 90 16
|
| 375 |
+
f 15 14 90
|
| 376 |
+
f 94 12 11
|
| 377 |
+
f 10 95 11
|
| 378 |
+
f 95 10 96
|
| 379 |
+
f 9 96 10
|
| 380 |
+
f 9 8 96
|
| 381 |
+
f 40 17 88
|
| 382 |
+
f 100 22 101
|
| 383 |
+
f 109 33 32
|
| 384 |
+
f 32 31 109
|
| 385 |
+
f 111 110 30
|
| 386 |
+
f 31 30 110
|
| 387 |
+
f 111 30 29
|
| 388 |
+
f 100 23 22
|
| 389 |
+
f 21 101 22
|
| 390 |
+
f 37 36 106
|
| 391 |
+
f 36 35 106
|
| 392 |
+
f 19 47 45
|
| 393 |
+
# 252 faces
|
| 394 |
+
|
| 395 |
+
#end of obj_0
|
| 396 |
+
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/mid.obj
ADDED
|
@@ -0,0 +1,2134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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35.107 0
|
| 12 |
+
v 31.366 0 24.448
|
| 13 |
+
v 29 0 24.7348
|
| 14 |
+
v -29.4178 -24.048 15.875
|
| 15 |
+
v -29.3593 -24.1232 15.875
|
| 16 |
+
v -17.841 30.499 22.151
|
| 17 |
+
v 23.821 -23.511 23.561
|
| 18 |
+
v -9.235 34.018 22.151
|
| 19 |
+
v 34.5141 -15.7959 17
|
| 20 |
+
v 35.107 -14.542 17
|
| 21 |
+
v 35.4949 -13.4585 17
|
| 22 |
+
v 35.0704 -14.4701 17
|
| 23 |
+
v 35.107 -14.542 16.5646
|
| 24 |
+
v 19.086 -32.629 18.172
|
| 25 |
+
v 34.7754 -15.2433 16.808
|
| 26 |
+
v 36.871 -9.751 18.172
|
| 27 |
+
v 0 35.218 22.151
|
| 28 |
+
v 23.0418 -29.8391 17
|
| 29 |
+
v 19.2451 -32.7147 17
|
| 30 |
+
v 21.112 -31.596 17
|
| 31 |
+
v 24.107 -29.374 17
|
| 32 |
+
v 0 33.25 23.561
|
| 33 |
+
v 27.224 26.87 15.875
|
| 34 |
+
v -27.224 -26.87 15.875
|
| 35 |
+
v -20.1874 32.1501 16.1531
|
| 36 |
+
v -20.4974 31.9643 15.875
|
| 37 |
+
v 38.172 0 18.172
|
| 38 |
+
v 18.605 -31.807 20.313
|
| 39 |
+
v -9.3502 36.7849 15.875
|
| 40 |
+
v 35.943 -9.506 20.313
|
| 41 |
+
v -9.965 36.705 15.875
|
| 42 |
+
v 37.21 0 20.313
|
| 43 |
+
v 17.84 -30.499 22.151
|
| 44 |
+
v -10.342 36.5365 15.9699
|
| 45 |
+
v -10.4325 36.5139 15.875
|
| 46 |
+
v 27.751 -8.418 24.75
|
| 47 |
+
v 26.792 -11.098 24.75
|
| 48 |
+
v 26.792 -11.098 24.6977
|
| 49 |
+
v 27.751 -8.418 24.7164
|
| 50 |
+
v 34.465 -9.115 22.151
|
| 51 |
+
v 35.681 0 22.151
|
| 52 |
+
v 25.576 -13.67 24.7131
|
| 53 |
+
v 22.179 -21.891 24.448
|
| 54 |
+
v 33.687 0 23.561
|
| 55 |
+
v 27.0371 26.6856 14.025
|
| 56 |
+
v -27.0371 -26.6856 14.025
|
| 57 |
+
v 37.188 -9.835 15.875
|
| 58 |
+
v -32.6246 -19.3954 13.578
|
| 59 |
+
v 20.1874 -32.1501 16.1531
|
| 60 |
+
v 20.4974 -31.9643 15.875
|
| 61 |
+
v 26.87 26.87 14.3533
|
| 62 |
+
v 38.5 0 15.875
|
| 63 |
+
v -26.87 -26.87 14.3533
|
| 64 |
+
v -31.596 -21.112 15.2913
|
| 65 |
+
v -32.4905 -19.6194 13.8015
|
| 66 |
+
v 25.576 -13.67 24.75
|
| 67 |
+
v -15.683 -26.811 24.448
|
| 68 |
+
v 25.1718 -14.3444 24.7268
|
| 69 |
+
v 24.6473 -15.2195 24.7117
|
| 70 |
+
v -19.1645 32.763 14.6776
|
| 71 |
+
v -36.871 -9.751 18.172
|
| 72 |
+
v 24.113 -16.111 24.6963
|
| 73 |
+
v -38.172 0 18.172
|
| 74 |
+
v -35.4943 -13.4603 17
|
| 75 |
+
v -35.107 -14.542 17
|
| 76 |
+
v -35.1653 -14.2444 17
|
| 77 |
+
v -35.3852 -13.7649 16.8777
|
| 78 |
+
v -13.1265 13.1265 35.747
|
| 79 |
+
v -18.625 18.625 24.75
|
| 80 |
+
v -13.1265 -13.1265 35.747
|
| 81 |
+
v 25.23 24.903 22.151
|
| 82 |
+
v -9.9461 36.6357 15.3646
|
| 83 |
+
v -9.4809 36.7522 15.7634
|
| 84 |
+
v -18.625 -18.625 24.75
|
| 85 |
+
v 16.844 -28.795 23.561
|
| 86 |
+
v -34.5149 -15.7941 17
|
| 87 |
+
v -35.107 -14.542 16.5651
|
| 88 |
+
v -13 -13 35.747
|
| 89 |
+
v -13 -10 35.747
|
| 90 |
+
v -13 10 35.747
|
| 91 |
+
v -13 13 35.747
|
| 92 |
+
v -13.671 25.576 24.75
|
| 93 |
+
v -16.112 24.113 24.75
|
| 94 |
+
v -18.397 22.417 24.75
|
| 95 |
+
v -20.506 20.506 24.75
|
| 96 |
+
v -22.417 18.397 24.75
|
| 97 |
+
v -24.113 16.112 24.75
|
| 98 |
+
v -25.576 13.671 24.75
|
| 99 |
+
v -35.943 -9.506 20.313
|
| 100 |
+
v -26.793 11.098 24.75
|
| 101 |
+
v -27.751 8.418 24.75
|
| 102 |
+
v -37.211 0 20.313
|
| 103 |
+
v -28.443 5.658 24.75
|
| 104 |
+
v -28.86 2.843 24.75
|
| 105 |
+
v 24.113 -16.111 24.75
|
| 106 |
+
v -29 0 24.75
|
| 107 |
+
v 36.6961 -9.7048 13.1747
|
| 108 |
+
v 36.523 -10.3962 13.4177
|
| 109 |
+
v 36.4086 -10.8531 13.578
|
| 110 |
+
v -8.719 32.117 23.561
|
| 111 |
+
v -28.86 -2.842 24.75
|
| 112 |
+
v -28.443 -5.658 24.75
|
| 113 |
+
v -27.751 -8.418 24.75
|
| 114 |
+
v -26.793 -11.098 24.75
|
| 115 |
+
v -25.576 -13.67 24.75
|
| 116 |
+
v -24.113 -16.111 24.75
|
| 117 |
+
v -22.417 -18.397 24.75
|
| 118 |
+
v -20.506 -20.506 24.75
|
| 119 |
+
v 36.871 -9.751 13.578
|
| 120 |
+
v 22.417 -18.397 24.6885
|
| 121 |
+
v -34.465 -9.115 22.151
|
| 122 |
+
v -18.397 -22.417 24.75
|
| 123 |
+
v -16.112 -24.113 24.75
|
| 124 |
+
v -13.671 -25.576 24.75
|
| 125 |
+
v -35.681 0 22.151
|
| 126 |
+
v 37.9544 -0.9279 13.3691
|
| 127 |
+
v -27.9473 25.6813 17
|
| 128 |
+
v 37.8998 -2.0405 13.578
|
| 129 |
+
v 19.1645 -32.763 14.6776
|
| 130 |
+
v -28.6531 24.9024 16.4377
|
| 131 |
+
v -8.118 29.904 24.448
|
| 132 |
+
v 37.0837 -8.1571 13.578
|
| 133 |
+
v -33.688 0 23.561
|
| 134 |
+
v 38.172 0 13.578
|
| 135 |
+
v 0 30.959 24.448
|
| 136 |
+
v 22.417 -18.397 24.75
|
| 137 |
+
v -25.23 -24.903 22.151
|
| 138 |
+
v 20.6333 -20.3655 24.7131
|
| 139 |
+
v 20.506 -20.506 24.7087
|
| 140 |
+
v 0 29 24.6886
|
| 141 |
+
v 38 0 13.1954
|
| 142 |
+
v -38.5 0 15.875
|
| 143 |
+
v -37.188 -9.835 15.875
|
| 144 |
+
v 13 13 35.747
|
| 145 |
+
v 15.683 -26.811 24.448
|
| 146 |
+
v 11.098 26.793 24.75
|
| 147 |
+
v 8.418 27.751 24.75
|
| 148 |
+
v 5.658 28.443 24.75
|
| 149 |
+
v 35.3852 -13.7649 14.8723
|
| 150 |
+
v 2.842 28.86 24.75
|
| 151 |
+
v 35.107 -14.542 15.1849
|
| 152 |
+
v 0 29 24.75
|
| 153 |
+
v 17.913 -33.513 17
|
| 154 |
+
v 19.107 -32.7975 17
|
| 155 |
+
v 18.2144 -33.3324 15.875
|
| 156 |
+
v -2.843 28.86 24.75
|
| 157 |
+
v -5.658 28.443 24.75
|
| 158 |
+
v -8.418 27.751 24.75
|
| 159 |
+
v -11.098 26.793 24.75
|
| 160 |
+
v 28.6531 24.9024 15.3123
|
| 161 |
+
v 19.25 -32.909 15.875
|
| 162 |
+
v 20.506 -20.506 24.75
|
| 163 |
+
v 36.364 -11.031 13.7743
|
| 164 |
+
v 2.2501 28.8892 24.6663
|
| 165 |
+
v 19.5525 -21.3699 24.6948
|
| 166 |
+
v 18.397 -22.417 24.6779
|
| 167 |
+
v 2.842 28.86 24.6604
|
| 168 |
+
v 37.817 -3.725 14.5724
|
| 169 |
+
v 37.3366 -6.964 14.2345
|
| 170 |
+
v 37.27 -7.413 14.1876
|
| 171 |
+
v 37.2447 -7.5139 14.105
|
| 172 |
+
v 5.658 28.443 24.6667
|
| 173 |
+
v 18.397 -22.417 24.75
|
| 174 |
+
v 16.111 -24.113 24.6813
|
| 175 |
+
v 7.5897 27.9587 24.6954
|
| 176 |
+
v 8.418 27.751 24.6804
|
| 177 |
+
v 18.3829 -33.2314 15.6624
|
| 178 |
+
v 15.683 26.811 24.448
|
| 179 |
+
v 16.111 -24.113 24.75
|
| 180 |
+
v 33.058 -18.838 18.172
|
| 181 |
+
v 14.6252 -25.0035 24.7044
|
| 182 |
+
v -28.6531 -24.9024 15.3123
|
| 183 |
+
v 13.67 -25.576 24.6836
|
| 184 |
+
v 9.5463 27.3477 24.6737
|
| 185 |
+
v 33.342 -19 15.875
|
| 186 |
+
v 11.098 26.793 24.6646
|
| 187 |
+
v 13.67 -25.576 24.75
|
| 188 |
+
v 14.4322 -34.7087 17
|
| 189 |
+
v 14.542 -35.107 17
|
| 190 |
+
v -23.821 -23.511 23.561
|
| 191 |
+
v 13 10 78
|
| 192 |
+
v 13 -10 78
|
| 193 |
+
v 13 -10 35.747
|
| 194 |
+
v 13 10 35.747
|
| 195 |
+
v 13 13 78
|
| 196 |
+
v -36.6961 -9.7048 13.1747
|
| 197 |
+
v -36.9012 -8.8859 13.3881
|
| 198 |
+
v -37.0837 -8.1571 13.578
|
| 199 |
+
v 13 -13 78
|
| 200 |
+
v 13 -13 35.747
|
| 201 |
+
v -38 0 0
|
| 202 |
+
v -37.817 3.725 0
|
| 203 |
+
v -37.27 7.413 0
|
| 204 |
+
v -36.364 11.031 0
|
| 205 |
+
v -35.107 14.542 0
|
| 206 |
+
v -33.513 17.913 0
|
| 207 |
+
v -31.596 21.112 0
|
| 208 |
+
v -29.374 24.107 0
|
| 209 |
+
v 32.9839 -18.7959 13.3878
|
| 210 |
+
v 32.787 -19.1245 13.492
|
| 211 |
+
v -37.8998 -2.0405 13.578
|
| 212 |
+
v -38 0 13.195
|
| 213 |
+
v 33.058 -18.838 13.578
|
| 214 |
+
v -37.817 -3.725 0
|
| 215 |
+
v -36.871 -9.751 13.578
|
| 216 |
+
v -29.374 -24.107 0
|
| 217 |
+
v -31.596 -21.112 0
|
| 218 |
+
v -33.513 -17.913 0
|
| 219 |
+
v -35.107 -14.542 0
|
| 220 |
+
v -36.364 -11.031 0
|
| 221 |
+
v -37.27 -7.413 0
|
| 222 |
+
v -12.9343 25.9244 24.6781
|
| 223 |
+
v -11.098 26.793 24.6646
|
| 224 |
+
v -29 0 24.7348
|
| 225 |
+
v -28.9728 0.5514 24.7292
|
| 226 |
+
v 23.821 23.511 23.561
|
| 227 |
+
v -28.86 2.843 24.7058
|
| 228 |
+
v -38.172 0 13.578
|
| 229 |
+
v 33.29 -18.2852 13.578
|
| 230 |
+
v -26.87 26.87 0
|
| 231 |
+
v -8.418 27.751 24.6804
|
| 232 |
+
v -26.4007 27.2953 17
|
| 233 |
+
v -26.992 26.641 18.172
|
| 234 |
+
v -7.5897 27.9587 24.6954
|
| 235 |
+
v -5.658 28.443 24.6667
|
| 236 |
+
v 33.513 -17.913 14.0141
|
| 237 |
+
v -36.4086 -10.8531 13.578
|
| 238 |
+
v 33.3822 -18.1313 13.7583
|
| 239 |
+
v -26.312 25.97 20.313
|
| 240 |
+
v -5.3976 28.4816 24.6661
|
| 241 |
+
v -2.843 28.86 24.6604
|
| 242 |
+
v 29.374 24.107 0
|
| 243 |
+
v 31.596 21.112 0
|
| 244 |
+
v 33.513 17.913 0
|
| 245 |
+
v 35.107 14.542 0
|
| 246 |
+
v 36.364 11.031 0
|
| 247 |
+
v 37.27 7.413 0
|
| 248 |
+
v 37.817 3.725 0
|
| 249 |
+
v 38 0 0
|
| 250 |
+
v -29.374 24.107 17
|
| 251 |
+
v -31.596 21.112 17
|
| 252 |
+
v -37.7626 -4.0915 14.5336
|
| 253 |
+
v -30.0813 22.9362 17
|
| 254 |
+
v -37.817 -3.725 14.5719
|
| 255 |
+
v 30.297 -8.013 24.448
|
| 256 |
+
v -37.8341 -3.3776 14.3669
|
| 257 |
+
v -13.671 -25.576 24.6835
|
| 258 |
+
v 37.817 -3.725 0
|
| 259 |
+
v 37.27 -7.413 0
|
| 260 |
+
v 36.364 -11.031 0
|
| 261 |
+
v 35.107 -14.542 0
|
| 262 |
+
v 33.513 -17.913 0
|
| 263 |
+
v 31.596 -21.112 0
|
| 264 |
+
v 29.374 -24.107 0
|
| 265 |
+
v -13 13 78
|
| 266 |
+
v -22.179 -21.891 24.448
|
| 267 |
+
v 14.542 35.107 0
|
| 268 |
+
v 17.913 33.513 0
|
| 269 |
+
v 21.112 31.596 0
|
| 270 |
+
v 24.107 29.374 0
|
| 271 |
+
v -10 10 35.747
|
| 272 |
+
v -10 -10 35.747
|
| 273 |
+
v 10 -10 35.747
|
| 274 |
+
v 10 10 35.747
|
| 275 |
+
v -10 10 78
|
| 276 |
+
v -10 -10 78
|
| 277 |
+
v 26.87 26.87 0
|
| 278 |
+
v -31.921 20.5697 17
|
| 279 |
+
v 10 10 78
|
| 280 |
+
v 10 -10 78
|
| 281 |
+
v -31.596 21.112 16.4587
|
| 282 |
+
v 22.179 21.891 24.448
|
| 283 |
+
v -37.27 -7.413 14.1873
|
| 284 |
+
v 32.54 -8.606 23.561
|
| 285 |
+
v 11.031 -36.364 0
|
| 286 |
+
v -25.0698 28.5015 15.875
|
| 287 |
+
v 7.413 -37.27 0
|
| 288 |
+
v -27.224 26.87 15.875
|
| 289 |
+
v 3.725 -37.817 0
|
| 290 |
+
v -32.225 18.364 20.313
|
| 291 |
+
v 0 -38 0
|
| 292 |
+
v -3.725 -37.817 0
|
| 293 |
+
v -7.413 -37.27 0
|
| 294 |
+
v -11.031 -36.364 0
|
| 295 |
+
v -30.901 17.609 22.151
|
| 296 |
+
v -34.7754 -15.2433 14.942
|
| 297 |
+
v 13.67 25.576 24.6836
|
| 298 |
+
v -35.107 -14.542 15.1854
|
| 299 |
+
v 8.719 -32.117 23.561
|
| 300 |
+
v -36.0809 -11.8217 14.0923
|
| 301 |
+
v -36.364 -11.031 13.7744
|
| 302 |
+
v 13.67 25.576 24.75
|
| 303 |
+
v 13 10 0
|
| 304 |
+
v 13 13 0
|
| 305 |
+
v 26.87 -26.87 0
|
| 306 |
+
v -16.112 -24.113 24.6813
|
| 307 |
+
v 29.374 -24.107 17
|
| 308 |
+
v 31.596 -21.112 17
|
| 309 |
+
v 30.0813 -22.9362 17
|
| 310 |
+
v -14.6261 -25.0036 24.7044
|
| 311 |
+
v -29.174 16.625 23.561
|
| 312 |
+
v 8.118 -29.904 24.448
|
| 313 |
+
v -33.058 -18.838 18.172
|
| 314 |
+
v 31.921 -20.5697 17
|
| 315 |
+
v 0 -30.959 24.448
|
| 316 |
+
v 31.596 -21.112 16.4587
|
| 317 |
+
v -25.6086 28.0132 15.419
|
| 318 |
+
v -33.342 -19 15.875
|
| 319 |
+
v 13 -13 0
|
| 320 |
+
v 13 -10 0
|
| 321 |
+
v 0 -29 24.6886
|
| 322 |
+
v -27.0371 26.6856 14.025
|
| 323 |
+
v -26.87 26.87 14.3533
|
| 324 |
+
v 14.6252 25.0035 24.7044
|
| 325 |
+
v 32.225 -18.364 20.313
|
| 326 |
+
v -29.4178 24.048 15.875
|
| 327 |
+
v 0 -38 17
|
| 328 |
+
v 3.725 -37.817 17
|
| 329 |
+
v 7.413 -37.27 17
|
| 330 |
+
v 4.8389 -37.2129 17
|
| 331 |
+
v 16.111 24.113 24.6813
|
| 332 |
+
v 0 -37.8413 17
|
| 333 |
+
v -29.3593 24.1232 15.875
|
| 334 |
+
v 30.901 -17.609 22.151
|
| 335 |
+
v -27.164 15.479 24.448
|
| 336 |
+
v 9.88 -36.393 18.172
|
| 337 |
+
v 0 -37.676 18.172
|
| 338 |
+
v 16.111 24.113 24.75
|
| 339 |
+
v 9.9234 -36.5522 17
|
| 340 |
+
v 9.9461 -36.6357 16.3854
|
| 341 |
+
v -16.2025 -24.0458 24.6812
|
| 342 |
+
v 29.174 -16.625 23.561
|
| 343 |
+
v 11.031 -36.364 17
|
| 344 |
+
v -18.397 -22.417 24.6779
|
| 345 |
+
v 33.058 18.838 18.172
|
| 346 |
+
v -33.1638 -18.4957 13.4995
|
| 347 |
+
v 18.397 22.417 24.6779
|
| 348 |
+
v -33.29 -18.2852 13.578
|
| 349 |
+
v 16.2014 24.0459 24.6812
|
| 350 |
+
v -33.058 -18.838 13.578
|
| 351 |
+
v -28.443 5.658 24.7109
|
| 352 |
+
v 33.342 19 15.875
|
| 353 |
+
v -32.9839 -18.7959 13.3878
|
| 354 |
+
v 9.631 -35.476 20.313
|
| 355 |
+
v 18.397 22.417 24.75
|
| 356 |
+
v -27.164 -15.479 24.448
|
| 357 |
+
v 29.4178 -24.048 15.875
|
| 358 |
+
v 29.3593 -24.1232 15.875
|
| 359 |
+
v 0 -36.727 20.313
|
| 360 |
+
v -33.513 -17.913 14.0143
|
| 361 |
+
v -32.6246 19.3954 13.578
|
| 362 |
+
v -25.23 24.903 22.151
|
| 363 |
+
v 20.506 20.506 24.7087
|
| 364 |
+
v 9.235 -34.018 22.151
|
| 365 |
+
v -20.506 -20.506 24.7087
|
| 366 |
+
v 27.164 15.479 24.448
|
| 367 |
+
v 0 -35.218 22.151
|
| 368 |
+
v -31.6197 21.0725 15.252
|
| 369 |
+
v -31.596 21.112 15.2914
|
| 370 |
+
v 33.1638 18.4957 13.4995
|
| 371 |
+
v 33.29 18.2852 13.578
|
| 372 |
+
v 33.058 18.838 13.578
|
| 373 |
+
v -14.542 -35.107 0
|
| 374 |
+
v -17.913 -33.513 0
|
| 375 |
+
v -21.112 -31.596 0
|
| 376 |
+
v -24.107 -29.374 0
|
| 377 |
+
v 0 -33.25 23.561
|
| 378 |
+
v 32.9839 18.7959 13.3878
|
| 379 |
+
v 20.506 20.506 24.75
|
| 380 |
+
v -21.5138 -19.3937 24.7009
|
| 381 |
+
v -22.417 -18.397 24.6885
|
| 382 |
+
v -20.6333 -20.3655 24.7131
|
| 383 |
+
v 32.6246 -19.3954 13.578
|
| 384 |
+
v 21.5138 19.3937 24.7009
|
| 385 |
+
v 22.417 18.397 24.6885
|
| 386 |
+
v 33.513 17.913 14.0143
|
| 387 |
+
v 20.6333 20.3655 24.7131
|
| 388 |
+
v -32.54 8.606 23.561
|
| 389 |
+
v 9.3502 -36.7849 15.875
|
| 390 |
+
v -24.113 -16.111 24.6964
|
| 391 |
+
v 31.596 -21.112 15.2914
|
| 392 |
+
v 31.6197 -21.0725 15.252
|
| 393 |
+
v 9.965 -36.705 15.875
|
| 394 |
+
v -24.107 -29.374 17
|
| 395 |
+
v -21.112 -31.596 17
|
| 396 |
+
v 10.342 -36.5365 15.9699
|
| 397 |
+
v -23.2383 -29.6906 17
|
| 398 |
+
v 10.4325 -36.5139 15.875
|
| 399 |
+
v 22.417 18.397 24.75
|
| 400 |
+
v -19.086 -32.629 18.172
|
| 401 |
+
v 36.871 9.751 18.172
|
| 402 |
+
v -19.2451 -32.7147 17
|
| 403 |
+
v -25.172 -14.344 24.7269
|
| 404 |
+
v 35.4943 13.4603 17
|
| 405 |
+
v -25.576 -13.67 24.7132
|
| 406 |
+
v 35.107 14.542 17
|
| 407 |
+
v 35.1653 14.2444 17
|
| 408 |
+
v -30.297 8.013 24.448
|
| 409 |
+
v 35.3852 13.7649 16.8777
|
| 410 |
+
v 24.113 16.112 24.6962
|
| 411 |
+
v -31.366 0 24.448
|
| 412 |
+
v -18.605 -31.807 20.313
|
| 413 |
+
v 34.5149 15.7941 17
|
| 414 |
+
v 24.113 16.112 24.75
|
| 415 |
+
v 19.25 32.909 15.875
|
| 416 |
+
v 35.107 14.542 16.5651
|
| 417 |
+
v 25.1722 14.3447 24.7267
|
| 418 |
+
v 25.576 13.671 24.7131
|
| 419 |
+
v 19.107 32.7975 17
|
| 420 |
+
v 17.913 33.513 17
|
| 421 |
+
v 18.3829 33.2314 16.0876
|
| 422 |
+
v -25.6732 -13.4645 24.712
|
| 423 |
+
v -26.793 -11.098 24.6976
|
| 424 |
+
v -17.841 -30.499 22.151
|
| 425 |
+
v 35.943 9.506 20.313
|
| 426 |
+
v 25.576 13.671 24.75
|
| 427 |
+
v -33.058 18.838 18.172
|
| 428 |
+
v 18.2144 33.3324 15.875
|
| 429 |
+
v -33.342 19 15.875
|
| 430 |
+
v -27.751 8.418 24.7164
|
| 431 |
+
v -28.0047 7.4061 24.7357
|
| 432 |
+
v -27.8234 8.1291 24.7219
|
| 433 |
+
v 25.6751 13.4612 24.7118
|
| 434 |
+
v -27.751 -8.418 24.7164
|
| 435 |
+
v 34.465 9.115 22.151
|
| 436 |
+
v 26.792 11.098 24.6977
|
| 437 |
+
v -20.4974 -31.9643 15.875
|
| 438 |
+
v -28.1502 -6.8258 24.7275
|
| 439 |
+
v -28.443 -5.658 24.7109
|
| 440 |
+
v -28.0047 -7.4061 24.7357
|
| 441 |
+
v 26.792 11.098 24.75
|
| 442 |
+
v 27.751 8.418 24.7164
|
| 443 |
+
v 9.9461 -36.6357 15.3646
|
| 444 |
+
v 9.4809 -36.7522 15.7634
|
| 445 |
+
v 27.751 8.418 24.75
|
| 446 |
+
v -28.86 -2.842 24.7059
|
| 447 |
+
v 28.1502 6.8258 24.7275
|
| 448 |
+
v 28.443 5.658 24.7109
|
| 449 |
+
v -32.9839 18.7959 13.3878
|
| 450 |
+
v -32.787 19.1245 13.492
|
| 451 |
+
v 28.0047 7.4061 24.7357
|
| 452 |
+
v -33.058 18.838 13.578
|
| 453 |
+
v -13 10 78
|
| 454 |
+
v 37.188 9.835 15.875
|
| 455 |
+
v -13 -10 78
|
| 456 |
+
v 28.443 5.658 24.75
|
| 457 |
+
v 14.542 35.107 17
|
| 458 |
+
v -23.821 23.511 23.561
|
| 459 |
+
v 14.6609 34.6154 17
|
| 460 |
+
v -13 -13 78
|
| 461 |
+
v 28.86 2.843 24.7058
|
| 462 |
+
v -8.719 -32.117 23.561
|
| 463 |
+
v 28.86 2.843 24.75
|
| 464 |
+
v -33.29 18.2852 13.578
|
| 465 |
+
v 29 0 24.75
|
| 466 |
+
v 0 38 0
|
| 467 |
+
v 3.725 37.817 0
|
| 468 |
+
v 7.413 37.27 0
|
| 469 |
+
v 11.031 36.364 0
|
| 470 |
+
v -3.725 37.817 0
|
| 471 |
+
v -8.118 -29.904 24.448
|
| 472 |
+
v 28.9728 -0.5513 24.7292
|
| 473 |
+
v -11.031 36.364 0
|
| 474 |
+
v -7.413 37.27 0
|
| 475 |
+
v 28.86 -2.842 24.7059
|
| 476 |
+
v -19.1645 -32.763 14.6776
|
| 477 |
+
v -20.1874 -32.1501 15.5969
|
| 478 |
+
v -33.513 17.913 14.0141
|
| 479 |
+
v -33.3822 18.1313 13.7583
|
| 480 |
+
v -26.793 11.098 24.6976
|
| 481 |
+
v -34.5141 15.7959 17
|
| 482 |
+
v -35.107 14.542 17
|
| 483 |
+
v -35.4949 13.4585 17
|
| 484 |
+
v -35.0704 14.4701 17
|
| 485 |
+
v -35.107 14.542 16.5646
|
| 486 |
+
v -34.7754 15.2433 16.808
|
| 487 |
+
v -14.542 -35.107 17
|
| 488 |
+
v -36.871 9.751 18.172
|
| 489 |
+
v -14.6609 -34.6154 17
|
| 490 |
+
v -13 13 0
|
| 491 |
+
v 24.107 29.374 17
|
| 492 |
+
v 21.112 31.596 17
|
| 493 |
+
v 23.2383 29.6906 17
|
| 494 |
+
v 10 10 0
|
| 495 |
+
v 10 -10 0
|
| 496 |
+
v -10 -10 0
|
| 497 |
+
v -10 10 0
|
| 498 |
+
v -13 -10 0
|
| 499 |
+
v -13 10 0
|
| 500 |
+
v -11.031 -36.364 17
|
| 501 |
+
v 19.086 32.629 18.172
|
| 502 |
+
v -9.88 -36.393 18.172
|
| 503 |
+
v 19.2451 32.7147 17
|
| 504 |
+
v 27.9473 -25.6813 17
|
| 505 |
+
v -22.179 21.891 24.448
|
| 506 |
+
v -9.9234 -36.5522 17
|
| 507 |
+
v 28.6531 -24.9024 16.4377
|
| 508 |
+
v -9.9461 -36.6357 16.3854
|
| 509 |
+
v -35.943 9.506 20.313
|
| 510 |
+
v -7.413 -37.27 17
|
| 511 |
+
v -3.725 -37.817 17
|
| 512 |
+
v -5.0844 -37.1806 17
|
| 513 |
+
v 36.6961 9.7048 13.1747
|
| 514 |
+
v 36.9011 8.8863 13.3882
|
| 515 |
+
v 18.605 31.807 20.313
|
| 516 |
+
v 37.0837 8.1571 13.578
|
| 517 |
+
v 37.8998 2.0405 13.578
|
| 518 |
+
v -25.576 13.671 24.7132
|
| 519 |
+
v -34.465 9.115 22.151
|
| 520 |
+
v 36.871 9.751 13.578
|
| 521 |
+
v -13 -13 0
|
| 522 |
+
v -19.25 -32.909 15.875
|
| 523 |
+
v -9.631 -35.476 20.313
|
| 524 |
+
v -19.107 -32.7975 17
|
| 525 |
+
v -17.913 -33.513 17
|
| 526 |
+
v 17.84 30.499 22.151
|
| 527 |
+
v -16.844 28.795 23.561
|
| 528 |
+
v -18.3829 -33.2314 16.0876
|
| 529 |
+
v -9.235 -34.018 22.151
|
| 530 |
+
v -18.2144 -33.3324 15.875
|
| 531 |
+
v 11.031 36.364 17
|
| 532 |
+
v -37.188 9.835 15.875
|
| 533 |
+
v 20.4974 31.9643 15.875
|
| 534 |
+
v 9.88 36.393 18.172
|
| 535 |
+
v 36.4086 10.8531 13.578
|
| 536 |
+
v 9.9234 36.5522 17
|
| 537 |
+
v -10.4325 -36.5139 15.875
|
| 538 |
+
v 9.9461 36.6357 16.3854
|
| 539 |
+
v -24.113 16.112 24.6963
|
| 540 |
+
v -9.965 -36.705 15.875
|
| 541 |
+
v -25.1725 14.3443 24.7268
|
| 542 |
+
v -24.6486 15.2183 24.7117
|
| 543 |
+
v 37.7626 4.0915 14.5336
|
| 544 |
+
v 7.413 37.27 17
|
| 545 |
+
v 37.817 3.725 14.5719
|
| 546 |
+
v 3.725 37.817 17
|
| 547 |
+
v 0 38 17
|
| 548 |
+
v 0 37.8413 17
|
| 549 |
+
v 5.0844 37.1806 17
|
| 550 |
+
v -9.4809 -36.7522 15.9866
|
| 551 |
+
v -9.3502 -36.7849 15.875
|
| 552 |
+
v 37.8341 3.3776 14.3669
|
| 553 |
+
v 28.86 -2.842 24.75
|
| 554 |
+
v 0 37.676 18.172
|
| 555 |
+
v 28.443 -5.658 24.7109
|
| 556 |
+
v 27.164 -15.479 24.448
|
| 557 |
+
v 9.631 35.476 20.313
|
| 558 |
+
v 37.27 7.413 14.1873
|
| 559 |
+
v -24.107 29.374 0
|
| 560 |
+
v -21.112 31.596 0
|
| 561 |
+
v -17.913 33.513 0
|
| 562 |
+
v -14.542 35.107 0
|
| 563 |
+
v 0 36.727 20.313
|
| 564 |
+
v 9.235 34.018 22.151
|
| 565 |
+
v 19.1645 32.763 14.6776
|
| 566 |
+
v 20.1874 32.1501 15.5969
|
| 567 |
+
v -22.417 18.397 24.6885
|
| 568 |
+
v 35.107 14.542 15.1854
|
| 569 |
+
v 34.7754 15.2433 14.942
|
| 570 |
+
v 36.0809 11.8217 14.0923
|
| 571 |
+
v 36.364 11.031 13.7744
|
| 572 |
+
v -15.683 26.811 24.448
|
| 573 |
+
v 10.4325 36.5139 15.875
|
| 574 |
+
v -36.6961 9.7048 13.1747
|
| 575 |
+
v -36.523 10.3962 13.4177
|
| 576 |
+
v -36.4086 10.8531 13.578
|
| 577 |
+
v 9.965 36.705 15.875
|
| 578 |
+
v 26.4007 -27.2953 17
|
| 579 |
+
v -26.87 -26.87 0
|
| 580 |
+
v -36.871 9.751 13.578
|
| 581 |
+
v 26.992 -26.641 18.172
|
| 582 |
+
v 9.4809 36.7522 15.9866
|
| 583 |
+
v 9.3502 36.7849 15.875
|
| 584 |
+
v 31.921 20.5696 17
|
| 585 |
+
v 31.596 21.112 17
|
| 586 |
+
v 29.374 24.107 17
|
| 587 |
+
v 30.232 22.7423 17
|
| 588 |
+
v -37.9544 0.9279 13.3691
|
| 589 |
+
v 31.596 21.112 16.4586
|
| 590 |
+
v -37.8998 2.0405 13.578
|
| 591 |
+
v 31.6197 21.0725 16.498
|
| 592 |
+
v 26.312 -25.97 20.313
|
| 593 |
+
v -20.6333 20.3655 24.7131
|
| 594 |
+
v -20.506 20.506 24.7087
|
| 595 |
+
v -37.0837 8.1571 13.578
|
| 596 |
+
v 13.1265 13.1265 35.747
|
| 597 |
+
v 13.1265 -13.1265 35.747
|
| 598 |
+
v 18.625 18.625 24.75
|
| 599 |
+
v 18.625 -18.625 24.75
|
| 600 |
+
v -9.9461 -36.6357 15.3646
|
| 601 |
+
v -10.342 -36.5365 15.7801
|
| 602 |
+
v 25.0698 -28.5015 15.875
|
| 603 |
+
v 32.225 18.364 20.313
|
| 604 |
+
v 27.224 -26.87 15.875
|
| 605 |
+
v -19.5525 21.3699 24.6948
|
| 606 |
+
v -18.397 22.417 24.6779
|
| 607 |
+
v -35.3852 13.7649 14.8723
|
| 608 |
+
v -35.107 14.542 15.1849
|
| 609 |
+
v 30.901 17.609 22.151
|
| 610 |
+
v -14.4322 34.7087 17
|
| 611 |
+
v -14.542 35.107 17
|
| 612 |
+
v 0 -29 24.75
|
| 613 |
+
v 2.842 -28.86 24.75
|
| 614 |
+
v 5.658 -28.443 24.75
|
| 615 |
+
v 8.418 -27.751 24.75
|
| 616 |
+
v 11.098 -26.792 24.75
|
| 617 |
+
v -16.112 24.113 24.6813
|
| 618 |
+
v 28.443 -5.658 24.75
|
| 619 |
+
v -11.098 -26.792 24.75
|
| 620 |
+
v -8.418 -27.751 24.75
|
| 621 |
+
v -5.658 -28.443 24.75
|
| 622 |
+
v -36.364 11.031 13.7743
|
| 623 |
+
v -2.843 -28.86 24.75
|
| 624 |
+
v 29.174 16.625 23.561
|
| 625 |
+
v -14.6261 25.0036 24.7044
|
| 626 |
+
v -13.671 25.576 24.6836
|
| 627 |
+
v -37.817 3.725 14.5724
|
| 628 |
+
v -37.3366 6.964 14.2345
|
| 629 |
+
v -37.27 7.413 14.1876
|
| 630 |
+
v 25.6086 -28.0132 15.419
|
| 631 |
+
v -37.2447 7.5139 14.105
|
| 632 |
+
v 27.0371 -26.6856 14.025
|
| 633 |
+
v 26.87 -26.87 14.3533
|
| 634 |
+
v 12.9343 -25.9238 24.6782
|
| 635 |
+
v 11.098 -26.792 24.6647
|
| 636 |
+
v 9.9461 36.6357 15.3646
|
| 637 |
+
v 10.342 36.5365 15.7801
|
| 638 |
+
v 29.3593 24.1232 15.875
|
| 639 |
+
v 29.4178 24.048 15.875
|
| 640 |
+
v 16.844 28.795 23.561
|
| 641 |
+
v 8.418 -27.751 24.6804
|
| 642 |
+
v 27.8234 -8.1291 24.7219
|
| 643 |
+
v 28.0047 -7.4061 24.7357
|
| 644 |
+
v -30.297 -8.013 24.448
|
| 645 |
+
v 7.5897 -27.9587 24.6954
|
| 646 |
+
v 5.658 -28.443 24.6667
|
| 647 |
+
v 25.6086 28.0132 16.331
|
| 648 |
+
v 8.719 32.117 23.561
|
| 649 |
+
v 25.0698 28.5015 15.875
|
| 650 |
+
v 5.3977 -28.4816 24.6661
|
| 651 |
+
v 2.842 -28.86 24.6604
|
| 652 |
+
v -17.913 33.513 17
|
| 653 |
+
v -19.107 32.7975 17
|
| 654 |
+
v -18.2144 33.3324 15.875
|
| 655 |
+
v -16.844 -28.795 23.561
|
| 656 |
+
v 8.118 29.904 24.448
|
| 657 |
+
v -32.54 -8.606 23.561
|
| 658 |
+
v -19.25 32.909 15.875
|
| 659 |
+
v -2.2503 -28.8892 24.6663
|
| 660 |
+
v -2.843 -28.86 24.6604
|
| 661 |
+
v -30.232 -22.7423 17
|
| 662 |
+
v -31.921 -20.5696 17
|
| 663 |
+
v -31.596 -21.112 17
|
| 664 |
+
v -29.374 -24.107 17
|
| 665 |
+
v -5.658 -28.443 24.6667
|
| 666 |
+
v -25.6086 -28.0132 16.331
|
| 667 |
+
v -31.596 -21.112 16.4586
|
| 668 |
+
v -31.6197 -21.0725 16.498
|
| 669 |
+
v -3.725 37.817 17
|
| 670 |
+
v -7.413 37.27 17
|
| 671 |
+
v -4.8389 37.2129 17
|
| 672 |
+
v -25.0698 -28.5015 15.875
|
| 673 |
+
v -7.5897 -27.9587 24.6954
|
| 674 |
+
v -8.418 -27.751 24.6804
|
| 675 |
+
v 25.23 -24.903 22.151
|
| 676 |
+
v -18.3829 33.2314 15.6624
|
| 677 |
+
v -9.88 36.393 18.172
|
| 678 |
+
v -9.9234 36.5522 17
|
| 679 |
+
v -9.9461 36.6357 16.3854
|
| 680 |
+
v 32.6246 19.3954 13.578
|
| 681 |
+
v -9.5447 -27.3478 24.6738
|
| 682 |
+
v 27.9472 25.6814 17
|
| 683 |
+
v -11.098 -26.792 24.6647
|
| 684 |
+
v -32.225 -18.364 20.313
|
| 685 |
+
v 26.992 26.641 18.172
|
| 686 |
+
v -11.031 36.364 17
|
| 687 |
+
v 31.596 21.112 15.2913
|
| 688 |
+
v 32.4905 19.6194 13.8015
|
| 689 |
+
v -30.901 -17.609 22.151
|
| 690 |
+
v 26.4004 27.2956 17
|
| 691 |
+
v -9.631 35.476 20.313
|
| 692 |
+
v -19.086 32.629 18.172
|
| 693 |
+
v -29.174 -16.625 23.561
|
| 694 |
+
v -23.0418 29.8391 17
|
| 695 |
+
v -19.2451 32.7147 17
|
| 696 |
+
v -21.112 31.596 17
|
| 697 |
+
v -24.107 29.374 17
|
| 698 |
+
v -27.9472 -25.6814 17
|
| 699 |
+
v 32.54 8.606 23.561
|
| 700 |
+
v -26.992 -26.641 18.172
|
| 701 |
+
v -18.605 31.807 20.313
|
| 702 |
+
v -26.4004 -27.2956 17
|
| 703 |
+
v -26.312 -25.97 20.313
|
| 704 |
+
# 698 vertices
|
| 705 |
+
|
| 706 |
+
g group_0_40919
|
| 707 |
+
|
| 708 |
+
usemtl color_40919
|
| 709 |
+
s 0
|
| 710 |
+
|
| 711 |
+
f 139 190 189
|
| 712 |
+
f 186 189 190
|
| 713 |
+
f 139 86 190
|
| 714 |
+
f 260 190 86
|
| 715 |
+
f 266 269 270
|
| 716 |
+
f 274 270 269
|
| 717 |
+
f 85 448 86
|
| 718 |
+
f 260 86 448
|
| 719 |
+
f 448 270 260
|
| 720 |
+
f 190 260 270
|
| 721 |
+
f 190 270 274
|
| 722 |
+
f 190 274 186
|
| 723 |
+
f 494 485 492
|
| 724 |
+
f 489 492 485
|
| 725 |
+
f 485 299 489
|
| 726 |
+
f 298 489 299
|
| 727 |
+
# 16 faces
|
| 728 |
+
|
| 729 |
+
g group_0_4634441
|
| 730 |
+
|
| 731 |
+
usemtl color_4634441
|
| 732 |
+
s 0
|
| 733 |
+
|
| 734 |
+
f 186 187 188
|
| 735 |
+
f 188 189 186
|
| 736 |
+
f 269 268 274
|
| 737 |
+
f 275 274 268
|
| 738 |
+
f 186 274 275
|
| 739 |
+
f 186 275 187
|
| 740 |
+
f 489 298 490
|
| 741 |
+
f 315 490 298
|
| 742 |
+
# 8 faces
|
| 743 |
+
|
| 744 |
+
g group_0_8273816
|
| 745 |
+
|
| 746 |
+
usemtl color_8273816
|
| 747 |
+
s 0
|
| 748 |
+
|
| 749 |
+
f 267 266 271
|
| 750 |
+
f 270 271 266
|
| 751 |
+
f 84 448 85
|
| 752 |
+
f 450 448 84
|
| 753 |
+
f 271 270 448
|
| 754 |
+
f 271 448 450
|
| 755 |
+
f 492 491 493
|
| 756 |
+
f 492 493 494
|
| 757 |
+
# 8 faces
|
| 758 |
+
|
| 759 |
+
g group_0_15277357
|
| 760 |
+
|
| 761 |
+
usemtl color_15277357
|
| 762 |
+
s 0
|
| 763 |
+
|
| 764 |
+
f 188 187 194
|
| 765 |
+
f 194 195 188
|
| 766 |
+
f 268 267 275
|
| 767 |
+
f 271 275 267
|
| 768 |
+
f 83 455 84
|
| 769 |
+
f 450 84 455
|
| 770 |
+
f 271 455 275
|
| 771 |
+
f 450 455 271
|
| 772 |
+
f 455 194 275
|
| 773 |
+
f 187 275 194
|
| 774 |
+
f 493 491 516
|
| 775 |
+
f 314 516 491
|
| 776 |
+
f 314 491 490
|
| 777 |
+
f 314 490 315
|
| 778 |
+
f 455 195 194
|
| 779 |
+
f 83 195 455
|
| 780 |
+
# 16 faces
|
| 781 |
+
|
| 782 |
+
g group_0_16089887
|
| 783 |
+
|
| 784 |
+
usemtl color_16089887
|
| 785 |
+
s 0
|
| 786 |
+
|
| 787 |
+
f 7 456 8
|
| 788 |
+
f 16 17 15
|
| 789 |
+
f 14 15 17
|
| 790 |
+
f 15 18 16
|
| 791 |
+
f 15 14 20
|
| 792 |
+
f 15 20 18
|
| 793 |
+
f 17 16 21
|
| 794 |
+
f 24 25 23
|
| 795 |
+
f 23 25 26
|
| 796 |
+
f 18 52 16
|
| 797 |
+
f 20 180 18
|
| 798 |
+
f 52 18 180
|
| 799 |
+
f 24 54 25
|
| 800 |
+
f 691 30 31
|
| 801 |
+
f 21 175 17
|
| 802 |
+
f 14 17 175
|
| 803 |
+
f 24 23 19
|
| 804 |
+
f 180 20 14
|
| 805 |
+
f 19 156 24
|
| 806 |
+
f 21 52 32
|
| 807 |
+
f 469 78 34
|
| 808 |
+
f 175 21 35
|
| 809 |
+
f 21 32 37
|
| 810 |
+
f 21 37 35
|
| 811 |
+
f 468 681 40
|
| 812 |
+
f 40 681 39
|
| 813 |
+
f 36 40 39
|
| 814 |
+
f 43 44 42
|
| 815 |
+
f 41 42 44
|
| 816 |
+
f 40 77 468
|
| 817 |
+
f 35 46 45
|
| 818 |
+
f 9 59 211
|
| 819 |
+
f 211 574 51
|
| 820 |
+
f 35 37 46
|
| 821 |
+
f 556 555 65
|
| 822 |
+
f 46 49 45
|
| 823 |
+
f 2 1 25
|
| 824 |
+
f 25 54 55
|
| 825 |
+
f 21 16 52
|
| 826 |
+
f 59 60 212
|
| 827 |
+
f 57 32 52
|
| 828 |
+
f 26 25 1
|
| 829 |
+
f 124 2 55
|
| 830 |
+
f 212 211 59
|
| 831 |
+
f 644 28 56
|
| 832 |
+
f 50 56 28
|
| 833 |
+
f 38 12 80
|
| 834 |
+
f 51 58 29
|
| 835 |
+
f 61 47 42
|
| 836 |
+
f 59 313 60
|
| 837 |
+
f 53 212 60
|
| 838 |
+
f 47 43 42
|
| 839 |
+
f 691 31 555
|
| 840 |
+
f 68 137 66
|
| 841 |
+
f 692 691 554
|
| 842 |
+
f 69 70 71
|
| 843 |
+
f 244 136 253
|
| 844 |
+
f 65 555 31
|
| 845 |
+
f 69 72 70
|
| 846 |
+
f 69 71 66
|
| 847 |
+
f 66 71 308
|
| 848 |
+
f 76 598 5
|
| 849 |
+
f 73 79 75
|
| 850 |
+
f 64 67 48
|
| 851 |
+
f 78 469 77
|
| 852 |
+
f 66 138 69
|
| 853 |
+
f 74 79 73
|
| 854 |
+
f 70 81 71
|
| 855 |
+
f 82 81 70
|
| 856 |
+
f 78 77 36
|
| 857 |
+
f 72 82 70
|
| 858 |
+
f 73 75 84
|
| 859 |
+
f 85 73 84
|
| 860 |
+
f 86 73 85
|
| 861 |
+
f 83 84 75
|
| 862 |
+
f 71 81 308
|
| 863 |
+
f 81 82 313
|
| 864 |
+
f 81 313 308
|
| 865 |
+
f 80 12 48
|
| 866 |
+
f 90 74 89
|
| 867 |
+
f 89 74 88
|
| 868 |
+
f 91 74 90
|
| 869 |
+
f 87 88 74
|
| 870 |
+
f 34 78 36
|
| 871 |
+
f 61 100 63
|
| 872 |
+
f 63 47 61
|
| 873 |
+
f 163 164 253
|
| 874 |
+
f 469 468 77
|
| 875 |
+
f 94 97 68
|
| 876 |
+
f 95 79 93
|
| 877 |
+
f 93 79 92
|
| 878 |
+
f 96 79 95
|
| 879 |
+
f 98 79 96
|
| 880 |
+
f 99 79 98
|
| 881 |
+
f 101 79 99
|
| 882 |
+
f 79 74 92
|
| 883 |
+
f 91 92 74
|
| 884 |
+
f 77 40 36
|
| 885 |
+
f 64 63 100
|
| 886 |
+
f 67 64 100
|
| 887 |
+
f 103 255 102
|
| 888 |
+
f 104 255 103
|
| 889 |
+
f 255 254 102
|
| 890 |
+
f 115 48 67
|
| 891 |
+
f 66 94 68
|
| 892 |
+
f 146 256 144
|
| 893 |
+
f 144 256 158
|
| 894 |
+
f 22 13 105
|
| 895 |
+
f 134 160 48
|
| 896 |
+
f 133 134 48
|
| 897 |
+
f 108 79 107
|
| 898 |
+
f 106 107 79
|
| 899 |
+
f 109 79 108
|
| 900 |
+
f 110 79 109
|
| 901 |
+
f 111 79 110
|
| 902 |
+
f 112 79 111
|
| 903 |
+
f 113 79 112
|
| 904 |
+
f 117 79 113
|
| 905 |
+
f 101 106 79
|
| 906 |
+
f 103 102 114
|
| 907 |
+
f 48 115 133
|
| 908 |
+
f 22 105 27
|
| 909 |
+
f 97 94 116
|
| 910 |
+
f 127 102 254
|
| 911 |
+
f 79 117 118
|
| 912 |
+
f 79 118 119
|
| 913 |
+
f 114 104 103
|
| 914 |
+
f 116 120 97
|
| 915 |
+
f 695 656 693
|
| 916 |
+
f 124 4 2
|
| 917 |
+
f 80 48 140
|
| 918 |
+
f 163 253 123
|
| 919 |
+
f 121 123 253
|
| 920 |
+
f 105 126 27
|
| 921 |
+
f 254 253 164
|
| 922 |
+
f 165 166 254
|
| 923 |
+
f 27 126 130
|
| 924 |
+
f 100 131 67
|
| 925 |
+
f 25 55 2
|
| 926 |
+
f 115 67 131
|
| 927 |
+
f 652 120 116
|
| 928 |
+
f 123 121 129
|
| 929 |
+
f 122 245 248
|
| 930 |
+
f 102 127 114
|
| 931 |
+
f 122 125 245
|
| 932 |
+
f 422 228 248
|
| 933 |
+
f 217 218 126
|
| 934 |
+
f 218 226 126
|
| 935 |
+
f 66 137 138
|
| 936 |
+
f 72 69 138
|
| 937 |
+
f 48 160 140
|
| 938 |
+
f 591 74 73
|
| 939 |
+
f 86 139 591
|
| 940 |
+
f 86 591 73
|
| 941 |
+
f 80 359 38
|
| 942 |
+
f 121 136 129
|
| 943 |
+
f 132 419 650
|
| 944 |
+
f 140 294 80
|
| 945 |
+
f 145 74 143
|
| 946 |
+
f 142 143 74
|
| 947 |
+
f 147 74 145
|
| 948 |
+
f 141 142 74
|
| 949 |
+
f 237 272 50
|
| 950 |
+
f 148 4 150
|
| 951 |
+
f 148 150 149
|
| 952 |
+
f 153 74 152
|
| 953 |
+
f 154 74 153
|
| 954 |
+
f 87 74 154
|
| 955 |
+
f 151 152 74
|
| 956 |
+
f 147 151 74
|
| 957 |
+
f 156 19 149
|
| 958 |
+
f 183 149 19
|
| 959 |
+
f 155 237 50
|
| 960 |
+
f 146 144 52
|
| 961 |
+
f 150 156 149
|
| 962 |
+
f 313 82 138
|
| 963 |
+
f 82 72 138
|
| 964 |
+
f 52 180 146
|
| 965 |
+
f 157 134 133
|
| 966 |
+
f 115 131 133
|
| 967 |
+
f 255 104 158
|
| 968 |
+
f 157 133 131
|
| 969 |
+
f 50 28 155
|
| 970 |
+
f 651 130 159
|
| 971 |
+
f 160 161 140
|
| 972 |
+
f 159 162 651
|
| 973 |
+
f 162 167 651
|
| 974 |
+
f 172 156 150
|
| 975 |
+
f 114 52 104
|
| 976 |
+
f 158 104 52
|
| 977 |
+
f 144 158 52
|
| 978 |
+
f 145 162 159
|
| 979 |
+
f 135 147 159
|
| 980 |
+
f 145 159 147
|
| 981 |
+
f 51 177 211
|
| 982 |
+
f 55 54 156
|
| 983 |
+
f 165 254 164
|
| 984 |
+
f 156 124 55
|
| 985 |
+
f 171 179 651
|
| 986 |
+
f 127 254 166
|
| 987 |
+
f 24 156 54
|
| 988 |
+
f 170 651 167
|
| 989 |
+
f 129 57 123
|
| 990 |
+
f 161 160 168
|
| 991 |
+
f 157 168 160
|
| 992 |
+
f 163 123 57
|
| 993 |
+
f 157 160 134
|
| 994 |
+
f 164 163 57
|
| 995 |
+
f 140 161 169
|
| 996 |
+
f 114 127 166
|
| 997 |
+
f 143 167 145
|
| 998 |
+
f 145 167 162
|
| 999 |
+
f 10 29 693
|
| 1000 |
+
f 184 6 4
|
| 1001 |
+
f 179 173 651
|
| 1002 |
+
f 169 176 140
|
| 1003 |
+
f 124 172 4
|
| 1004 |
+
f 150 4 172
|
| 1005 |
+
f 174 169 168
|
| 1006 |
+
f 57 52 164
|
| 1007 |
+
f 165 164 52
|
| 1008 |
+
f 114 166 52
|
| 1009 |
+
f 58 51 574
|
| 1010 |
+
f 161 168 169
|
| 1011 |
+
f 165 52 166
|
| 1012 |
+
f 142 171 170
|
| 1013 |
+
f 142 170 143
|
| 1014 |
+
f 143 170 167
|
| 1015 |
+
f 176 178 140
|
| 1016 |
+
f 216 215 191
|
| 1017 |
+
f 156 172 124
|
| 1018 |
+
f 179 181 173
|
| 1019 |
+
f 177 29 10
|
| 1020 |
+
f 141 181 179
|
| 1021 |
+
f 171 142 179
|
| 1022 |
+
f 141 179 142
|
| 1023 |
+
f 184 148 183
|
| 1024 |
+
f 149 183 148
|
| 1025 |
+
f 177 10 211
|
| 1026 |
+
f 182 178 176
|
| 1027 |
+
f 176 174 182
|
| 1028 |
+
f 319 326 173
|
| 1029 |
+
f 177 51 29
|
| 1030 |
+
f 14 175 180
|
| 1031 |
+
f 176 169 174
|
| 1032 |
+
f 141 292 181
|
| 1033 |
+
f 35 320 175
|
| 1034 |
+
f 181 292 173
|
| 1035 |
+
f 193 216 192
|
| 1036 |
+
f 191 192 216
|
| 1037 |
+
f 349 33 38
|
| 1038 |
+
f 216 278 209
|
| 1039 |
+
f 185 132 650
|
| 1040 |
+
f 198 494 197
|
| 1041 |
+
f 205 204 208
|
| 1042 |
+
f 196 209 207
|
| 1043 |
+
f 4 148 184
|
| 1044 |
+
f 224 204 257
|
| 1045 |
+
f 192 191 210
|
| 1046 |
+
f 204 224 208
|
| 1047 |
+
f 197 494 196
|
| 1048 |
+
f 493 516 214
|
| 1049 |
+
f 214 215 493
|
| 1050 |
+
f 216 493 215
|
| 1051 |
+
f 583 197 207
|
| 1052 |
+
f 222 346 403
|
| 1053 |
+
f 426 403 346
|
| 1054 |
+
f 154 218 217
|
| 1055 |
+
f 621 87 217
|
| 1056 |
+
f 154 217 87
|
| 1057 |
+
f 257 256 231
|
| 1058 |
+
f 99 222 220
|
| 1059 |
+
f 219 101 220
|
| 1060 |
+
f 99 220 101
|
| 1061 |
+
f 231 233 257
|
| 1062 |
+
f 193 192 210
|
| 1063 |
+
f 635 221 76
|
| 1064 |
+
f 223 207 206
|
| 1065 |
+
f 387 378 180
|
| 1066 |
+
f 233 231 180
|
| 1067 |
+
f 208 233 180
|
| 1068 |
+
f 153 226 154
|
| 1069 |
+
f 218 154 226
|
| 1070 |
+
f 689 227 228
|
| 1071 |
+
f 208 224 233
|
| 1072 |
+
f 283 227 281
|
| 1073 |
+
f 229 230 126
|
| 1074 |
+
f 235 126 230
|
| 1075 |
+
f 126 226 229
|
| 1076 |
+
f 191 215 232
|
| 1077 |
+
f 152 229 153
|
| 1078 |
+
f 293 295 214
|
| 1079 |
+
f 635 173 221
|
| 1080 |
+
f 152 230 229
|
| 1081 |
+
f 226 153 229
|
| 1082 |
+
f 62 261 185
|
| 1083 |
+
f 122 248 228
|
| 1084 |
+
f 277 173 344
|
| 1085 |
+
f 231 146 180
|
| 1086 |
+
f 224 257 233
|
| 1087 |
+
f 301 336 62
|
| 1088 |
+
f 130 235 236
|
| 1089 |
+
f 232 210 191
|
| 1090 |
+
f 130 126 235
|
| 1091 |
+
f 206 207 209
|
| 1092 |
+
f 151 236 235
|
| 1093 |
+
f 151 235 152
|
| 1094 |
+
f 319 173 292
|
| 1095 |
+
f 62 305 301
|
| 1096 |
+
f 235 230 152
|
| 1097 |
+
f 228 285 234
|
| 1098 |
+
f 246 248 245
|
| 1099 |
+
f 249 209 247
|
| 1100 |
+
f 228 422 285
|
| 1101 |
+
f 130 236 135
|
| 1102 |
+
f 239 299 238
|
| 1103 |
+
f 240 299 239
|
| 1104 |
+
f 241 298 240
|
| 1105 |
+
f 242 298 241
|
| 1106 |
+
f 253 315 244
|
| 1107 |
+
f 243 298 242
|
| 1108 |
+
f 244 298 243
|
| 1109 |
+
f 249 251 209
|
| 1110 |
+
f 62 252 305
|
| 1111 |
+
f 245 276 246
|
| 1112 |
+
f 135 236 151
|
| 1113 |
+
f 135 151 147
|
| 1114 |
+
f 125 328 245
|
| 1115 |
+
f 266 267 268
|
| 1116 |
+
f 266 268 269
|
| 1117 |
+
f 265 299 264
|
| 1118 |
+
f 263 264 299
|
| 1119 |
+
f 137 249 138
|
| 1120 |
+
f 246 273 248
|
| 1121 |
+
f 247 138 249
|
| 1122 |
+
f 237 238 299
|
| 1123 |
+
f 8 467 7
|
| 1124 |
+
f 7 467 250
|
| 1125 |
+
f 246 276 273
|
| 1126 |
+
f 249 137 251
|
| 1127 |
+
f 223 251 137
|
| 1128 |
+
f 467 470 250
|
| 1129 |
+
f 193 278 216
|
| 1130 |
+
f 248 273 422
|
| 1131 |
+
f 261 62 336
|
| 1132 |
+
f 247 209 278
|
| 1133 |
+
f 251 206 209
|
| 1134 |
+
f 221 173 277
|
| 1135 |
+
f 276 424 273
|
| 1136 |
+
f 228 227 283
|
| 1137 |
+
f 193 210 138
|
| 1138 |
+
f 193 138 278
|
| 1139 |
+
f 247 278 138
|
| 1140 |
+
f 344 342 277
|
| 1141 |
+
f 45 49 279
|
| 1142 |
+
f 125 122 283
|
| 1143 |
+
f 283 122 228
|
| 1144 |
+
f 326 344 173
|
| 1145 |
+
f 223 206 251
|
| 1146 |
+
f 279 250 337
|
| 1147 |
+
f 279 7 250
|
| 1148 |
+
f 279 49 7
|
| 1149 |
+
f 215 214 296
|
| 1150 |
+
f 295 296 214
|
| 1151 |
+
f 297 292 141
|
| 1152 |
+
f 296 232 215
|
| 1153 |
+
f 299 240 298
|
| 1154 |
+
f 254 315 253
|
| 1155 |
+
f 234 285 290
|
| 1156 |
+
f 255 315 254
|
| 1157 |
+
f 1 314 300
|
| 1158 |
+
f 257 314 256
|
| 1159 |
+
f 210 232 296
|
| 1160 |
+
f 210 296 295
|
| 1161 |
+
f 259 300 314
|
| 1162 |
+
f 303 304 302
|
| 1163 |
+
f 285 514 290
|
| 1164 |
+
f 2 314 1
|
| 1165 |
+
f 259 352 302
|
| 1166 |
+
f 303 302 311
|
| 1167 |
+
f 293 291 313
|
| 1168 |
+
f 138 293 313
|
| 1169 |
+
f 140 307 294
|
| 1170 |
+
f 314 2 4
|
| 1171 |
+
f 293 138 295
|
| 1172 |
+
f 210 295 138
|
| 1173 |
+
f 304 175 576
|
| 1174 |
+
f 303 309 304
|
| 1175 |
+
f 303 311 309
|
| 1176 |
+
f 312 554 318
|
| 1177 |
+
f 261 336 339
|
| 1178 |
+
f 304 309 175
|
| 1179 |
+
f 256 315 255
|
| 1180 |
+
f 258 259 314
|
| 1181 |
+
f 257 258 314
|
| 1182 |
+
f 315 256 314
|
| 1183 |
+
f 298 244 315
|
| 1184 |
+
f 645 646 310
|
| 1185 |
+
f 283 281 312
|
| 1186 |
+
f 311 180 309
|
| 1187 |
+
f 309 180 175
|
| 1188 |
+
f 640 641 307
|
| 1189 |
+
f 310 307 645
|
| 1190 |
+
f 318 225 317
|
| 1191 |
+
f 629 630 307
|
| 1192 |
+
f 688 185 261
|
| 1193 |
+
f 317 283 318
|
| 1194 |
+
f 312 318 283
|
| 1195 |
+
f 307 140 629
|
| 1196 |
+
f 261 351 688
|
| 1197 |
+
f 276 245 321
|
| 1198 |
+
f 324 325 323
|
| 1199 |
+
f 338 334 324
|
| 1200 |
+
f 325 327 323
|
| 1201 |
+
f 322 323 327
|
| 1202 |
+
f 305 118 301
|
| 1203 |
+
f 679 66 308
|
| 1204 |
+
f 119 118 305
|
| 1205 |
+
f 292 297 319
|
| 1206 |
+
f 119 305 252
|
| 1207 |
+
f 333 319 297
|
| 1208 |
+
f 424 276 321
|
| 1209 |
+
f 66 679 94
|
| 1210 |
+
f 331 332 325
|
| 1211 |
+
f 327 325 332
|
| 1212 |
+
f 121 253 136
|
| 1213 |
+
f 319 333 326
|
| 1214 |
+
f 325 324 334
|
| 1215 |
+
f 125 283 328
|
| 1216 |
+
f 320 35 45
|
| 1217 |
+
f 338 324 335
|
| 1218 |
+
f 255 158 256
|
| 1219 |
+
f 320 45 329
|
| 1220 |
+
f 146 231 256
|
| 1221 |
+
f 334 331 325
|
| 1222 |
+
f 212 348 213
|
| 1223 |
+
f 212 53 348
|
| 1224 |
+
f 379 361 277
|
| 1225 |
+
f 377 375 261
|
| 1226 |
+
f 279 337 329
|
| 1227 |
+
f 184 183 338
|
| 1228 |
+
f 334 338 183
|
| 1229 |
+
f 360 261 339
|
| 1230 |
+
f 329 45 279
|
| 1231 |
+
f 291 214 355
|
| 1232 |
+
f 213 355 214
|
| 1233 |
+
f 293 214 291
|
| 1234 |
+
f 343 213 341
|
| 1235 |
+
f 355 213 343
|
| 1236 |
+
f 335 391 338
|
| 1237 |
+
f 334 183 331
|
| 1238 |
+
f 19 331 183
|
| 1239 |
+
f 341 345 343
|
| 1240 |
+
f 222 99 346
|
| 1241 |
+
f 98 346 99
|
| 1242 |
+
f 339 336 117
|
| 1243 |
+
f 118 117 336
|
| 1244 |
+
f 118 336 301
|
| 1245 |
+
f 445 202 444
|
| 1246 |
+
f 332 331 349
|
| 1247 |
+
f 213 348 341
|
| 1248 |
+
f 344 350 342
|
| 1249 |
+
f 311 302 352
|
| 1250 |
+
f 348 345 341
|
| 1251 |
+
f 326 333 344
|
| 1252 |
+
f 350 344 333
|
| 1253 |
+
f 259 302 353
|
| 1254 |
+
f 349 354 332
|
| 1255 |
+
f 347 579 340
|
| 1256 |
+
f 364 203 202
|
| 1257 |
+
f 348 53 345
|
| 1258 |
+
f 328 317 203
|
| 1259 |
+
f 352 180 311
|
| 1260 |
+
f 379 380 361
|
| 1261 |
+
f 687 228 234
|
| 1262 |
+
f 33 349 331
|
| 1263 |
+
f 364 202 363
|
| 1264 |
+
f 382 379 277
|
| 1265 |
+
f 375 351 261
|
| 1266 |
+
f 331 19 33
|
| 1267 |
+
f 277 342 358
|
| 1268 |
+
f 277 358 382
|
| 1269 |
+
f 354 349 359
|
| 1270 |
+
f 345 313 343
|
| 1271 |
+
f 291 355 313
|
| 1272 |
+
f 343 313 355
|
| 1273 |
+
f 261 360 377
|
| 1274 |
+
f 345 60 313
|
| 1275 |
+
f 359 362 354
|
| 1276 |
+
f 345 53 60
|
| 1277 |
+
f 113 360 117
|
| 1278 |
+
f 234 290 357
|
| 1279 |
+
f 245 203 321
|
| 1280 |
+
f 364 321 203
|
| 1281 |
+
f 349 38 359
|
| 1282 |
+
f 117 360 339
|
| 1283 |
+
f 365 366 239
|
| 1284 |
+
f 381 239 366
|
| 1285 |
+
f 9 313 59
|
| 1286 |
+
f 225 203 317
|
| 1287 |
+
f 245 328 203
|
| 1288 |
+
f 294 362 359
|
| 1289 |
+
f 357 290 306
|
| 1290 |
+
f 257 204 258
|
| 1291 |
+
f 564 240 381
|
| 1292 |
+
f 372 362 294
|
| 1293 |
+
f 398 400 351
|
| 1294 |
+
f 367 366 365
|
| 1295 |
+
f 365 239 373
|
| 1296 |
+
f 204 205 258
|
| 1297 |
+
f 294 359 80
|
| 1298 |
+
f 321 364 424
|
| 1299 |
+
f 363 424 364
|
| 1300 |
+
f 342 350 358
|
| 1301 |
+
f 373 367 365
|
| 1302 |
+
f 375 376 351
|
| 1303 |
+
f 372 294 307
|
| 1304 |
+
f 374 358 350
|
| 1305 |
+
f 310 372 307
|
| 1306 |
+
f 283 317 328
|
| 1307 |
+
f 258 205 378
|
| 1308 |
+
f 112 376 375
|
| 1309 |
+
f 377 113 375
|
| 1310 |
+
f 112 375 113
|
| 1311 |
+
f 113 377 360
|
| 1312 |
+
f 383 306 290
|
| 1313 |
+
f 384 335 324
|
| 1314 |
+
f 208 378 205
|
| 1315 |
+
f 367 347 366
|
| 1316 |
+
f 381 366 347
|
| 1317 |
+
f 347 564 381
|
| 1318 |
+
f 453 357 306
|
| 1319 |
+
f 378 387 258
|
| 1320 |
+
f 386 258 387
|
| 1321 |
+
f 335 384 388
|
| 1322 |
+
f 352 259 386
|
| 1323 |
+
f 258 386 259
|
| 1324 |
+
f 330 453 306
|
| 1325 |
+
f 184 338 280
|
| 1326 |
+
f 400 417 351
|
| 1327 |
+
f 403 306 383
|
| 1328 |
+
f 338 391 393
|
| 1329 |
+
f 338 393 280
|
| 1330 |
+
f 390 392 389
|
| 1331 |
+
f 227 692 281
|
| 1332 |
+
f 351 376 385
|
| 1333 |
+
f 370 432 390
|
| 1334 |
+
f 388 393 391
|
| 1335 |
+
f 380 379 394
|
| 1336 |
+
f 374 394 379
|
| 1337 |
+
f 379 382 374
|
| 1338 |
+
f 390 389 370
|
| 1339 |
+
f 208 180 378
|
| 1340 |
+
f 306 403 330
|
| 1341 |
+
f 367 683 347
|
| 1342 |
+
f 111 385 112
|
| 1343 |
+
f 376 112 385
|
| 1344 |
+
f 374 382 358
|
| 1345 |
+
f 386 387 180
|
| 1346 |
+
f 398 351 385
|
| 1347 |
+
f 390 397 392
|
| 1348 |
+
f 388 391 335
|
| 1349 |
+
f 352 386 180
|
| 1350 |
+
f 417 418 639
|
| 1351 |
+
f 396 32 57
|
| 1352 |
+
f 361 412 413
|
| 1353 |
+
f 413 428 361
|
| 1354 |
+
f 639 351 417
|
| 1355 |
+
f 399 401 402
|
| 1356 |
+
f 397 395 392
|
| 1357 |
+
f 318 554 225
|
| 1358 |
+
f 432 517 397
|
| 1359 |
+
f 401 399 404
|
| 1360 |
+
f 110 398 111
|
| 1361 |
+
f 412 361 405
|
| 1362 |
+
f 184 280 6
|
| 1363 |
+
f 312 281 554
|
| 1364 |
+
f 399 402 396
|
| 1365 |
+
f 402 340 396
|
| 1366 |
+
f 380 405 361
|
| 1367 |
+
f 383 406 403
|
| 1368 |
+
f 110 400 398
|
| 1369 |
+
f 385 111 398
|
| 1370 |
+
f 396 449 399
|
| 1371 |
+
f 323 284 324
|
| 1372 |
+
f 401 408 402
|
| 1373 |
+
f 380 394 405
|
| 1374 |
+
f 409 405 394
|
| 1375 |
+
f 323 286 284
|
| 1376 |
+
f 411 408 401
|
| 1377 |
+
f 3 361 428
|
| 1378 |
+
f 401 404 411
|
| 1379 |
+
f 402 408 340
|
| 1380 |
+
f 281 692 554
|
| 1381 |
+
f 416 423 415
|
| 1382 |
+
f 414 416 415
|
| 1383 |
+
f 282 324 284
|
| 1384 |
+
f 428 431 3
|
| 1385 |
+
f 411 347 408
|
| 1386 |
+
f 408 347 340
|
| 1387 |
+
f 426 427 403
|
| 1388 |
+
f 330 403 427
|
| 1389 |
+
f 418 429 639
|
| 1390 |
+
f 529 496 454
|
| 1391 |
+
f 109 418 417
|
| 1392 |
+
f 109 417 110
|
| 1393 |
+
f 420 37 32
|
| 1394 |
+
f 219 220 406
|
| 1395 |
+
f 220 403 406
|
| 1396 |
+
f 536 537 330
|
| 1397 |
+
f 110 417 400
|
| 1398 |
+
f 421 413 412
|
| 1399 |
+
f 410 416 414
|
| 1400 |
+
f 220 222 403
|
| 1401 |
+
f 405 409 412
|
| 1402 |
+
f 396 420 32
|
| 1403 |
+
f 421 412 409
|
| 1404 |
+
f 439 384 282
|
| 1405 |
+
f 410 423 416
|
| 1406 |
+
f 425 475 330
|
| 1407 |
+
f 475 513 330
|
| 1408 |
+
f 273 424 422
|
| 1409 |
+
f 435 639 429
|
| 1410 |
+
f 37 420 430
|
| 1411 |
+
f 286 323 322
|
| 1412 |
+
f 418 109 429
|
| 1413 |
+
f 108 429 109
|
| 1414 |
+
f 330 427 425
|
| 1415 |
+
f 397 390 432
|
| 1416 |
+
f 476 422 424
|
| 1417 |
+
f 406 433 434
|
| 1418 |
+
f 430 46 37
|
| 1419 |
+
f 3 437 446
|
| 1420 |
+
f 406 639 433
|
| 1421 |
+
f 96 425 427
|
| 1422 |
+
f 96 427 426
|
| 1423 |
+
f 96 426 98
|
| 1424 |
+
f 431 428 436
|
| 1425 |
+
f 421 436 428
|
| 1426 |
+
f 421 428 413
|
| 1427 |
+
f 504 285 422
|
| 1428 |
+
f 439 282 438
|
| 1429 |
+
f 426 346 98
|
| 1430 |
+
f 514 285 504
|
| 1431 |
+
f 107 434 433
|
| 1432 |
+
f 433 435 107
|
| 1433 |
+
f 324 282 384
|
| 1434 |
+
f 107 435 108
|
| 1435 |
+
f 7 3 442
|
| 1436 |
+
f 439 438 388
|
| 1437 |
+
f 435 429 108
|
| 1438 |
+
f 436 440 437
|
| 1439 |
+
f 436 437 431
|
| 1440 |
+
f 434 441 406
|
| 1441 |
+
f 438 282 280
|
| 1442 |
+
f 106 441 434
|
| 1443 |
+
f 106 434 107
|
| 1444 |
+
f 696 234 357
|
| 1445 |
+
f 438 393 388
|
| 1446 |
+
f 7 442 443
|
| 1447 |
+
f 443 456 7
|
| 1448 |
+
f 384 439 388
|
| 1449 |
+
f 441 219 406
|
| 1450 |
+
f 201 444 202
|
| 1451 |
+
f 356 363 202
|
| 1452 |
+
f 356 202 445
|
| 1453 |
+
f 263 262 415
|
| 1454 |
+
f 357 453 11
|
| 1455 |
+
f 446 442 3
|
| 1456 |
+
f 447 445 444
|
| 1457 |
+
f 441 106 219
|
| 1458 |
+
f 101 219 106
|
| 1459 |
+
f 415 423 263
|
| 1460 |
+
f 396 57 449
|
| 1461 |
+
f 393 438 280
|
| 1462 |
+
f 451 443 442
|
| 1463 |
+
f 347 411 449
|
| 1464 |
+
f 440 451 446
|
| 1465 |
+
f 442 446 451
|
| 1466 |
+
f 415 452 454
|
| 1467 |
+
f 414 415 454
|
| 1468 |
+
f 57 547 540
|
| 1469 |
+
f 540 449 57
|
| 1470 |
+
f 446 437 440
|
| 1471 |
+
f 356 445 447
|
| 1472 |
+
f 456 443 458
|
| 1473 |
+
f 451 458 443
|
| 1474 |
+
f 404 399 449
|
| 1475 |
+
f 444 201 459
|
| 1476 |
+
f 473 474 201
|
| 1477 |
+
f 452 526 454
|
| 1478 |
+
f 458 460 8
|
| 1479 |
+
f 458 8 456
|
| 1480 |
+
f 237 299 272
|
| 1481 |
+
f 262 263 299
|
| 1482 |
+
f 272 299 265
|
| 1483 |
+
f 449 411 404
|
| 1484 |
+
f 444 459 447
|
| 1485 |
+
f 638 637 250
|
| 1486 |
+
f 363 356 424
|
| 1487 |
+
f 447 424 356
|
| 1488 |
+
f 457 310 466
|
| 1489 |
+
f 330 500 453
|
| 1490 |
+
f 457 372 310
|
| 1491 |
+
f 470 550 250
|
| 1492 |
+
f 638 250 550
|
| 1493 |
+
f 370 472 432
|
| 1494 |
+
f 463 299 462
|
| 1495 |
+
f 462 299 461
|
| 1496 |
+
f 389 371 370
|
| 1497 |
+
f 262 299 464
|
| 1498 |
+
f 512 136 243
|
| 1499 |
+
f 464 299 463
|
| 1500 |
+
f 485 461 299
|
| 1501 |
+
f 527 424 603
|
| 1502 |
+
f 447 474 424
|
| 1503 |
+
f 330 537 500
|
| 1504 |
+
f 473 424 474
|
| 1505 |
+
f 459 201 474
|
| 1506 |
+
f 459 474 447
|
| 1507 |
+
f 465 485 469
|
| 1508 |
+
f 536 330 513
|
| 1509 |
+
f 478 479 477
|
| 1510 |
+
f 476 477 479
|
| 1511 |
+
f 576 175 320
|
| 1512 |
+
f 477 480 478
|
| 1513 |
+
f 95 475 425
|
| 1514 |
+
f 95 425 96
|
| 1515 |
+
f 480 477 481
|
| 1516 |
+
f 476 481 477
|
| 1517 |
+
f 262 452 415
|
| 1518 |
+
f 11 696 357
|
| 1519 |
+
f 479 478 483
|
| 1520 |
+
f 316 654 310
|
| 1521 |
+
f 466 310 654
|
| 1522 |
+
f 461 485 465
|
| 1523 |
+
f 487 488 486
|
| 1524 |
+
f 587 320 329
|
| 1525 |
+
f 489 490 491
|
| 1526 |
+
f 489 491 492
|
| 1527 |
+
f 654 655 466
|
| 1528 |
+
f 264 528 487
|
| 1529 |
+
f 480 527 478
|
| 1530 |
+
f 505 501 495
|
| 1531 |
+
f 481 424 480
|
| 1532 |
+
f 527 480 424
|
| 1533 |
+
f 453 522 11
|
| 1534 |
+
f 482 495 484
|
| 1535 |
+
f 395 497 518
|
| 1536 |
+
f 483 422 479
|
| 1537 |
+
f 476 479 422
|
| 1538 |
+
f 286 314 284
|
| 1539 |
+
f 282 284 314
|
| 1540 |
+
f 6 280 314
|
| 1541 |
+
f 280 282 314
|
| 1542 |
+
f 487 498 488
|
| 1543 |
+
f 499 302 304
|
| 1544 |
+
f 395 518 407
|
| 1545 |
+
f 424 481 476
|
| 1546 |
+
f 501 484 495
|
| 1547 |
+
f 244 243 136
|
| 1548 |
+
f 499 502 302
|
| 1549 |
+
f 565 566 240
|
| 1550 |
+
f 505 495 503
|
| 1551 |
+
f 576 499 304
|
| 1552 |
+
f 410 496 498
|
| 1553 |
+
f 498 496 488
|
| 1554 |
+
f 4 6 314
|
| 1555 |
+
f 497 484 501
|
| 1556 |
+
f 414 454 496
|
| 1557 |
+
f 322 327 506
|
| 1558 |
+
f 505 506 507
|
| 1559 |
+
f 507 506 327
|
| 1560 |
+
f 501 505 507
|
| 1561 |
+
f 410 414 496
|
| 1562 |
+
f 287 516 286
|
| 1563 |
+
f 353 302 502
|
| 1564 |
+
f 422 483 504
|
| 1565 |
+
f 511 242 509
|
| 1566 |
+
f 508 509 242
|
| 1567 |
+
f 508 242 241
|
| 1568 |
+
f 483 68 97
|
| 1569 |
+
f 503 545 505
|
| 1570 |
+
f 545 546 505
|
| 1571 |
+
f 370 516 369
|
| 1572 |
+
f 507 327 332
|
| 1573 |
+
f 368 516 289
|
| 1574 |
+
f 483 97 504
|
| 1575 |
+
f 552 496 529
|
| 1576 |
+
f 332 497 507
|
| 1577 |
+
f 501 507 497
|
| 1578 |
+
f 504 120 514
|
| 1579 |
+
f 513 95 93
|
| 1580 |
+
f 504 97 120
|
| 1581 |
+
f 509 508 515
|
| 1582 |
+
f 288 289 516
|
| 1583 |
+
f 287 288 516
|
| 1584 |
+
f 314 286 516
|
| 1585 |
+
f 395 397 517
|
| 1586 |
+
f 496 552 510
|
| 1587 |
+
f 95 513 475
|
| 1588 |
+
f 484 519 520
|
| 1589 |
+
f 484 520 482
|
| 1590 |
+
f 530 508 241
|
| 1591 |
+
f 482 520 369
|
| 1592 |
+
f 520 519 523
|
| 1593 |
+
f 523 525 520
|
| 1594 |
+
f 497 354 518
|
| 1595 |
+
f 497 332 354
|
| 1596 |
+
f 497 395 484
|
| 1597 |
+
f 519 484 395
|
| 1598 |
+
f 517 519 395
|
| 1599 |
+
f 290 514 383
|
| 1600 |
+
f 136 512 129
|
| 1601 |
+
f 559 521 510
|
| 1602 |
+
f 514 120 128
|
| 1603 |
+
f 524 419 407
|
| 1604 |
+
f 599 502 499
|
| 1605 |
+
f 664 465 469
|
| 1606 |
+
f 517 523 519
|
| 1607 |
+
f 522 453 500
|
| 1608 |
+
f 514 128 383
|
| 1609 |
+
f 511 509 515
|
| 1610 |
+
f 518 524 407
|
| 1611 |
+
f 664 461 465
|
| 1612 |
+
f 128 406 383
|
| 1613 |
+
f 518 362 524
|
| 1614 |
+
f 369 520 525
|
| 1615 |
+
f 525 471 369
|
| 1616 |
+
f 539 531 526
|
| 1617 |
+
f 517 525 523
|
| 1618 |
+
f 518 354 362
|
| 1619 |
+
f 239 381 240
|
| 1620 |
+
f 599 353 502
|
| 1621 |
+
f 524 457 419
|
| 1622 |
+
f 483 478 527
|
| 1623 |
+
f 498 487 528
|
| 1624 |
+
f 563 565 240
|
| 1625 |
+
f 524 372 457
|
| 1626 |
+
f 527 68 483
|
| 1627 |
+
f 264 487 486
|
| 1628 |
+
f 524 362 372
|
| 1629 |
+
f 482 369 368
|
| 1630 |
+
f 137 68 527
|
| 1631 |
+
f 531 454 526
|
| 1632 |
+
f 495 289 532
|
| 1633 |
+
f 532 503 495
|
| 1634 |
+
f 515 508 530
|
| 1635 |
+
f 528 410 498
|
| 1636 |
+
f 353 627 259
|
| 1637 |
+
f 539 526 533
|
| 1638 |
+
f 495 482 289
|
| 1639 |
+
f 471 472 370
|
| 1640 |
+
f 370 369 471
|
| 1641 |
+
f 500 537 534
|
| 1642 |
+
f 503 532 535
|
| 1643 |
+
f 529 454 531
|
| 1644 |
+
f 199 617 200
|
| 1645 |
+
f 472 471 517
|
| 1646 |
+
f 603 473 200
|
| 1647 |
+
f 540 243 538
|
| 1648 |
+
f 242 553 243
|
| 1649 |
+
f 542 543 541
|
| 1650 |
+
f 539 541 544
|
| 1651 |
+
f 544 541 543
|
| 1652 |
+
f 531 539 544
|
| 1653 |
+
f 535 546 545
|
| 1654 |
+
f 540 547 243
|
| 1655 |
+
f 57 129 547
|
| 1656 |
+
f 548 470 467
|
| 1657 |
+
f 8 460 467
|
| 1658 |
+
f 548 467 460
|
| 1659 |
+
f 533 577 539
|
| 1660 |
+
f 92 534 537
|
| 1661 |
+
f 92 537 536
|
| 1662 |
+
f 92 536 93
|
| 1663 |
+
f 517 432 472
|
| 1664 |
+
f 544 543 549
|
| 1665 |
+
f 531 544 529
|
| 1666 |
+
f 93 536 513
|
| 1667 |
+
f 549 529 544
|
| 1668 |
+
f 535 545 503
|
| 1669 |
+
f 449 540 538
|
| 1670 |
+
f 471 525 517
|
| 1671 |
+
f 242 511 553
|
| 1672 |
+
f 538 243 553
|
| 1673 |
+
f 556 557 485
|
| 1674 |
+
f 555 556 485
|
| 1675 |
+
f 469 485 468
|
| 1676 |
+
f 547 512 243
|
| 1677 |
+
f 569 199 198
|
| 1678 |
+
f 529 558 552
|
| 1679 |
+
f 423 560 263
|
| 1680 |
+
f 337 250 551
|
| 1681 |
+
f 225 554 485
|
| 1682 |
+
f 529 549 558
|
| 1683 |
+
f 200 494 199
|
| 1684 |
+
f 511 515 449
|
| 1685 |
+
f 522 500 567
|
| 1686 |
+
f 553 511 449
|
| 1687 |
+
f 202 203 485
|
| 1688 |
+
f 538 553 449
|
| 1689 |
+
f 552 22 559
|
| 1690 |
+
f 201 200 473
|
| 1691 |
+
f 589 600 500
|
| 1692 |
+
f 588 589 500
|
| 1693 |
+
f 129 512 547
|
| 1694 |
+
f 552 558 22
|
| 1695 |
+
f 623 198 197
|
| 1696 |
+
f 554 555 485
|
| 1697 |
+
f 557 468 485
|
| 1698 |
+
f 528 264 561
|
| 1699 |
+
f 560 561 264
|
| 1700 |
+
f 560 264 263
|
| 1701 |
+
f 200 201 485
|
| 1702 |
+
f 563 240 564
|
| 1703 |
+
f 196 207 197
|
| 1704 |
+
f 534 562 500
|
| 1705 |
+
f 265 264 486
|
| 1706 |
+
f 559 27 643
|
| 1707 |
+
f 562 534 91
|
| 1708 |
+
f 241 240 566
|
| 1709 |
+
f 22 27 559
|
| 1710 |
+
f 622 623 197
|
| 1711 |
+
f 566 530 241
|
| 1712 |
+
f 92 91 534
|
| 1713 |
+
f 561 560 410
|
| 1714 |
+
f 595 289 288
|
| 1715 |
+
f 526 464 568
|
| 1716 |
+
f 526 568 533
|
| 1717 |
+
f 105 567 126
|
| 1718 |
+
f 515 530 566
|
| 1719 |
+
f 515 566 565
|
| 1720 |
+
f 482 368 289
|
| 1721 |
+
f 570 199 569
|
| 1722 |
+
f 571 199 570
|
| 1723 |
+
f 452 262 464
|
| 1724 |
+
f 526 452 464
|
| 1725 |
+
f 201 202 485
|
| 1726 |
+
f 203 225 485
|
| 1727 |
+
f 485 494 200
|
| 1728 |
+
f 493 196 494
|
| 1729 |
+
f 12 337 551
|
| 1730 |
+
f 602 200 617
|
| 1731 |
+
f 572 533 568
|
| 1732 |
+
f 286 322 287
|
| 1733 |
+
f 561 410 528
|
| 1734 |
+
f 211 516 574
|
| 1735 |
+
f 563 564 347
|
| 1736 |
+
f 449 563 347
|
| 1737 |
+
f 288 287 505
|
| 1738 |
+
f 570 569 575
|
| 1739 |
+
f 560 423 410
|
| 1740 |
+
f 573 597 599
|
| 1741 |
+
f 23 573 576
|
| 1742 |
+
f 505 546 288
|
| 1743 |
+
f 563 449 565
|
| 1744 |
+
f 515 565 449
|
| 1745 |
+
f 624 626 198
|
| 1746 |
+
f 577 578 539
|
| 1747 |
+
f 576 573 599
|
| 1748 |
+
f 572 578 577
|
| 1749 |
+
f 581 582 580
|
| 1750 |
+
f 579 580 582
|
| 1751 |
+
f 575 571 570
|
| 1752 |
+
f 371 574 516
|
| 1753 |
+
f 559 510 552
|
| 1754 |
+
f 581 580 584
|
| 1755 |
+
f 584 634 581
|
| 1756 |
+
f 622 197 585
|
| 1757 |
+
f 585 197 583
|
| 1758 |
+
f 600 601 567
|
| 1759 |
+
f 287 506 505
|
| 1760 |
+
f 580 579 586
|
| 1761 |
+
f 580 586 584
|
| 1762 |
+
f 572 631 578
|
| 1763 |
+
f 600 567 500
|
| 1764 |
+
f 572 577 533
|
| 1765 |
+
f 569 198 590
|
| 1766 |
+
f 626 590 198
|
| 1767 |
+
f 19 576 587
|
| 1768 |
+
f 500 562 588
|
| 1769 |
+
f 347 584 586
|
| 1770 |
+
f 506 287 322
|
| 1771 |
+
f 213 214 516
|
| 1772 |
+
f 493 216 209
|
| 1773 |
+
f 587 576 320
|
| 1774 |
+
f 541 463 462
|
| 1775 |
+
f 589 588 90
|
| 1776 |
+
f 562 91 588
|
| 1777 |
+
f 680 340 582
|
| 1778 |
+
f 579 582 340
|
| 1779 |
+
f 90 588 91
|
| 1780 |
+
f 594 593 592
|
| 1781 |
+
f 591 592 593
|
| 1782 |
+
f 199 494 198
|
| 1783 |
+
f 585 583 223
|
| 1784 |
+
f 596 289 595
|
| 1785 |
+
f 532 289 596
|
| 1786 |
+
f 593 74 591
|
| 1787 |
+
f 569 590 575
|
| 1788 |
+
f 586 579 347
|
| 1789 |
+
f 620 621 567
|
| 1790 |
+
f 79 594 75
|
| 1791 |
+
f 596 595 535
|
| 1792 |
+
f 396 340 598
|
| 1793 |
+
f 139 189 591
|
| 1794 |
+
f 592 591 189
|
| 1795 |
+
f 592 189 188
|
| 1796 |
+
f 592 188 195
|
| 1797 |
+
f 209 196 493
|
| 1798 |
+
f 212 213 516
|
| 1799 |
+
f 368 369 516
|
| 1800 |
+
f 370 371 516
|
| 1801 |
+
f 516 211 212
|
| 1802 |
+
f 598 420 396
|
| 1803 |
+
f 532 596 535
|
| 1804 |
+
f 583 207 223
|
| 1805 |
+
f 462 461 541
|
| 1806 |
+
f 499 576 599
|
| 1807 |
+
f 567 601 612
|
| 1808 |
+
f 199 571 617
|
| 1809 |
+
f 595 288 546
|
| 1810 |
+
f 440 593 451
|
| 1811 |
+
f 436 593 440
|
| 1812 |
+
f 458 451 593
|
| 1813 |
+
f 421 593 436
|
| 1814 |
+
f 409 593 421
|
| 1815 |
+
f 394 593 409
|
| 1816 |
+
f 374 593 394
|
| 1817 |
+
f 350 333 593
|
| 1818 |
+
f 460 458 593
|
| 1819 |
+
f 603 200 602
|
| 1820 |
+
f 89 601 600
|
| 1821 |
+
f 89 600 90
|
| 1822 |
+
f 595 546 535
|
| 1823 |
+
f 90 600 589
|
| 1824 |
+
f 539 463 541
|
| 1825 |
+
f 592 75 594
|
| 1826 |
+
f 606 647 605
|
| 1827 |
+
f 648 605 647
|
| 1828 |
+
f 83 75 195
|
| 1829 |
+
f 592 195 75
|
| 1830 |
+
f 74 593 333
|
| 1831 |
+
f 141 74 297
|
| 1832 |
+
f 333 297 74
|
| 1833 |
+
f 374 350 593
|
| 1834 |
+
f 603 602 527
|
| 1835 |
+
f 598 604 420
|
| 1836 |
+
f 607 608 79
|
| 1837 |
+
f 608 609 79
|
| 1838 |
+
f 79 609 610
|
| 1839 |
+
f 79 610 611
|
| 1840 |
+
f 79 611 182
|
| 1841 |
+
f 473 603 424
|
| 1842 |
+
f 601 89 612
|
| 1843 |
+
f 61 593 100
|
| 1844 |
+
f 42 593 61
|
| 1845 |
+
f 131 100 594
|
| 1846 |
+
f 41 593 42
|
| 1847 |
+
f 613 593 41
|
| 1848 |
+
f 548 593 613
|
| 1849 |
+
f 460 593 548
|
| 1850 |
+
f 594 100 593
|
| 1851 |
+
f 157 131 594
|
| 1852 |
+
f 616 79 615
|
| 1853 |
+
f 614 615 79
|
| 1854 |
+
f 607 79 618
|
| 1855 |
+
f 618 79 616
|
| 1856 |
+
f 119 614 79
|
| 1857 |
+
f 598 76 604
|
| 1858 |
+
f 88 612 89
|
| 1859 |
+
f 300 259 627
|
| 1860 |
+
f 621 217 567
|
| 1861 |
+
f 182 174 79
|
| 1862 |
+
f 168 594 174
|
| 1863 |
+
f 79 174 594
|
| 1864 |
+
f 594 168 157
|
| 1865 |
+
f 617 571 527
|
| 1866 |
+
f 527 571 575
|
| 1867 |
+
f 567 612 620
|
| 1868 |
+
f 602 617 527
|
| 1869 |
+
f 621 620 87
|
| 1870 |
+
f 619 604 221
|
| 1871 |
+
f 685 642 486
|
| 1872 |
+
f 624 198 623
|
| 1873 |
+
f 76 221 604
|
| 1874 |
+
f 87 620 88
|
| 1875 |
+
f 612 88 620
|
| 1876 |
+
f 496 680 488
|
| 1877 |
+
f 126 567 217
|
| 1878 |
+
f 223 137 585
|
| 1879 |
+
f 361 694 619
|
| 1880 |
+
f 625 599 597
|
| 1881 |
+
f 221 277 619
|
| 1882 |
+
f 622 585 137
|
| 1883 |
+
f 178 629 140
|
| 1884 |
+
f 300 627 628
|
| 1885 |
+
f 619 277 361
|
| 1886 |
+
f 623 622 137
|
| 1887 |
+
f 575 590 626
|
| 1888 |
+
f 627 599 628
|
| 1889 |
+
f 631 464 463
|
| 1890 |
+
f 539 578 463
|
| 1891 |
+
f 631 463 578
|
| 1892 |
+
f 630 636 307
|
| 1893 |
+
f 625 628 599
|
| 1894 |
+
f 632 464 631
|
| 1895 |
+
f 568 464 632
|
| 1896 |
+
f 419 457 650
|
| 1897 |
+
f 510 521 5
|
| 1898 |
+
f 611 630 629
|
| 1899 |
+
f 611 629 182
|
| 1900 |
+
f 137 527 623
|
| 1901 |
+
f 624 623 527
|
| 1902 |
+
f 575 626 527
|
| 1903 |
+
f 457 466 650
|
| 1904 |
+
f 353 599 627
|
| 1905 |
+
f 521 76 5
|
| 1906 |
+
f 632 631 572
|
| 1907 |
+
f 629 178 182
|
| 1908 |
+
f 624 527 626
|
| 1909 |
+
f 548 613 550
|
| 1910 |
+
f 548 550 470
|
| 1911 |
+
f 634 584 347
|
| 1912 |
+
f 640 307 636
|
| 1913 |
+
f 392 697 389
|
| 1914 |
+
f 521 635 76
|
| 1915 |
+
f 581 237 633
|
| 1916 |
+
f 568 632 572
|
| 1917 |
+
f 630 611 636
|
| 1918 |
+
f 681 468 557
|
| 1919 |
+
f 667 389 661
|
| 1920 |
+
f 661 389 697
|
| 1921 |
+
f 461 542 541
|
| 1922 |
+
f 610 636 611
|
| 1923 |
+
f 347 682 634
|
| 1924 |
+
f 697 392 695
|
| 1925 |
+
f 395 695 392
|
| 1926 |
+
f 645 307 641
|
| 1927 |
+
f 128 639 406
|
| 1928 |
+
f 695 395 407
|
| 1929 |
+
f 641 640 609
|
| 1930 |
+
f 610 609 640
|
| 1931 |
+
f 610 640 636
|
| 1932 |
+
f 559 643 521
|
| 1933 |
+
f 435 433 639
|
| 1934 |
+
f 637 44 551
|
| 1935 |
+
f 44 43 551
|
| 1936 |
+
f 606 681 557
|
| 1937 |
+
f 551 250 637
|
| 1938 |
+
f 644 642 28
|
| 1939 |
+
f 646 645 608
|
| 1940 |
+
f 609 608 645
|
| 1941 |
+
f 329 670 587
|
| 1942 |
+
f 609 645 641
|
| 1943 |
+
f 647 556 649
|
| 1944 |
+
f 647 649 648
|
| 1945 |
+
f 310 646 316
|
| 1946 |
+
f 329 337 670
|
| 1947 |
+
f 608 607 316
|
| 1948 |
+
f 608 316 646
|
| 1949 |
+
f 653 687 648
|
| 1950 |
+
f 652 128 120
|
| 1951 |
+
f 649 653 648
|
| 1952 |
+
f 56 272 265
|
| 1953 |
+
f 30 690 653
|
| 1954 |
+
f 64 48 551
|
| 1955 |
+
f 652 639 128
|
| 1956 |
+
f 643 130 651
|
| 1957 |
+
f 655 660 466
|
| 1958 |
+
f 671 653 649
|
| 1959 |
+
f 265 644 56
|
| 1960 |
+
f 351 639 652
|
| 1961 |
+
f 670 337 12
|
| 1962 |
+
f 618 655 654
|
| 1963 |
+
f 316 607 654
|
| 1964 |
+
f 618 654 607
|
| 1965 |
+
f 12 551 48
|
| 1966 |
+
f 643 27 130
|
| 1967 |
+
f 642 644 486
|
| 1968 |
+
f 31 30 653
|
| 1969 |
+
f 170 171 651
|
| 1970 |
+
f 675 373 238
|
| 1971 |
+
f 26 573 23
|
| 1972 |
+
f 653 65 31
|
| 1973 |
+
f 466 668 669
|
| 1974 |
+
f 597 573 26
|
| 1975 |
+
f 657 658 656
|
| 1976 |
+
f 658 659 656
|
| 1977 |
+
f 656 659 693
|
| 1978 |
+
f 239 238 373
|
| 1979 |
+
f 660 668 466
|
| 1980 |
+
f 135 159 130
|
| 1981 |
+
f 576 19 23
|
| 1982 |
+
f 658 662 659
|
| 1983 |
+
f 644 265 486
|
| 1984 |
+
f 662 658 663
|
| 1985 |
+
f 657 663 658
|
| 1986 |
+
f 587 33 19
|
| 1987 |
+
f 665 666 664
|
| 1988 |
+
f 681 673 665
|
| 1989 |
+
f 666 543 664
|
| 1990 |
+
f 542 664 543
|
| 1991 |
+
f 655 618 660
|
| 1992 |
+
f 616 660 618
|
| 1993 |
+
f 634 682 237
|
| 1994 |
+
f 469 34 665
|
| 1995 |
+
f 34 674 665
|
| 1996 |
+
f 313 662 663
|
| 1997 |
+
f 669 676 466
|
| 1998 |
+
f 676 62 466
|
| 1999 |
+
f 665 664 469
|
| 2000 |
+
f 556 647 557
|
| 2001 |
+
f 667 661 29
|
| 2002 |
+
f 635 521 643
|
| 2003 |
+
f 542 461 664
|
| 2004 |
+
f 33 670 38
|
| 2005 |
+
f 676 678 62
|
| 2006 |
+
f 657 308 313
|
| 2007 |
+
f 649 556 671
|
| 2008 |
+
f 65 671 556
|
| 2009 |
+
f 635 643 651
|
| 2010 |
+
f 672 549 666
|
| 2011 |
+
f 543 666 549
|
| 2012 |
+
f 389 667 371
|
| 2013 |
+
f 606 557 647
|
| 2014 |
+
f 695 308 656
|
| 2015 |
+
f 656 308 657
|
| 2016 |
+
f 669 668 615
|
| 2017 |
+
f 616 615 668
|
| 2018 |
+
f 651 173 635
|
| 2019 |
+
f 670 33 587
|
| 2020 |
+
f 666 665 673
|
| 2021 |
+
f 616 668 660
|
| 2022 |
+
f 663 657 313
|
| 2023 |
+
f 681 665 674
|
| 2024 |
+
f 674 39 681
|
| 2025 |
+
f 56 50 272
|
| 2026 |
+
f 683 675 238
|
| 2027 |
+
f 682 683 238
|
| 2028 |
+
f 653 671 65
|
| 2029 |
+
f 581 677 582
|
| 2030 |
+
f 633 677 581
|
| 2031 |
+
f 373 675 367
|
| 2032 |
+
f 673 672 666
|
| 2033 |
+
f 678 676 614
|
| 2034 |
+
f 615 614 676
|
| 2035 |
+
f 615 676 669
|
| 2036 |
+
f 698 679 308
|
| 2037 |
+
f 680 582 677
|
| 2038 |
+
f 677 28 680
|
| 2039 |
+
f 36 674 34
|
| 2040 |
+
f 633 237 155
|
| 2041 |
+
f 252 62 678
|
| 2042 |
+
f 667 58 371
|
| 2043 |
+
f 670 12 38
|
| 2044 |
+
f 606 605 681
|
| 2045 |
+
f 673 681 605
|
| 2046 |
+
f 678 614 252
|
| 2047 |
+
f 238 237 682
|
| 2048 |
+
f 581 634 237
|
| 2049 |
+
f 695 698 308
|
| 2050 |
+
f 633 28 677
|
| 2051 |
+
f 574 371 58
|
| 2052 |
+
f 119 252 614
|
| 2053 |
+
f 11 13 686
|
| 2054 |
+
f 633 155 28
|
| 2055 |
+
f 13 522 105
|
| 2056 |
+
f 58 667 29
|
| 2057 |
+
f 687 672 605
|
| 2058 |
+
f 673 605 672
|
| 2059 |
+
f 488 685 486
|
| 2060 |
+
f 11 522 13
|
| 2061 |
+
f 94 684 116
|
| 2062 |
+
f 36 39 674
|
| 2063 |
+
f 682 347 683
|
| 2064 |
+
f 567 105 522
|
| 2065 |
+
f 300 628 1
|
| 2066 |
+
f 679 684 94
|
| 2067 |
+
f 549 672 686
|
| 2068 |
+
f 605 648 687
|
| 2069 |
+
f 679 698 132
|
| 2070 |
+
f 62 185 650
|
| 2071 |
+
f 367 675 683
|
| 2072 |
+
f 679 132 684
|
| 2073 |
+
f 684 688 116
|
| 2074 |
+
f 625 1 628
|
| 2075 |
+
f 604 430 420
|
| 2076 |
+
f 488 680 685
|
| 2077 |
+
f 28 685 680
|
| 2078 |
+
f 686 558 549
|
| 2079 |
+
f 116 688 652
|
| 2080 |
+
f 62 650 466
|
| 2081 |
+
f 690 691 689
|
| 2082 |
+
f 691 692 689
|
| 2083 |
+
f 689 692 227
|
| 2084 |
+
f 185 688 684
|
| 2085 |
+
f 642 685 28
|
| 2086 |
+
f 132 185 684
|
| 2087 |
+
f 555 554 691
|
| 2088 |
+
f 351 652 688
|
| 2089 |
+
f 340 680 5
|
| 2090 |
+
f 597 26 1
|
| 2091 |
+
f 690 30 691
|
| 2092 |
+
f 29 695 693
|
| 2093 |
+
f 46 430 694
|
| 2094 |
+
f 510 5 680
|
| 2095 |
+
f 211 10 659
|
| 2096 |
+
f 693 659 10
|
| 2097 |
+
f 659 662 9
|
| 2098 |
+
f 659 9 211
|
| 2099 |
+
f 604 619 430
|
| 2100 |
+
f 558 686 13
|
| 2101 |
+
f 662 313 9
|
| 2102 |
+
f 340 5 598
|
| 2103 |
+
f 228 687 689
|
| 2104 |
+
f 690 689 687
|
| 2105 |
+
f 653 690 687
|
| 2106 |
+
f 694 430 619
|
| 2107 |
+
f 680 496 510
|
| 2108 |
+
f 29 697 695
|
| 2109 |
+
f 13 22 558
|
| 2110 |
+
f 672 696 686
|
| 2111 |
+
f 625 597 1
|
| 2112 |
+
f 637 638 41
|
| 2113 |
+
f 44 637 41
|
| 2114 |
+
f 696 672 687
|
| 2115 |
+
f 638 550 613
|
| 2116 |
+
f 613 41 638
|
| 2117 |
+
f 29 661 697
|
| 2118 |
+
f 63 64 551
|
| 2119 |
+
f 687 234 696
|
| 2120 |
+
f 47 63 551
|
| 2121 |
+
f 3 431 437
|
| 2122 |
+
f 47 551 43
|
| 2123 |
+
f 686 696 11
|
| 2124 |
+
f 695 407 698
|
| 2125 |
+
f 694 49 46
|
| 2126 |
+
f 698 407 419
|
| 2127 |
+
f 3 49 694
|
| 2128 |
+
f 419 132 698
|
| 2129 |
+
f 694 361 3
|
| 2130 |
+
f 49 3 7
|
| 2131 |
+
# 1344 faces
|
| 2132 |
+
|
| 2133 |
+
#end of obj_0
|
| 2134 |
+
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/suction-base.urdf
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="0.0" ?>
|
| 2 |
+
<robot name="suction-base.urdf">
|
| 3 |
+
<material name="DarkGrey">
|
| 4 |
+
<color rgba="0.2 0.2 0.2 1.0"/>
|
| 5 |
+
</material>
|
| 6 |
+
<link name="baseLink">
|
| 7 |
+
<contact>
|
| 8 |
+
<lateral_friction value="1.0"/>
|
| 9 |
+
<rolling_friction value="0.0001"/>
|
| 10 |
+
<inertia_scaling value="3.0"/>
|
| 11 |
+
</contact>
|
| 12 |
+
<inertial>
|
| 13 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 14 |
+
<mass value=".1"/>
|
| 15 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 16 |
+
</inertial>
|
| 17 |
+
<visual>
|
| 18 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 19 |
+
<geometry>
|
| 20 |
+
<mesh filename="base.obj" scale="0.001 0.001 0.001"/>
|
| 21 |
+
</geometry>
|
| 22 |
+
<material name="DarkGrey"/>
|
| 23 |
+
</visual>
|
| 24 |
+
<!-- <collision>
|
| 25 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 26 |
+
<geometry>
|
| 27 |
+
<mesh filename="base.obj" scale="0.001 0.001 0.001"/>
|
| 28 |
+
</geometry>
|
| 29 |
+
</collision> -->
|
| 30 |
+
</link>
|
| 31 |
+
|
| 32 |
+
<joint name="headJoint" type="fixed">
|
| 33 |
+
<parent link="baseLink"/>
|
| 34 |
+
<child link="midLink"/>
|
| 35 |
+
<origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.015"/>
|
| 36 |
+
<axis xyz="0 0 1"/>
|
| 37 |
+
<limit effort="150.0" lower="-6.28318530718" upper="6.28318530718" velocity="3.15"/>
|
| 38 |
+
<dynamics damping="10.0" friction="0.0"/>
|
| 39 |
+
</joint>
|
| 40 |
+
|
| 41 |
+
<link name="midLink">
|
| 42 |
+
<contact>
|
| 43 |
+
<lateral_friction value="1.0"/>
|
| 44 |
+
<rolling_friction value="0.0001"/>
|
| 45 |
+
<inertia_scaling value="3.0"/>
|
| 46 |
+
</contact>
|
| 47 |
+
<inertial>
|
| 48 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 49 |
+
<mass value=".1"/>
|
| 50 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 51 |
+
</inertial>
|
| 52 |
+
<visual>
|
| 53 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 54 |
+
<geometry>
|
| 55 |
+
<mesh filename="mid.obj" scale="0.001 0.001 0.001"/>
|
| 56 |
+
</geometry>
|
| 57 |
+
<material name="DarkGrey"/>
|
| 58 |
+
</visual>
|
| 59 |
+
<collision>
|
| 60 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 61 |
+
<geometry>
|
| 62 |
+
<mesh filename="mid.obj" scale="0.001 0.001 0.001"/>
|
| 63 |
+
</geometry>
|
| 64 |
+
</collision>
|
| 65 |
+
</link>
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
</robot>
|
| 69 |
+
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/suction-head-long.urdf
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="0.0" ?>
|
| 2 |
+
<robot name="suction-head.urdf">
|
| 3 |
+
<link name="headLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="1.0"/>
|
| 6 |
+
<rolling_friction value="0.0001"/>
|
| 7 |
+
<inertia_scaling value="3.0"/>
|
| 8 |
+
</contact>
|
| 9 |
+
<inertial>
|
| 10 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 11 |
+
<mass value=".1"/>
|
| 12 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 13 |
+
</inertial>
|
| 14 |
+
<visual>
|
| 15 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 16 |
+
<geometry>
|
| 17 |
+
<mesh filename="head.obj" scale="0.001 0.001 0.001"/>
|
| 18 |
+
</geometry>
|
| 19 |
+
<material name="darkgrey">
|
| 20 |
+
<color rgba="0.2 0.2 0.2 1"/>
|
| 21 |
+
</material>
|
| 22 |
+
</visual>
|
| 23 |
+
<collision>
|
| 24 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 25 |
+
<geometry>
|
| 26 |
+
<mesh filename="head.obj" scale="0.001 0.001 0.001"/>
|
| 27 |
+
</geometry>
|
| 28 |
+
</collision>
|
| 29 |
+
</link>
|
| 30 |
+
|
| 31 |
+
<joint name="tipJoint" type="fixed">
|
| 32 |
+
<parent link="headLink"/>
|
| 33 |
+
<child link="tipLink"/>
|
| 34 |
+
<origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.029"/>
|
| 35 |
+
<axis xyz="0 0 1"/>
|
| 36 |
+
<limit effort="150.0" lower="-6.28318530718" upper="6.28318530718" velocity="3.15"/>
|
| 37 |
+
<dynamics damping="10.0" friction="0.0"/>
|
| 38 |
+
</joint>
|
| 39 |
+
|
| 40 |
+
<link name="tipLink">
|
| 41 |
+
<contact>
|
| 42 |
+
<lateral_friction value="1.0"/>
|
| 43 |
+
<rolling_friction value="0.0001"/>
|
| 44 |
+
<inertia_scaling value="3.0"/>
|
| 45 |
+
</contact>
|
| 46 |
+
<inertial>
|
| 47 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 48 |
+
<mass value=".1"/>
|
| 49 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 50 |
+
</inertial>
|
| 51 |
+
<visual>
|
| 52 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 53 |
+
<geometry>
|
| 54 |
+
<mesh filename="tip.obj" scale="0.001 0.001 0.001"/>
|
| 55 |
+
</geometry>
|
| 56 |
+
<material name="blue">
|
| 57 |
+
<color rgba="0.18039216, 0.50588235, 0.77254902 1"/>
|
| 58 |
+
</material>
|
| 59 |
+
</visual>
|
| 60 |
+
<collision>
|
| 61 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 62 |
+
<!-- <geometry>
|
| 63 |
+
<mesh filename="tip.obj" scale="0.001 0.001 0.001"/>
|
| 64 |
+
</geometry> -->
|
| 65 |
+
<geometry>
|
| 66 |
+
<cylinder length="0.028" radius="0.001"/>
|
| 67 |
+
</geometry>
|
| 68 |
+
</collision>
|
| 69 |
+
</link>
|
| 70 |
+
|
| 71 |
+
<!-- <link name="asdfLink">
|
| 72 |
+
<contact>
|
| 73 |
+
<lateral_friction value="1.0"/>
|
| 74 |
+
<rolling_friction value="0.0001"/>
|
| 75 |
+
<inertia_scaling value="3.0"/>
|
| 76 |
+
</contact>
|
| 77 |
+
<inertial>
|
| 78 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 79 |
+
<mass value=".1"/>
|
| 80 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 81 |
+
</inertial>
|
| 82 |
+
<visual>
|
| 83 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 84 |
+
<geometry>
|
| 85 |
+
<cylinder length="0.028" radius="0.001"/>
|
| 86 |
+
</geometry>
|
| 87 |
+
</visual>
|
| 88 |
+
</link>
|
| 89 |
+
|
| 90 |
+
<joint name="asdfoint" type="fixed">
|
| 91 |
+
<parent link="tipLink"/>
|
| 92 |
+
<child link="asdfLink"/>
|
| 93 |
+
<origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0"/>
|
| 94 |
+
<axis xyz="0 0 1"/>
|
| 95 |
+
<limit effort="150.0" lower="-6.28318530718" upper="6.28318530718" velocity="3.15"/>
|
| 96 |
+
<dynamics damping="10.0" friction="0.0"/>
|
| 97 |
+
</joint> -->
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
</robot>
|
| 101 |
+
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/suction-head.urdf
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="0.0" ?>
|
| 2 |
+
<robot name="suction-head.urdf">
|
| 3 |
+
<link name="headLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="1.0"/>
|
| 6 |
+
<rolling_friction value="0.0001"/>
|
| 7 |
+
<inertia_scaling value="3.0"/>
|
| 8 |
+
</contact>
|
| 9 |
+
<inertial>
|
| 10 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 11 |
+
<mass value=".1"/>
|
| 12 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 13 |
+
</inertial>
|
| 14 |
+
<visual>
|
| 15 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 16 |
+
<geometry>
|
| 17 |
+
<mesh filename="head.obj" scale="0.001 0.001 0.001"/>
|
| 18 |
+
</geometry>
|
| 19 |
+
<material name="darkgrey">
|
| 20 |
+
<color rgba="0.2 0.2 0.2 1"/>
|
| 21 |
+
</material>
|
| 22 |
+
</visual>
|
| 23 |
+
<collision>
|
| 24 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 25 |
+
<geometry>
|
| 26 |
+
<mesh filename="head.obj" scale="0.001 0.001 0.001"/>
|
| 27 |
+
</geometry>
|
| 28 |
+
</collision>
|
| 29 |
+
</link>
|
| 30 |
+
|
| 31 |
+
<joint name="tipJoint" type="fixed">
|
| 32 |
+
<parent link="headLink"/>
|
| 33 |
+
<child link="tipLink"/>
|
| 34 |
+
<origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.029"/>
|
| 35 |
+
<axis xyz="0 0 1"/>
|
| 36 |
+
<limit effort="150.0" lower="-6.28318530718" upper="6.28318530718" velocity="3.15"/>
|
| 37 |
+
<dynamics damping="10.0" friction="0.0"/>
|
| 38 |
+
</joint>
|
| 39 |
+
|
| 40 |
+
<link name="tipLink">
|
| 41 |
+
<contact>
|
| 42 |
+
<lateral_friction value="1.0"/>
|
| 43 |
+
<rolling_friction value="0.0001"/>
|
| 44 |
+
<inertia_scaling value="3.0"/>
|
| 45 |
+
</contact>
|
| 46 |
+
<inertial>
|
| 47 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 48 |
+
<mass value=".1"/>
|
| 49 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 50 |
+
</inertial>
|
| 51 |
+
<visual>
|
| 52 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 53 |
+
<geometry>
|
| 54 |
+
<mesh filename="tip.obj" scale="0.001 0.001 0.001"/>
|
| 55 |
+
</geometry>
|
| 56 |
+
<material name="blue">
|
| 57 |
+
<color rgba="0.18039216, 0.50588235, 0.77254902 1"/>
|
| 58 |
+
</material>
|
| 59 |
+
</visual>
|
| 60 |
+
<collision>
|
| 61 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 62 |
+
<geometry>
|
| 63 |
+
<mesh filename="tip.obj" scale="0.001 0.001 0.001"/>
|
| 64 |
+
</geometry>
|
| 65 |
+
</collision>
|
| 66 |
+
</link>
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
</robot>
|
| 70 |
+
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/suction/tip.obj
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/workspace.urdf
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="0.0" ?>
|
| 2 |
+
<robot name="workspace.urdf">
|
| 3 |
+
<link name="baseLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="1.0"/>
|
| 6 |
+
<inertia_scaling value="3.0"/>
|
| 7 |
+
</contact>
|
| 8 |
+
<inertial>
|
| 9 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 10 |
+
<mass value="0"/>
|
| 11 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 12 |
+
</inertial>
|
| 13 |
+
<visual>
|
| 14 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 15 |
+
<geometry>
|
| 16 |
+
<mesh filename="plane.obj" scale="0.0167 0.0333 1"/>
|
| 17 |
+
</geometry>
|
| 18 |
+
<material name="DarkGrey">
|
| 19 |
+
<color rgba="0.2 0.2 0.2 1"/>
|
| 20 |
+
</material>
|
| 21 |
+
</visual>
|
| 22 |
+
<!-- <collision>
|
| 23 |
+
<origin rpy="0 0 0" xyz="0 0 -0.005"/>
|
| 24 |
+
<geometry>
|
| 25 |
+
<box size="2.0 3.0 0.01"/>
|
| 26 |
+
</geometry>
|
| 27 |
+
</collision> -->
|
| 28 |
+
</link>
|
| 29 |
+
</robot>
|
| 30 |
+
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/workspace_real.urdf
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="0.0" ?>
|
| 2 |
+
<robot name="workspace.urdf">
|
| 3 |
+
<link name="baseLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="1.0"/>
|
| 6 |
+
<inertia_scaling value="3.0"/>
|
| 7 |
+
</contact>
|
| 8 |
+
<inertial>
|
| 9 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 10 |
+
<mass value="0"/>
|
| 11 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 12 |
+
</inertial>
|
| 13 |
+
<visual>
|
| 14 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 15 |
+
<geometry>
|
| 16 |
+
<mesh filename="plane.obj" scale="0.01524 0.02032 1"/>
|
| 17 |
+
</geometry>
|
| 18 |
+
<material name="DarkGrey">
|
| 19 |
+
<color rgba="0.2 0.2 0.2 1"/>
|
| 20 |
+
</material>
|
| 21 |
+
</visual>
|
| 22 |
+
<!-- <collision>
|
| 23 |
+
<origin rpy="0 0 0" xyz="0 0 -0.005"/>
|
| 24 |
+
<geometry>
|
| 25 |
+
<box size="2.0 3.0 0.01"/>
|
| 26 |
+
</geometry>
|
| 27 |
+
</collision> -->
|
| 28 |
+
</link>
|
| 29 |
+
</robot>
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/zone.obj
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Object Export From Tinkercad Server 2015
|
| 2 |
+
|
| 3 |
+
mtllib obj.mtl
|
| 4 |
+
|
| 5 |
+
o obj_0
|
| 6 |
+
v 10 -10 20
|
| 7 |
+
v 10 -10 0
|
| 8 |
+
v 10 10 0
|
| 9 |
+
v 10 10 20
|
| 10 |
+
v 9.002 9.003 20
|
| 11 |
+
v 9.002 -9.002 20
|
| 12 |
+
v -10 10 0
|
| 13 |
+
v -10 10 20
|
| 14 |
+
v -9.003 9.003 20
|
| 15 |
+
v -9.003 9.003 0
|
| 16 |
+
v 9.002 9.003 0
|
| 17 |
+
v 9.002 -9.002 0
|
| 18 |
+
v -9.003 -9.002 0
|
| 19 |
+
v -9.003 -9.002 20
|
| 20 |
+
v -10 -10 0
|
| 21 |
+
v -10 -10 20
|
| 22 |
+
# 16 vertices
|
| 23 |
+
|
| 24 |
+
g group_0_15277357
|
| 25 |
+
|
| 26 |
+
usemtl color_15277357
|
| 27 |
+
s 0
|
| 28 |
+
|
| 29 |
+
f 1 2 3
|
| 30 |
+
f 1 3 4
|
| 31 |
+
f 4 5 6
|
| 32 |
+
f 4 6 1
|
| 33 |
+
f 9 10 11
|
| 34 |
+
f 9 11 5
|
| 35 |
+
f 6 12 13
|
| 36 |
+
f 6 13 14
|
| 37 |
+
f 10 9 14
|
| 38 |
+
f 10 14 13
|
| 39 |
+
f 7 10 13
|
| 40 |
+
f 7 13 15
|
| 41 |
+
f 4 8 5
|
| 42 |
+
f 9 5 8
|
| 43 |
+
f 8 7 15
|
| 44 |
+
f 8 15 16
|
| 45 |
+
f 10 7 11
|
| 46 |
+
f 3 11 7
|
| 47 |
+
f 11 3 12
|
| 48 |
+
f 2 12 3
|
| 49 |
+
f 14 16 6
|
| 50 |
+
f 1 6 16
|
| 51 |
+
f 16 15 2
|
| 52 |
+
f 16 2 1
|
| 53 |
+
f 9 8 14
|
| 54 |
+
f 16 14 8
|
| 55 |
+
f 7 8 3
|
| 56 |
+
f 4 3 8
|
| 57 |
+
f 2 15 12
|
| 58 |
+
f 13 12 15
|
| 59 |
+
f 12 6 5
|
| 60 |
+
f 12 5 11
|
| 61 |
+
# 32 faces
|
| 62 |
+
|
| 63 |
+
#end of obj_0
|
| 64 |
+
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/zone.urdf
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" ?>
|
| 2 |
+
<robot name="zone.urdf">
|
| 3 |
+
<link name="baseLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="1.0"/>
|
| 6 |
+
<inertia_scaling value="3.0"/>
|
| 7 |
+
</contact>
|
| 8 |
+
<inertial>
|
| 9 |
+
<origin rpy="0 0 0" xyz="-0.01 0 0.02"/>
|
| 10 |
+
<mass value=".1"/>
|
| 11 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 12 |
+
</inertial>
|
| 13 |
+
<visual>
|
| 14 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 15 |
+
<geometry>
|
| 16 |
+
<mesh filename="zone.obj" scale="0.006 0.006 0.00005"/>
|
| 17 |
+
</geometry>
|
| 18 |
+
<material name="green">
|
| 19 |
+
<color rgba="0 1 0 1"/>
|
| 20 |
+
</material>
|
| 21 |
+
</visual>
|
| 22 |
+
</link>
|
| 23 |
+
</robot>
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/assets/zone2.urdf
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" ?>
|
| 2 |
+
<robot name="zone2.urdf">
|
| 3 |
+
<link name="baseLink">
|
| 4 |
+
<contact>
|
| 5 |
+
<lateral_friction value="1.0"/>
|
| 6 |
+
<inertia_scaling value="3.0"/>
|
| 7 |
+
</contact>
|
| 8 |
+
<inertial>
|
| 9 |
+
<origin rpy="0 0 0" xyz="-0.01 0 0.02"/>
|
| 10 |
+
<mass value=".1"/>
|
| 11 |
+
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
| 12 |
+
</inertial>
|
| 13 |
+
<visual>
|
| 14 |
+
<origin rpy="0 0 0" xyz="0 0 0"/>
|
| 15 |
+
<geometry>
|
| 16 |
+
<mesh filename="zone.obj" scale="0.006 0.006 0.00005"/>
|
| 17 |
+
</geometry>
|
| 18 |
+
<material name="red">
|
| 19 |
+
<color rgba="1 0 0 1"/>
|
| 20 |
+
</material>
|
| 21 |
+
</visual>
|
| 22 |
+
</link>
|
| 23 |
+
</robot>
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/block_pushing.py
ADDED
|
@@ -0,0 +1,1092 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 The Reach ML Authors.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
|
| 16 |
+
"""Simple block environments for the XArm."""
|
| 17 |
+
|
| 18 |
+
import collections
|
| 19 |
+
import enum
|
| 20 |
+
import math
|
| 21 |
+
import time
|
| 22 |
+
from typing import Dict, List, Optional, Tuple, Union
|
| 23 |
+
|
| 24 |
+
import gym
|
| 25 |
+
from gym import spaces
|
| 26 |
+
from gym.envs import registration
|
| 27 |
+
from diffusion_policy.env.block_pushing.utils import utils_pybullet
|
| 28 |
+
from diffusion_policy.env.block_pushing.utils import xarm_sim_robot
|
| 29 |
+
from diffusion_policy.env.block_pushing.utils.pose3d import Pose3d
|
| 30 |
+
from diffusion_policy.env.block_pushing.utils.utils_pybullet import ObjState
|
| 31 |
+
from diffusion_policy.env.block_pushing.utils.utils_pybullet import XarmState
|
| 32 |
+
import numpy as np
|
| 33 |
+
from scipy.spatial import transform
|
| 34 |
+
import pybullet
|
| 35 |
+
import pybullet_utils.bullet_client as bullet_client
|
| 36 |
+
|
| 37 |
+
import matplotlib.pyplot as plt
|
| 38 |
+
|
| 39 |
+
BLOCK_URDF_PATH = "third_party/py/envs/assets/block.urdf"
|
| 40 |
+
PLANE_URDF_PATH = "third_party/bullet/examples/pybullet/gym/pybullet_data/" "plane.urdf"
|
| 41 |
+
WORKSPACE_URDF_PATH = "third_party/py/envs/assets/workspace.urdf"
|
| 42 |
+
ZONE_URDF_PATH = "third_party/py/envs/assets/zone.urdf"
|
| 43 |
+
INSERT_URDF_PATH = "third_party/py/envs/assets/insert.urdf"
|
| 44 |
+
|
| 45 |
+
EFFECTOR_HEIGHT = 0.06
|
| 46 |
+
EFFECTOR_DOWN_ROTATION = transform.Rotation.from_rotvec([0, math.pi, 0])
|
| 47 |
+
|
| 48 |
+
WORKSPACE_BOUNDS = np.array(((0.15, -0.5), (0.7, 0.5)))
|
| 49 |
+
|
| 50 |
+
# Min/max bounds calculated from oracle data using:
|
| 51 |
+
# ibc/environments/board2d_dataset_statistics.ipynb
|
| 52 |
+
# to calculate [mean - 3 * std, mean + 3 * std] using the oracle data.
|
| 53 |
+
# pylint: disable=line-too-long
|
| 54 |
+
ACTION_MIN = np.array([-0.02547718, -0.02090043], np.float32)
|
| 55 |
+
ACTION_MAX = np.array([0.02869084, 0.04272365], np.float32)
|
| 56 |
+
EFFECTOR_TARGET_TRANSLATION_MIN = np.array(
|
| 57 |
+
[0.1774151772260666, -0.6287994794547558], np.float32
|
| 58 |
+
)
|
| 59 |
+
EFFECTOR_TARGET_TRANSLATION_MAX = np.array(
|
| 60 |
+
[0.5654461532831192, 0.5441607423126698], np.float32
|
| 61 |
+
)
|
| 62 |
+
EFFECTOR_TARGET_TO_BLOCK_TRANSLATION_MIN = np.array(
|
| 63 |
+
[-0.07369826920330524, -0.11395704373717308], np.float32
|
| 64 |
+
)
|
| 65 |
+
EFFECTOR_TARGET_TO_BLOCK_TRANSLATION_MAX = np.array(
|
| 66 |
+
[0.10131562314927578, 0.19391131028532982], np.float32
|
| 67 |
+
)
|
| 68 |
+
EFFECTOR_TARGET_TO_TARGET_TRANSLATION_MIN = np.array(
|
| 69 |
+
[-0.17813862301409245, -0.3309651017189026], np.float32
|
| 70 |
+
)
|
| 71 |
+
EFFECTOR_TARGET_TO_TARGET_TRANSLATION_MAX = np.array(
|
| 72 |
+
[0.23726161383092403, 0.8404090404510498], np.float32
|
| 73 |
+
)
|
| 74 |
+
BLOCK_ORIENTATION_COS_SIN_MIN = np.array(
|
| 75 |
+
[-2.0649861991405487, -0.6154364347457886], np.float32
|
| 76 |
+
)
|
| 77 |
+
BLOCK_ORIENTATION_COS_SIN_MAX = np.array(
|
| 78 |
+
[1.6590178310871124, 1.8811014890670776], np.float32
|
| 79 |
+
)
|
| 80 |
+
TARGET_ORIENTATION_COS_SIN_MIN = np.array(
|
| 81 |
+
[-1.0761439241468906, -0.8846937336493284], np.float32
|
| 82 |
+
)
|
| 83 |
+
TARGET_ORIENTATION_COS_SIN_MAX = np.array(
|
| 84 |
+
[-0.8344330154359341, 0.8786859593819827], np.float32
|
| 85 |
+
)
|
| 86 |
+
|
| 87 |
+
# Hardcoded Pose joints to make sure we don't have surprises from using the
|
| 88 |
+
# IK solver on reset. The joint poses correspond to the Pose with:
|
| 89 |
+
# rotation = rotation3.Rotation3.from_axis_angle([0, 1, 0], math.pi)
|
| 90 |
+
# translation = np.array([0.3, -0.4, 0.07])
|
| 91 |
+
INITIAL_JOINT_POSITIONS = np.array(
|
| 92 |
+
[
|
| 93 |
+
-0.9254632489674508,
|
| 94 |
+
0.6990770671568564,
|
| 95 |
+
-1.106629064060494,
|
| 96 |
+
0.0006653351931553931,
|
| 97 |
+
0.3987969742311386,
|
| 98 |
+
-4.063402065624296,
|
| 99 |
+
]
|
| 100 |
+
)
|
| 101 |
+
|
| 102 |
+
DEFAULT_CAMERA_POSE = (1.0, 0, 0.75)
|
| 103 |
+
DEFAULT_CAMERA_ORIENTATION = (np.pi / 4, np.pi, -np.pi / 2)
|
| 104 |
+
IMAGE_WIDTH = 320
|
| 105 |
+
IMAGE_HEIGHT = 240
|
| 106 |
+
CAMERA_INTRINSICS = (
|
| 107 |
+
0.803 * IMAGE_WIDTH, # fx
|
| 108 |
+
0,
|
| 109 |
+
IMAGE_WIDTH / 2.0, # cx
|
| 110 |
+
0,
|
| 111 |
+
0.803 * IMAGE_WIDTH, # fy
|
| 112 |
+
IMAGE_HEIGHT / 2.0, # cy
|
| 113 |
+
0,
|
| 114 |
+
0,
|
| 115 |
+
1,
|
| 116 |
+
)
|
| 117 |
+
|
| 118 |
+
# "Realistic" visuals.
|
| 119 |
+
X_MIN_REAL = 0.15
|
| 120 |
+
X_MAX_REAL = 0.6
|
| 121 |
+
Y_MIN_REAL = -0.3048
|
| 122 |
+
Y_MAX_REAL = 0.3048
|
| 123 |
+
WORKSPACE_BOUNDS_REAL = np.array(((X_MIN_REAL, Y_MIN_REAL), (X_MAX_REAL, Y_MAX_REAL)))
|
| 124 |
+
WORKSPACE_URDF_PATH_REAL = "third_party/py/ibc/environments/assets/workspace_real.urdf"
|
| 125 |
+
CAMERA_POSE_REAL = (0.75, 0, 0.5)
|
| 126 |
+
CAMERA_ORIENTATION_REAL = (np.pi / 5, np.pi, -np.pi / 2)
|
| 127 |
+
|
| 128 |
+
IMAGE_WIDTH_REAL = 320
|
| 129 |
+
IMAGE_HEIGHT_REAL = 180
|
| 130 |
+
CAMERA_INTRINSICS_REAL = (
|
| 131 |
+
0.803 * IMAGE_WIDTH_REAL, # fx
|
| 132 |
+
0,
|
| 133 |
+
IMAGE_WIDTH_REAL / 2.0, # cx
|
| 134 |
+
0,
|
| 135 |
+
0.803 * IMAGE_WIDTH_REAL, # fy
|
| 136 |
+
IMAGE_HEIGHT_REAL / 2.0, # cy
|
| 137 |
+
0,
|
| 138 |
+
0,
|
| 139 |
+
1,
|
| 140 |
+
)
|
| 141 |
+
# pylint: enable=line-too-long
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
def build_env_name(task, shared_memory, use_image_obs, use_normalized_env=False):
|
| 145 |
+
"""Construct the env name from parameters."""
|
| 146 |
+
if isinstance(task, str):
|
| 147 |
+
task = BlockTaskVariant[task]
|
| 148 |
+
env_name = "Block" + task.value
|
| 149 |
+
|
| 150 |
+
if use_image_obs:
|
| 151 |
+
env_name = env_name + "Rgb"
|
| 152 |
+
if use_normalized_env:
|
| 153 |
+
env_name = env_name + "Normalized"
|
| 154 |
+
if shared_memory:
|
| 155 |
+
env_name = "Shared" + env_name
|
| 156 |
+
|
| 157 |
+
env_name = env_name + "-v0"
|
| 158 |
+
|
| 159 |
+
return env_name
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
class BlockTaskVariant(enum.Enum):
|
| 163 |
+
REACH = "Reach"
|
| 164 |
+
REACH_NORMALIZED = "ReachNormalized"
|
| 165 |
+
PUSH = "Push"
|
| 166 |
+
PUSH_NORMALIZED = "PushNormalized"
|
| 167 |
+
INSERT = "Insert"
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
def sleep_spin(sleep_time_sec):
|
| 171 |
+
"""Spin wait sleep. Avoids time.sleep accuracy issues on Windows."""
|
| 172 |
+
if sleep_time_sec <= 0:
|
| 173 |
+
return
|
| 174 |
+
t0 = time.perf_counter()
|
| 175 |
+
while time.perf_counter() - t0 < sleep_time_sec:
|
| 176 |
+
pass
|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
class BlockPush(gym.Env):
|
| 180 |
+
"""Simple XArm environment for block pushing."""
|
| 181 |
+
|
| 182 |
+
def __init__(
|
| 183 |
+
self,
|
| 184 |
+
control_frequency=10.0,
|
| 185 |
+
task=BlockTaskVariant.PUSH,
|
| 186 |
+
image_size=None,
|
| 187 |
+
shared_memory=False,
|
| 188 |
+
seed=None,
|
| 189 |
+
goal_dist_tolerance=0.01,
|
| 190 |
+
effector_height=None,
|
| 191 |
+
visuals_mode="default",
|
| 192 |
+
abs_action=False
|
| 193 |
+
):
|
| 194 |
+
"""Creates an env instance.
|
| 195 |
+
|
| 196 |
+
Args:
|
| 197 |
+
control_frequency: Control frequency for the arm. Each env step will
|
| 198 |
+
advance the simulation by 1/control_frequency seconds.
|
| 199 |
+
task: enum for which task, see BlockTaskVariant enum.
|
| 200 |
+
image_size: Optional image size (height, width). If None, no image
|
| 201 |
+
observations will be used.
|
| 202 |
+
shared_memory: If True `pybullet.SHARED_MEMORY` is used to connect to
|
| 203 |
+
pybullet. Useful to debug.
|
| 204 |
+
seed: Optional seed for the environment.
|
| 205 |
+
goal_dist_tolerance: float, how far away from the goal to terminate.
|
| 206 |
+
effector_height: float, custom height for end effector.
|
| 207 |
+
visuals_mode: 'default' or 'real'.
|
| 208 |
+
"""
|
| 209 |
+
# pybullet.connect(pybullet.GUI)
|
| 210 |
+
# pybullet.resetDebugVisualizerCamera(
|
| 211 |
+
# cameraDistance=1.5,
|
| 212 |
+
# cameraYaw=0,
|
| 213 |
+
# cameraPitch=-40,
|
| 214 |
+
# cameraTargetPosition=[0.55, -0.35, 0.2],
|
| 215 |
+
# )
|
| 216 |
+
if visuals_mode != "default" and visuals_mode != "real":
|
| 217 |
+
raise ValueError("visuals_mode must be `real` or `default`.")
|
| 218 |
+
self._task = task
|
| 219 |
+
self._connection_mode = pybullet.DIRECT
|
| 220 |
+
if shared_memory:
|
| 221 |
+
self._connection_mode = pybullet.SHARED_MEMORY
|
| 222 |
+
|
| 223 |
+
self.goal_dist_tolerance = goal_dist_tolerance
|
| 224 |
+
|
| 225 |
+
self.effector_height = effector_height or EFFECTOR_HEIGHT
|
| 226 |
+
|
| 227 |
+
self._visuals_mode = visuals_mode
|
| 228 |
+
if visuals_mode == "default":
|
| 229 |
+
self._camera_pose = DEFAULT_CAMERA_POSE
|
| 230 |
+
self._camera_orientation = DEFAULT_CAMERA_ORIENTATION
|
| 231 |
+
self.workspace_bounds = WORKSPACE_BOUNDS
|
| 232 |
+
self._image_size = image_size
|
| 233 |
+
self._camera_instrinsics = CAMERA_INTRINSICS
|
| 234 |
+
self._workspace_urdf_path = WORKSPACE_URDF_PATH
|
| 235 |
+
else:
|
| 236 |
+
self._camera_pose = CAMERA_POSE_REAL
|
| 237 |
+
self._camera_orientation = CAMERA_ORIENTATION_REAL
|
| 238 |
+
self.workspace_bounds = WORKSPACE_BOUNDS_REAL
|
| 239 |
+
self._image_size = image_size
|
| 240 |
+
self._camera_instrinsics = CAMERA_INTRINSICS_REAL
|
| 241 |
+
self._workspace_urdf_path = WORKSPACE_URDF_PATH_REAL
|
| 242 |
+
|
| 243 |
+
self.action_space = spaces.Box(low=-0.1, high=0.1, shape=(2,)) # x, y
|
| 244 |
+
self.observation_space = self._create_observation_space(image_size)
|
| 245 |
+
|
| 246 |
+
self._rng = np.random.RandomState(seed=seed)
|
| 247 |
+
self._block_ids = None
|
| 248 |
+
self._previous_state = None
|
| 249 |
+
self._robot = None
|
| 250 |
+
self._workspace_uid = None
|
| 251 |
+
self._target_id = None
|
| 252 |
+
self._target_pose = None
|
| 253 |
+
self._target_effector_pose = None
|
| 254 |
+
self._pybullet_client = None
|
| 255 |
+
self.reach_target_translation = None
|
| 256 |
+
self._setup_pybullet_scene()
|
| 257 |
+
self._saved_state = None
|
| 258 |
+
|
| 259 |
+
assert isinstance(self._pybullet_client, bullet_client.BulletClient)
|
| 260 |
+
self._control_frequency = control_frequency
|
| 261 |
+
self._step_frequency = (
|
| 262 |
+
1 / self._pybullet_client.getPhysicsEngineParameters()["fixedTimeStep"]
|
| 263 |
+
)
|
| 264 |
+
|
| 265 |
+
self._last_loop_time = None
|
| 266 |
+
self._last_loop_frame_sleep_time = None
|
| 267 |
+
if self._step_frequency % self._control_frequency != 0:
|
| 268 |
+
raise ValueError(
|
| 269 |
+
"Control frequency should be a multiple of the "
|
| 270 |
+
"configured Bullet TimeStep."
|
| 271 |
+
)
|
| 272 |
+
self._sim_steps_per_step = int(self._step_frequency / self._control_frequency)
|
| 273 |
+
|
| 274 |
+
self.rendered_img = None
|
| 275 |
+
self._abs_action = abs_action
|
| 276 |
+
|
| 277 |
+
# Use saved_state and restore to make reset safe as no simulation state has
|
| 278 |
+
# been updated at this state, but the assets are now loaded.
|
| 279 |
+
self.save_state()
|
| 280 |
+
self.reset()
|
| 281 |
+
|
| 282 |
+
@property
|
| 283 |
+
def pybullet_client(self):
|
| 284 |
+
return self._pybullet_client
|
| 285 |
+
|
| 286 |
+
@property
|
| 287 |
+
def robot(self):
|
| 288 |
+
return self._robot
|
| 289 |
+
|
| 290 |
+
@property
|
| 291 |
+
def workspace_uid(self):
|
| 292 |
+
return self._workspace_uid
|
| 293 |
+
|
| 294 |
+
@property
|
| 295 |
+
def target_effector_pose(self):
|
| 296 |
+
return self._target_effector_pose
|
| 297 |
+
|
| 298 |
+
@property
|
| 299 |
+
def target_pose(self):
|
| 300 |
+
return self._target_pose
|
| 301 |
+
|
| 302 |
+
@property
|
| 303 |
+
def control_frequency(self):
|
| 304 |
+
return self._control_frequency
|
| 305 |
+
|
| 306 |
+
@property
|
| 307 |
+
def connection_mode(self):
|
| 308 |
+
return self._connection_mode
|
| 309 |
+
|
| 310 |
+
def save_state(self):
|
| 311 |
+
self._saved_state = self._pybullet_client.saveState()
|
| 312 |
+
|
| 313 |
+
def set_goal_dist_tolerance(self, val):
|
| 314 |
+
self.goal_dist_tolerance = val
|
| 315 |
+
|
| 316 |
+
def get_control_frequency(self):
|
| 317 |
+
return self._control_frequency
|
| 318 |
+
|
| 319 |
+
def compute_state(self):
|
| 320 |
+
return self._compute_state()
|
| 321 |
+
|
| 322 |
+
def get_goal_translation(self):
|
| 323 |
+
"""Return the translation component of the goal (2D)."""
|
| 324 |
+
if self._task == BlockTaskVariant.REACH:
|
| 325 |
+
return np.concatenate([self.reach_target_translation, [0]])
|
| 326 |
+
else:
|
| 327 |
+
return self._target_pose.translation if self._target_pose else None
|
| 328 |
+
|
| 329 |
+
def get_obj_ids(self):
|
| 330 |
+
return self._block_ids
|
| 331 |
+
|
| 332 |
+
def _setup_workspace_and_robot(self, end_effector="suction"):
|
| 333 |
+
self._pybullet_client.resetSimulation()
|
| 334 |
+
self._pybullet_client.configureDebugVisualizer(pybullet.COV_ENABLE_GUI, 0)
|
| 335 |
+
self._pybullet_client.setPhysicsEngineParameter(enableFileCaching=0)
|
| 336 |
+
self._pybullet_client.setGravity(0, 0, -9.8)
|
| 337 |
+
|
| 338 |
+
utils_pybullet.load_urdf(
|
| 339 |
+
self._pybullet_client, PLANE_URDF_PATH, basePosition=[0, 0, -0.001]
|
| 340 |
+
)
|
| 341 |
+
self._workspace_uid = utils_pybullet.load_urdf(
|
| 342 |
+
self._pybullet_client,
|
| 343 |
+
self._workspace_urdf_path,
|
| 344 |
+
basePosition=[0.35, 0, 0.0],
|
| 345 |
+
)
|
| 346 |
+
|
| 347 |
+
self._robot = xarm_sim_robot.XArmSimRobot(
|
| 348 |
+
self._pybullet_client,
|
| 349 |
+
initial_joint_positions=INITIAL_JOINT_POSITIONS,
|
| 350 |
+
end_effector=end_effector,
|
| 351 |
+
color="white" if self._visuals_mode == "real" else "default",
|
| 352 |
+
)
|
| 353 |
+
|
| 354 |
+
def _setup_pybullet_scene(self):
|
| 355 |
+
self._pybullet_client = bullet_client.BulletClient(self._connection_mode)
|
| 356 |
+
|
| 357 |
+
# Temporarily disable rendering to speed up loading URDFs.
|
| 358 |
+
pybullet.configureDebugVisualizer(pybullet.COV_ENABLE_RENDERING, 0)
|
| 359 |
+
|
| 360 |
+
self._setup_workspace_and_robot()
|
| 361 |
+
|
| 362 |
+
if self._task == BlockTaskVariant.INSERT:
|
| 363 |
+
target_urdf_path = INSERT_URDF_PATH
|
| 364 |
+
else:
|
| 365 |
+
target_urdf_path = ZONE_URDF_PATH
|
| 366 |
+
|
| 367 |
+
self._target_id = utils_pybullet.load_urdf(
|
| 368 |
+
self._pybullet_client, target_urdf_path, useFixedBase=True
|
| 369 |
+
)
|
| 370 |
+
self._block_ids = [
|
| 371 |
+
utils_pybullet.load_urdf(
|
| 372 |
+
self._pybullet_client, BLOCK_URDF_PATH, useFixedBase=False
|
| 373 |
+
)
|
| 374 |
+
]
|
| 375 |
+
|
| 376 |
+
# Re-enable rendering.
|
| 377 |
+
pybullet.configureDebugVisualizer(pybullet.COV_ENABLE_RENDERING, 1)
|
| 378 |
+
|
| 379 |
+
self.step_simulation_to_stabilize()
|
| 380 |
+
|
| 381 |
+
def step_simulation_to_stabilize(self, nsteps=100):
|
| 382 |
+
for _ in range(nsteps):
|
| 383 |
+
self._pybullet_client.stepSimulation()
|
| 384 |
+
|
| 385 |
+
def seed(self, seed=None):
|
| 386 |
+
self._rng = np.random.RandomState(seed=seed)
|
| 387 |
+
|
| 388 |
+
def _set_robot_target_effector_pose(self, pose):
|
| 389 |
+
self._target_effector_pose = pose
|
| 390 |
+
self._robot.set_target_effector_pose(pose)
|
| 391 |
+
|
| 392 |
+
def reset(self, reset_poses=True):
|
| 393 |
+
workspace_center_x = 0.4
|
| 394 |
+
|
| 395 |
+
if reset_poses:
|
| 396 |
+
self._pybullet_client.restoreState(self._saved_state)
|
| 397 |
+
|
| 398 |
+
rotation = transform.Rotation.from_rotvec([0, math.pi, 0])
|
| 399 |
+
translation = np.array([0.3, -0.4, self.effector_height])
|
| 400 |
+
starting_pose = Pose3d(rotation=rotation, translation=translation)
|
| 401 |
+
self._set_robot_target_effector_pose(starting_pose)
|
| 402 |
+
|
| 403 |
+
# Reset block pose.
|
| 404 |
+
block_x = workspace_center_x + self._rng.uniform(low=-0.1, high=0.1)
|
| 405 |
+
block_y = -0.2 + self._rng.uniform(low=-0.15, high=0.15)
|
| 406 |
+
block_translation = np.array([block_x, block_y, 0])
|
| 407 |
+
block_sampled_angle = self._rng.uniform(math.pi)
|
| 408 |
+
block_rotation = transform.Rotation.from_rotvec([0, 0, block_sampled_angle])
|
| 409 |
+
|
| 410 |
+
self._pybullet_client.resetBasePositionAndOrientation(
|
| 411 |
+
self._block_ids[0],
|
| 412 |
+
block_translation.tolist(),
|
| 413 |
+
block_rotation.as_quat().tolist(),
|
| 414 |
+
)
|
| 415 |
+
|
| 416 |
+
# Reset target pose.
|
| 417 |
+
target_x = workspace_center_x + self._rng.uniform(low=-0.10, high=0.10)
|
| 418 |
+
target_y = 0.2 + self._rng.uniform(low=-0.15, high=0.15)
|
| 419 |
+
target_translation = np.array([target_x, target_y, 0.020])
|
| 420 |
+
|
| 421 |
+
target_sampled_angle = math.pi + self._rng.uniform(
|
| 422 |
+
low=-math.pi / 6, high=math.pi / 6
|
| 423 |
+
)
|
| 424 |
+
target_rotation = transform.Rotation.from_rotvec(
|
| 425 |
+
[0, 0, target_sampled_angle]
|
| 426 |
+
)
|
| 427 |
+
|
| 428 |
+
self._pybullet_client.resetBasePositionAndOrientation(
|
| 429 |
+
self._target_id,
|
| 430 |
+
target_translation.tolist(),
|
| 431 |
+
target_rotation.as_quat().tolist(),
|
| 432 |
+
)
|
| 433 |
+
else:
|
| 434 |
+
(
|
| 435 |
+
target_translation,
|
| 436 |
+
target_orientation_quat,
|
| 437 |
+
) = self._pybullet_client.getBasePositionAndOrientation(self._target_id)
|
| 438 |
+
target_rotation = transform.Rotation.from_quat(target_orientation_quat)
|
| 439 |
+
target_translation = np.array(target_translation)
|
| 440 |
+
|
| 441 |
+
self._target_pose = Pose3d(
|
| 442 |
+
rotation=target_rotation, translation=target_translation
|
| 443 |
+
)
|
| 444 |
+
|
| 445 |
+
if reset_poses:
|
| 446 |
+
self.step_simulation_to_stabilize()
|
| 447 |
+
|
| 448 |
+
state = self._compute_state()
|
| 449 |
+
self._previous_state = state
|
| 450 |
+
|
| 451 |
+
if self._task == BlockTaskVariant.REACH:
|
| 452 |
+
self._compute_reach_target(state)
|
| 453 |
+
|
| 454 |
+
self._init_goal_distance = self._compute_goal_distance(state)
|
| 455 |
+
init_goal_eps = 1e-7
|
| 456 |
+
assert self._init_goal_distance > init_goal_eps
|
| 457 |
+
self.best_fraction_reduced_goal_dist = 0.0
|
| 458 |
+
|
| 459 |
+
return state
|
| 460 |
+
|
| 461 |
+
def _compute_goal_distance(self, state):
|
| 462 |
+
goal_translation = self.get_goal_translation()
|
| 463 |
+
if self._task != BlockTaskVariant.REACH:
|
| 464 |
+
goal_distance = np.linalg.norm(
|
| 465 |
+
state["block_translation"] - goal_translation[0:2]
|
| 466 |
+
)
|
| 467 |
+
else:
|
| 468 |
+
goal_distance = np.linalg.norm(
|
| 469 |
+
state["effector_translation"] - goal_translation[0:2]
|
| 470 |
+
)
|
| 471 |
+
return goal_distance
|
| 472 |
+
|
| 473 |
+
def _compute_reach_target(self, state):
|
| 474 |
+
xy_block = state["block_translation"]
|
| 475 |
+
xy_target = state["target_translation"]
|
| 476 |
+
|
| 477 |
+
xy_block_to_target = xy_target - xy_block
|
| 478 |
+
xy_dir_block_to_target = (xy_block_to_target) / np.linalg.norm(
|
| 479 |
+
xy_block_to_target
|
| 480 |
+
)
|
| 481 |
+
self.reach_target_translation = xy_block + -1 * xy_dir_block_to_target * 0.05
|
| 482 |
+
|
| 483 |
+
def _compute_state(self):
|
| 484 |
+
effector_pose = self._robot.forward_kinematics()
|
| 485 |
+
block_position_and_orientation = (
|
| 486 |
+
self._pybullet_client.getBasePositionAndOrientation(self._block_ids[0])
|
| 487 |
+
)
|
| 488 |
+
block_pose = Pose3d(
|
| 489 |
+
rotation=transform.Rotation.from_quat(block_position_and_orientation[1]),
|
| 490 |
+
translation=block_position_and_orientation[0],
|
| 491 |
+
)
|
| 492 |
+
|
| 493 |
+
def _yaw_from_pose(pose):
|
| 494 |
+
return np.array([pose.rotation.as_euler("xyz", degrees=False)[-1]])
|
| 495 |
+
|
| 496 |
+
obs = collections.OrderedDict(
|
| 497 |
+
block_translation=block_pose.translation[0:2],
|
| 498 |
+
block_orientation=_yaw_from_pose(block_pose),
|
| 499 |
+
effector_translation=effector_pose.translation[0:2],
|
| 500 |
+
effector_target_translation=self._target_effector_pose.translation[0:2],
|
| 501 |
+
target_translation=self._target_pose.translation[0:2],
|
| 502 |
+
target_orientation=_yaw_from_pose(self._target_pose),
|
| 503 |
+
)
|
| 504 |
+
if self._image_size is not None:
|
| 505 |
+
obs["rgb"] = self._render_camera(self._image_size)
|
| 506 |
+
return obs
|
| 507 |
+
|
| 508 |
+
def _step_robot_and_sim(self, action):
|
| 509 |
+
"""Steps the robot and pybullet sim."""
|
| 510 |
+
# Compute target_effector_pose by shifting the effector's pose by the
|
| 511 |
+
# action.
|
| 512 |
+
if self._abs_action:
|
| 513 |
+
target_effector_translation = np.array([action[0], action[1], 0])
|
| 514 |
+
else:
|
| 515 |
+
target_effector_translation = np.array(
|
| 516 |
+
self._target_effector_pose.translation
|
| 517 |
+
) + np.array([action[0], action[1], 0])
|
| 518 |
+
|
| 519 |
+
target_effector_translation[0:2] = np.clip(
|
| 520 |
+
target_effector_translation[0:2],
|
| 521 |
+
self.workspace_bounds[0],
|
| 522 |
+
self.workspace_bounds[1],
|
| 523 |
+
)
|
| 524 |
+
target_effector_translation[-1] = self.effector_height
|
| 525 |
+
target_effector_pose = Pose3d(
|
| 526 |
+
rotation=EFFECTOR_DOWN_ROTATION, translation=target_effector_translation
|
| 527 |
+
)
|
| 528 |
+
|
| 529 |
+
self._set_robot_target_effector_pose(target_effector_pose)
|
| 530 |
+
|
| 531 |
+
# Update sleep time dynamically to stay near real-time.
|
| 532 |
+
frame_sleep_time = 0
|
| 533 |
+
if self._connection_mode == pybullet.SHARED_MEMORY:
|
| 534 |
+
cur_time = time.time()
|
| 535 |
+
if self._last_loop_time is not None:
|
| 536 |
+
# Calculate the total, non-sleeping time from the previous frame, this
|
| 537 |
+
# includes the actual step as well as any compute that happens in the
|
| 538 |
+
# caller thread (model inference, etc).
|
| 539 |
+
compute_time = (
|
| 540 |
+
cur_time
|
| 541 |
+
- self._last_loop_time
|
| 542 |
+
- self._last_loop_frame_sleep_time * self._sim_steps_per_step
|
| 543 |
+
)
|
| 544 |
+
# Use this to calculate the current frame's total sleep time to ensure
|
| 545 |
+
# that env.step runs at policy rate. This is an estimate since the
|
| 546 |
+
# previous frame's compute time may not match the current frame.
|
| 547 |
+
total_sleep_time = max((1 / self._control_frequency) - compute_time, 0)
|
| 548 |
+
# Now spread this out over the inner sim steps. This doesn't change
|
| 549 |
+
# control in any way, but makes the animation appear smooth.
|
| 550 |
+
frame_sleep_time = total_sleep_time / self._sim_steps_per_step
|
| 551 |
+
else:
|
| 552 |
+
# No estimate of the previous frame's compute, assume it is zero.
|
| 553 |
+
frame_sleep_time = 1 / self._step_frequency
|
| 554 |
+
|
| 555 |
+
# Cache end of this loop time, to compute sleep time on next iteration.
|
| 556 |
+
self._last_loop_time = cur_time
|
| 557 |
+
self._last_loop_frame_sleep_time = frame_sleep_time
|
| 558 |
+
|
| 559 |
+
for _ in range(self._sim_steps_per_step):
|
| 560 |
+
if self._connection_mode == pybullet.SHARED_MEMORY:
|
| 561 |
+
sleep_spin(frame_sleep_time)
|
| 562 |
+
self._pybullet_client.stepSimulation()
|
| 563 |
+
|
| 564 |
+
def step(self, action):
|
| 565 |
+
self._step_robot_and_sim(action)
|
| 566 |
+
|
| 567 |
+
state = self._compute_state()
|
| 568 |
+
|
| 569 |
+
goal_distance = self._compute_goal_distance(state)
|
| 570 |
+
fraction_reduced_goal_distance = 1.0 - (
|
| 571 |
+
goal_distance / self._init_goal_distance
|
| 572 |
+
)
|
| 573 |
+
if fraction_reduced_goal_distance > self.best_fraction_reduced_goal_dist:
|
| 574 |
+
self.best_fraction_reduced_goal_dist = fraction_reduced_goal_distance
|
| 575 |
+
|
| 576 |
+
done = False
|
| 577 |
+
reward = self.best_fraction_reduced_goal_dist
|
| 578 |
+
|
| 579 |
+
# Terminate the episode if the block is close enough to the target.
|
| 580 |
+
if goal_distance < self.goal_dist_tolerance:
|
| 581 |
+
reward = 1.0
|
| 582 |
+
done = True
|
| 583 |
+
|
| 584 |
+
return state, reward, done, {}
|
| 585 |
+
|
| 586 |
+
@property
|
| 587 |
+
def succeeded(self):
|
| 588 |
+
state = self._compute_state()
|
| 589 |
+
goal_distance = self._compute_goal_distance(state)
|
| 590 |
+
if goal_distance < self.goal_dist_tolerance:
|
| 591 |
+
return True
|
| 592 |
+
return False
|
| 593 |
+
|
| 594 |
+
@property
|
| 595 |
+
def goal_distance(self):
|
| 596 |
+
state = self._compute_state()
|
| 597 |
+
return self._compute_goal_distance(state)
|
| 598 |
+
|
| 599 |
+
def render(self, mode="rgb_array"):
|
| 600 |
+
if self._image_size is not None:
|
| 601 |
+
image_size = self._image_size
|
| 602 |
+
else:
|
| 603 |
+
# This allows rendering even for state-only obs,
|
| 604 |
+
# for visualization.
|
| 605 |
+
image_size = (IMAGE_HEIGHT, IMAGE_WIDTH)
|
| 606 |
+
|
| 607 |
+
data = self._render_camera(image_size=(image_size[0], image_size[1]))
|
| 608 |
+
if mode == "human":
|
| 609 |
+
if self.rendered_img is None:
|
| 610 |
+
self.rendered_img = plt.imshow(
|
| 611 |
+
np.zeros((image_size[0], image_size[1], 4))
|
| 612 |
+
)
|
| 613 |
+
else:
|
| 614 |
+
self.rendered_img.set_data(data)
|
| 615 |
+
plt.draw()
|
| 616 |
+
plt.pause(0.00001)
|
| 617 |
+
return data
|
| 618 |
+
|
| 619 |
+
def close(self):
|
| 620 |
+
self._pybullet_client.disconnect()
|
| 621 |
+
|
| 622 |
+
def calc_camera_params(self, image_size):
|
| 623 |
+
# Mimic RealSense D415 camera parameters.
|
| 624 |
+
intrinsics = self._camera_instrinsics
|
| 625 |
+
|
| 626 |
+
# Set default camera poses.
|
| 627 |
+
front_position = self._camera_pose
|
| 628 |
+
front_rotation = self._camera_orientation
|
| 629 |
+
front_rotation = self._pybullet_client.getQuaternionFromEuler(front_rotation)
|
| 630 |
+
# Default camera configs.
|
| 631 |
+
zrange = (0.01, 10.0)
|
| 632 |
+
|
| 633 |
+
# OpenGL camera settings.
|
| 634 |
+
lookdir = np.float32([0, 0, 1]).reshape(3, 1)
|
| 635 |
+
updir = np.float32([0, -1, 0]).reshape(3, 1)
|
| 636 |
+
rotation = self._pybullet_client.getMatrixFromQuaternion(front_rotation)
|
| 637 |
+
rotm = np.float32(rotation).reshape(3, 3)
|
| 638 |
+
lookdir = (rotm @ lookdir).reshape(-1)
|
| 639 |
+
updir = (rotm @ updir).reshape(-1)
|
| 640 |
+
lookat = front_position + lookdir
|
| 641 |
+
focal_len = intrinsics[0]
|
| 642 |
+
znear, zfar = zrange
|
| 643 |
+
viewm = self._pybullet_client.computeViewMatrix(front_position, lookat, updir)
|
| 644 |
+
fovh = (image_size[0] / 2) / focal_len
|
| 645 |
+
fovh = 180 * np.arctan(fovh) * 2 / np.pi
|
| 646 |
+
|
| 647 |
+
# Notes: 1) FOV is vertical FOV 2) aspect must be float
|
| 648 |
+
aspect_ratio = image_size[1] / image_size[0]
|
| 649 |
+
projm = self._pybullet_client.computeProjectionMatrixFOV(
|
| 650 |
+
fovh, aspect_ratio, znear, zfar
|
| 651 |
+
)
|
| 652 |
+
|
| 653 |
+
return viewm, projm, front_position, lookat, updir
|
| 654 |
+
|
| 655 |
+
def _render_camera(self, image_size):
|
| 656 |
+
"""Render RGB image with RealSense configuration."""
|
| 657 |
+
viewm, projm, _, _, _ = self.calc_camera_params(image_size)
|
| 658 |
+
|
| 659 |
+
# Render with OpenGL camera settings.
|
| 660 |
+
_, _, color, _, _ = self._pybullet_client.getCameraImage(
|
| 661 |
+
width=image_size[1],
|
| 662 |
+
height=image_size[0],
|
| 663 |
+
viewMatrix=viewm,
|
| 664 |
+
projectionMatrix=projm,
|
| 665 |
+
flags=pybullet.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX,
|
| 666 |
+
renderer=pybullet.ER_BULLET_HARDWARE_OPENGL,
|
| 667 |
+
)
|
| 668 |
+
|
| 669 |
+
# Get color image.
|
| 670 |
+
color_image_size = (image_size[0], image_size[1], 4)
|
| 671 |
+
color = np.array(color, dtype=np.uint8).reshape(color_image_size)
|
| 672 |
+
color = color[:, :, :3] # remove alpha channel
|
| 673 |
+
|
| 674 |
+
return color.astype(np.uint8)
|
| 675 |
+
|
| 676 |
+
def _create_observation_space(self, image_size):
|
| 677 |
+
pi2 = math.pi * 2
|
| 678 |
+
|
| 679 |
+
obs_dict = collections.OrderedDict(
|
| 680 |
+
block_translation=spaces.Box(low=-5, high=5, shape=(2,)), # x,y
|
| 681 |
+
block_orientation=spaces.Box(low=-pi2, high=pi2, shape=(1,)), # phi
|
| 682 |
+
effector_translation=spaces.Box(
|
| 683 |
+
low=self.workspace_bounds[0] - 0.1, # Small buffer for to IK noise.
|
| 684 |
+
high=self.workspace_bounds[1] + 0.1,
|
| 685 |
+
), # x,y
|
| 686 |
+
effector_target_translation=spaces.Box(
|
| 687 |
+
low=self.workspace_bounds[0] - 0.1, # Small buffer for to IK noise.
|
| 688 |
+
high=self.workspace_bounds[1] + 0.1,
|
| 689 |
+
), # x,y
|
| 690 |
+
target_translation=spaces.Box(low=-5, high=5, shape=(2,)), # x,y
|
| 691 |
+
target_orientation=spaces.Box(
|
| 692 |
+
low=-pi2,
|
| 693 |
+
high=pi2,
|
| 694 |
+
shape=(1,),
|
| 695 |
+
), # theta
|
| 696 |
+
)
|
| 697 |
+
if image_size is not None:
|
| 698 |
+
obs_dict["rgb"] = spaces.Box(
|
| 699 |
+
low=0, high=255, shape=(image_size[0], image_size[1], 3), dtype=np.uint8
|
| 700 |
+
)
|
| 701 |
+
return spaces.Dict(obs_dict)
|
| 702 |
+
|
| 703 |
+
def get_pybullet_state(self):
|
| 704 |
+
"""Save pybullet state of the scene.
|
| 705 |
+
|
| 706 |
+
Returns:
|
| 707 |
+
dict containing 'robots', 'robot_end_effectors', 'targets', 'objects',
|
| 708 |
+
each containing a list of ObjState.
|
| 709 |
+
"""
|
| 710 |
+
state: Dict[str, List[ObjState]] = {}
|
| 711 |
+
|
| 712 |
+
state["robots"] = [
|
| 713 |
+
XarmState.get_bullet_state(
|
| 714 |
+
self._pybullet_client,
|
| 715 |
+
self.robot.xarm,
|
| 716 |
+
target_effector_pose=self._target_effector_pose,
|
| 717 |
+
goal_translation=self.get_goal_translation(),
|
| 718 |
+
)
|
| 719 |
+
]
|
| 720 |
+
|
| 721 |
+
state["robot_end_effectors"] = []
|
| 722 |
+
if self.robot.end_effector:
|
| 723 |
+
state["robot_end_effectors"].append(
|
| 724 |
+
ObjState.get_bullet_state(
|
| 725 |
+
self._pybullet_client, self.robot.end_effector
|
| 726 |
+
)
|
| 727 |
+
)
|
| 728 |
+
|
| 729 |
+
state["targets"] = []
|
| 730 |
+
if self._target_id:
|
| 731 |
+
state["targets"].append(
|
| 732 |
+
ObjState.get_bullet_state(self._pybullet_client, self._target_id)
|
| 733 |
+
)
|
| 734 |
+
|
| 735 |
+
state["objects"] = []
|
| 736 |
+
for obj_id in self.get_obj_ids():
|
| 737 |
+
state["objects"].append(
|
| 738 |
+
ObjState.get_bullet_state(self._pybullet_client, obj_id)
|
| 739 |
+
)
|
| 740 |
+
|
| 741 |
+
return state
|
| 742 |
+
|
| 743 |
+
def set_pybullet_state(self, state):
|
| 744 |
+
"""Restore pyullet state.
|
| 745 |
+
|
| 746 |
+
WARNING: py_environment wrapper assumes environments aren't reset in their
|
| 747 |
+
constructor and will often reset the environment unintentionally. It is
|
| 748 |
+
always recommended that you call env.reset on the tfagents wrapper before
|
| 749 |
+
playback (replaying pybullet_state).
|
| 750 |
+
|
| 751 |
+
Args:
|
| 752 |
+
state: dict containing 'robots', 'robot_end_effectors', 'targets',
|
| 753 |
+
'objects', each containing a list of ObjState.
|
| 754 |
+
"""
|
| 755 |
+
|
| 756 |
+
assert isinstance(state["robots"][0], XarmState)
|
| 757 |
+
xarm_state: XarmState = state["robots"][0]
|
| 758 |
+
xarm_state.set_bullet_state(self._pybullet_client, self.robot.xarm)
|
| 759 |
+
self._set_robot_target_effector_pose(xarm_state.target_effector_pose)
|
| 760 |
+
|
| 761 |
+
def _set_state_safe(obj_state, obj_id):
|
| 762 |
+
if obj_state is not None:
|
| 763 |
+
assert obj_id is not None, "Cannot set state for missing object."
|
| 764 |
+
obj_state.set_bullet_state(self._pybullet_client, obj_id)
|
| 765 |
+
else:
|
| 766 |
+
assert obj_id is None, f"No state found for obj_id {obj_id}"
|
| 767 |
+
|
| 768 |
+
robot_end_effectors = state["robot_end_effectors"]
|
| 769 |
+
_set_state_safe(
|
| 770 |
+
None if not robot_end_effectors else robot_end_effectors[0],
|
| 771 |
+
self.robot.end_effector,
|
| 772 |
+
)
|
| 773 |
+
|
| 774 |
+
targets = state["targets"]
|
| 775 |
+
_set_state_safe(None if not targets else targets[0], self._target_id)
|
| 776 |
+
|
| 777 |
+
obj_ids = self.get_obj_ids()
|
| 778 |
+
assert len(state["objects"]) == len(obj_ids), "State length mismatch"
|
| 779 |
+
for obj_state, obj_id in zip(state["objects"], obj_ids):
|
| 780 |
+
_set_state_safe(obj_state, obj_id)
|
| 781 |
+
|
| 782 |
+
self.reset(reset_poses=False)
|
| 783 |
+
|
| 784 |
+
|
| 785 |
+
class BlockPushNormalized(gym.Env):
|
| 786 |
+
"""Simple XArm environment for block pushing, normalized state and actions."""
|
| 787 |
+
|
| 788 |
+
def __init__(
|
| 789 |
+
self,
|
| 790 |
+
control_frequency=10.0,
|
| 791 |
+
task=BlockTaskVariant.PUSH_NORMALIZED,
|
| 792 |
+
image_size=None,
|
| 793 |
+
shared_memory=False,
|
| 794 |
+
seed=None,
|
| 795 |
+
):
|
| 796 |
+
"""Creates an env instance.
|
| 797 |
+
|
| 798 |
+
Args:
|
| 799 |
+
control_frequency: Control frequency for the arm. Each env step will
|
| 800 |
+
advance the simulation by 1/control_frequency seconds.
|
| 801 |
+
task: enum for which task, see BlockTaskVariant enum.
|
| 802 |
+
image_size: Optional image size (height, width). If None, no image
|
| 803 |
+
observations will be used.
|
| 804 |
+
shared_memory: If True `pybullet.SHARED_MEMORY` is used to connect to
|
| 805 |
+
pybullet. Useful to debug.
|
| 806 |
+
seed: Optional seed for the environment.
|
| 807 |
+
"""
|
| 808 |
+
# Map normalized task to unnormalized task.
|
| 809 |
+
if task == BlockTaskVariant.PUSH_NORMALIZED:
|
| 810 |
+
env_task = BlockTaskVariant.PUSH
|
| 811 |
+
elif task == BlockTaskVariant.REACH_NORMALIZED:
|
| 812 |
+
env_task = BlockTaskVariant.REACH
|
| 813 |
+
else:
|
| 814 |
+
raise ValueError("Unsupported task %s" % str(task))
|
| 815 |
+
self._env = BlockPush(
|
| 816 |
+
control_frequency, env_task, image_size, shared_memory, seed
|
| 817 |
+
)
|
| 818 |
+
self.action_space = spaces.Box(low=-1, high=1, shape=(2,))
|
| 819 |
+
self.observation_space = spaces.Dict(
|
| 820 |
+
collections.OrderedDict(
|
| 821 |
+
effector_target_translation=spaces.Box(low=-1, high=1, shape=(2,)),
|
| 822 |
+
effector_target_to_block_translation=spaces.Box(
|
| 823 |
+
low=-1, high=1, shape=(2,)
|
| 824 |
+
),
|
| 825 |
+
block_orientation_cos_sin=spaces.Box(low=-1, high=1, shape=(2,)),
|
| 826 |
+
effector_target_to_target_translation=spaces.Box(
|
| 827 |
+
low=-1, high=1, shape=(2,)
|
| 828 |
+
),
|
| 829 |
+
target_orientation_cos_sin=spaces.Box(low=-1, high=1, shape=(2,)),
|
| 830 |
+
)
|
| 831 |
+
)
|
| 832 |
+
self.reset()
|
| 833 |
+
|
| 834 |
+
def get_control_frequency(self):
|
| 835 |
+
return self._env.get_control_frequency()
|
| 836 |
+
|
| 837 |
+
@property
|
| 838 |
+
def reach_target_translation(self):
|
| 839 |
+
return self._env.reach_target_translation
|
| 840 |
+
|
| 841 |
+
def seed(self, seed=None):
|
| 842 |
+
self._env.seed(seed)
|
| 843 |
+
|
| 844 |
+
def reset(self):
|
| 845 |
+
state = self._env.reset()
|
| 846 |
+
return self.calc_normalized_state(state)
|
| 847 |
+
|
| 848 |
+
def step(self, action):
|
| 849 |
+
# The environment is normalized [mean-3*std, mean+3*std] -> [-1, 1].
|
| 850 |
+
action = np.clip(action, a_min=-1.0, a_max=1.0)
|
| 851 |
+
state, reward, done, info = self._env.step(
|
| 852 |
+
self.calc_unnormalized_action(action)
|
| 853 |
+
)
|
| 854 |
+
state = self.calc_normalized_state(state)
|
| 855 |
+
reward = reward * 100 # Keep returns in [0, 100]
|
| 856 |
+
return state, reward, done, info
|
| 857 |
+
|
| 858 |
+
def render(self, mode="rgb_array"):
|
| 859 |
+
return self._env.render(mode)
|
| 860 |
+
|
| 861 |
+
def close(self):
|
| 862 |
+
self._env.close()
|
| 863 |
+
|
| 864 |
+
@staticmethod
|
| 865 |
+
def _normalize(values, values_min, values_max):
|
| 866 |
+
offset = (values_max + values_min) * 0.5
|
| 867 |
+
scale = (values_max - values_min) * 0.5
|
| 868 |
+
return (values - offset) / scale # [min, max] -> [-1, 1]
|
| 869 |
+
|
| 870 |
+
@staticmethod
|
| 871 |
+
def _unnormalize(values, values_min, values_max):
|
| 872 |
+
offset = (values_max + values_min) * 0.5
|
| 873 |
+
scale = (values_max - values_min) * 0.5
|
| 874 |
+
return values * scale + offset # [-1, 1] -> [min, max]
|
| 875 |
+
|
| 876 |
+
@classmethod
|
| 877 |
+
def calc_normalized_action(cls, action):
|
| 878 |
+
return cls._normalize(action, ACTION_MIN, ACTION_MAX)
|
| 879 |
+
|
| 880 |
+
@classmethod
|
| 881 |
+
def calc_unnormalized_action(cls, norm_action):
|
| 882 |
+
return cls._unnormalize(norm_action, ACTION_MIN, ACTION_MAX)
|
| 883 |
+
|
| 884 |
+
@classmethod
|
| 885 |
+
def calc_normalized_state(cls, state):
|
| 886 |
+
|
| 887 |
+
effector_target_translation = cls._normalize(
|
| 888 |
+
state["effector_target_translation"],
|
| 889 |
+
EFFECTOR_TARGET_TRANSLATION_MIN,
|
| 890 |
+
EFFECTOR_TARGET_TRANSLATION_MAX,
|
| 891 |
+
)
|
| 892 |
+
|
| 893 |
+
effector_target_to_block_translation = cls._normalize(
|
| 894 |
+
state["block_translation"] - state["effector_target_translation"],
|
| 895 |
+
EFFECTOR_TARGET_TO_BLOCK_TRANSLATION_MIN,
|
| 896 |
+
EFFECTOR_TARGET_TO_BLOCK_TRANSLATION_MAX,
|
| 897 |
+
)
|
| 898 |
+
ori = state["block_orientation"][0]
|
| 899 |
+
block_orientation_cos_sin = cls._normalize(
|
| 900 |
+
np.array([math.cos(ori), math.sin(ori)], np.float32),
|
| 901 |
+
BLOCK_ORIENTATION_COS_SIN_MIN,
|
| 902 |
+
BLOCK_ORIENTATION_COS_SIN_MAX,
|
| 903 |
+
)
|
| 904 |
+
|
| 905 |
+
effector_target_to_target_translation = cls._normalize(
|
| 906 |
+
state["target_translation"] - state["effector_target_translation"],
|
| 907 |
+
EFFECTOR_TARGET_TO_TARGET_TRANSLATION_MIN,
|
| 908 |
+
EFFECTOR_TARGET_TO_TARGET_TRANSLATION_MAX,
|
| 909 |
+
)
|
| 910 |
+
ori = state["target_orientation"][0]
|
| 911 |
+
target_orientation_cos_sin = cls._normalize(
|
| 912 |
+
np.array([math.cos(ori), math.sin(ori)], np.float32),
|
| 913 |
+
TARGET_ORIENTATION_COS_SIN_MIN,
|
| 914 |
+
TARGET_ORIENTATION_COS_SIN_MAX,
|
| 915 |
+
)
|
| 916 |
+
|
| 917 |
+
# Note: We do not include effector_translation in the normalized state.
|
| 918 |
+
# This means the unnormalized -> normalized mapping is not invertable.
|
| 919 |
+
return collections.OrderedDict(
|
| 920 |
+
effector_target_translation=effector_target_translation,
|
| 921 |
+
effector_target_to_block_translation=effector_target_to_block_translation,
|
| 922 |
+
block_orientation_cos_sin=block_orientation_cos_sin,
|
| 923 |
+
effector_target_to_target_translation=effector_target_to_target_translation,
|
| 924 |
+
target_orientation_cos_sin=target_orientation_cos_sin,
|
| 925 |
+
)
|
| 926 |
+
|
| 927 |
+
@classmethod
|
| 928 |
+
def calc_unnormalized_state(cls, norm_state):
|
| 929 |
+
|
| 930 |
+
effector_target_translation = cls._unnormalize(
|
| 931 |
+
norm_state["effector_target_translation"],
|
| 932 |
+
EFFECTOR_TARGET_TRANSLATION_MIN,
|
| 933 |
+
EFFECTOR_TARGET_TRANSLATION_MAX,
|
| 934 |
+
)
|
| 935 |
+
# Note: normalized state does not include effector_translation state, this
|
| 936 |
+
# means this component will be missing (and is marked nan).
|
| 937 |
+
effector_translation = np.array([np.nan, np.nan], np.float32)
|
| 938 |
+
|
| 939 |
+
effector_target_to_block_translation = cls._unnormalize(
|
| 940 |
+
norm_state["effector_target_to_block_translation"],
|
| 941 |
+
EFFECTOR_TARGET_TO_BLOCK_TRANSLATION_MIN,
|
| 942 |
+
EFFECTOR_TARGET_TO_BLOCK_TRANSLATION_MAX,
|
| 943 |
+
)
|
| 944 |
+
block_translation = (
|
| 945 |
+
effector_target_to_block_translation + effector_target_translation
|
| 946 |
+
)
|
| 947 |
+
ori_cos_sin = cls._unnormalize(
|
| 948 |
+
norm_state["block_orientation_cos_sin"],
|
| 949 |
+
BLOCK_ORIENTATION_COS_SIN_MIN,
|
| 950 |
+
BLOCK_ORIENTATION_COS_SIN_MAX,
|
| 951 |
+
)
|
| 952 |
+
block_orientation = np.array(
|
| 953 |
+
[math.atan2(ori_cos_sin[1], ori_cos_sin[0])], np.float32
|
| 954 |
+
)
|
| 955 |
+
|
| 956 |
+
effector_target_to_target_translation = cls._unnormalize(
|
| 957 |
+
norm_state["effector_target_to_target_translation"],
|
| 958 |
+
EFFECTOR_TARGET_TO_TARGET_TRANSLATION_MIN,
|
| 959 |
+
EFFECTOR_TARGET_TO_TARGET_TRANSLATION_MAX,
|
| 960 |
+
)
|
| 961 |
+
target_translation = (
|
| 962 |
+
effector_target_to_target_translation + effector_target_translation
|
| 963 |
+
)
|
| 964 |
+
ori_cos_sin = cls._unnormalize(
|
| 965 |
+
norm_state["target_orientation_cos_sin"],
|
| 966 |
+
TARGET_ORIENTATION_COS_SIN_MIN,
|
| 967 |
+
TARGET_ORIENTATION_COS_SIN_MAX,
|
| 968 |
+
)
|
| 969 |
+
target_orientation = np.array(
|
| 970 |
+
[math.atan2(ori_cos_sin[1], ori_cos_sin[0])], np.float32
|
| 971 |
+
)
|
| 972 |
+
|
| 973 |
+
return collections.OrderedDict(
|
| 974 |
+
block_translation=block_translation,
|
| 975 |
+
block_orientation=block_orientation,
|
| 976 |
+
effector_translation=effector_translation,
|
| 977 |
+
effector_target_translation=effector_target_translation,
|
| 978 |
+
target_translation=target_translation,
|
| 979 |
+
target_orientation=target_orientation,
|
| 980 |
+
)
|
| 981 |
+
|
| 982 |
+
def get_pybullet_state(self):
|
| 983 |
+
return self._env.get_pybullet_state()
|
| 984 |
+
|
| 985 |
+
def set_pybullet_state(self, state):
|
| 986 |
+
return self._env.set_pybullet_state(state)
|
| 987 |
+
|
| 988 |
+
@property
|
| 989 |
+
def pybullet_client(self):
|
| 990 |
+
return self._env.pybullet_client
|
| 991 |
+
|
| 992 |
+
def calc_camera_params(self, image_size):
|
| 993 |
+
return self._env.calc_camera_params(image_size)
|
| 994 |
+
|
| 995 |
+
def _compute_state(self):
|
| 996 |
+
return self.calc_normalized_state(
|
| 997 |
+
self._env._compute_state()
|
| 998 |
+
) # pylint: disable=protected-access
|
| 999 |
+
|
| 1000 |
+
|
| 1001 |
+
# Make sure we only register once to allow us to reload the module in colab for
|
| 1002 |
+
# debugging.
|
| 1003 |
+
if "BlockPush-v0" in registration.registry.env_specs:
|
| 1004 |
+
del registration.registry.env_specs["BlockInsert-v0"]
|
| 1005 |
+
del registration.registry.env_specs["BlockPush-v0"]
|
| 1006 |
+
del registration.registry.env_specs["BlockPushNormalized-v0"]
|
| 1007 |
+
del registration.registry.env_specs["BlockPushRgbNormalized-v0"]
|
| 1008 |
+
del registration.registry.env_specs["BlockReach-v0"]
|
| 1009 |
+
del registration.registry.env_specs["BlockReachNormalized-v0"]
|
| 1010 |
+
del registration.registry.env_specs["BlockReachRgbNormalized-v0"]
|
| 1011 |
+
del registration.registry.env_specs["SharedBlockInsert-v0"]
|
| 1012 |
+
del registration.registry.env_specs["SharedBlockPush-v0"]
|
| 1013 |
+
del registration.registry.env_specs["SharedBlockReach-v0"]
|
| 1014 |
+
|
| 1015 |
+
registration.register(
|
| 1016 |
+
id="BlockInsert-v0",
|
| 1017 |
+
entry_point=BlockPush,
|
| 1018 |
+
kwargs=dict(task=BlockTaskVariant.INSERT),
|
| 1019 |
+
max_episode_steps=50,
|
| 1020 |
+
)
|
| 1021 |
+
registration.register(id="BlockPush-v0", entry_point=BlockPush, max_episode_steps=100)
|
| 1022 |
+
registration.register(
|
| 1023 |
+
id="BlockPushNormalized-v0",
|
| 1024 |
+
entry_point=BlockPushNormalized,
|
| 1025 |
+
kwargs=dict(task=BlockTaskVariant.PUSH_NORMALIZED),
|
| 1026 |
+
max_episode_steps=100,
|
| 1027 |
+
)
|
| 1028 |
+
registration.register(
|
| 1029 |
+
id="BlockPushRgb-v0",
|
| 1030 |
+
entry_point=BlockPush,
|
| 1031 |
+
max_episode_steps=100,
|
| 1032 |
+
kwargs=dict(image_size=(IMAGE_HEIGHT, IMAGE_WIDTH)),
|
| 1033 |
+
)
|
| 1034 |
+
registration.register(
|
| 1035 |
+
id="BlockPushRgbNormalized-v0",
|
| 1036 |
+
entry_point=BlockPushNormalized,
|
| 1037 |
+
kwargs=dict(
|
| 1038 |
+
task=BlockTaskVariant.PUSH_NORMALIZED, image_size=(IMAGE_HEIGHT, IMAGE_WIDTH)
|
| 1039 |
+
),
|
| 1040 |
+
max_episode_steps=100,
|
| 1041 |
+
)
|
| 1042 |
+
registration.register(
|
| 1043 |
+
id="BlockReach-v0",
|
| 1044 |
+
entry_point=BlockPush,
|
| 1045 |
+
kwargs=dict(task=BlockTaskVariant.REACH),
|
| 1046 |
+
max_episode_steps=50,
|
| 1047 |
+
)
|
| 1048 |
+
registration.register(
|
| 1049 |
+
id="BlockReachRgb-v0",
|
| 1050 |
+
entry_point=BlockPush,
|
| 1051 |
+
max_episode_steps=100,
|
| 1052 |
+
kwargs=dict(task=BlockTaskVariant.REACH, image_size=(IMAGE_HEIGHT, IMAGE_WIDTH)),
|
| 1053 |
+
)
|
| 1054 |
+
registration.register(
|
| 1055 |
+
id="BlockReachNormalized-v0",
|
| 1056 |
+
entry_point=BlockPushNormalized,
|
| 1057 |
+
kwargs=dict(task=BlockTaskVariant.REACH_NORMALIZED),
|
| 1058 |
+
max_episode_steps=50,
|
| 1059 |
+
)
|
| 1060 |
+
registration.register(
|
| 1061 |
+
id="BlockReachRgbNormalized-v0",
|
| 1062 |
+
entry_point=BlockPushNormalized,
|
| 1063 |
+
kwargs=dict(
|
| 1064 |
+
task=BlockTaskVariant.REACH_NORMALIZED, image_size=(IMAGE_HEIGHT, IMAGE_WIDTH)
|
| 1065 |
+
),
|
| 1066 |
+
max_episode_steps=50,
|
| 1067 |
+
)
|
| 1068 |
+
|
| 1069 |
+
registration.register(
|
| 1070 |
+
id="SharedBlockInsert-v0",
|
| 1071 |
+
entry_point=BlockPush,
|
| 1072 |
+
kwargs=dict(task=BlockTaskVariant.INSERT, shared_memory=True),
|
| 1073 |
+
max_episode_steps=50,
|
| 1074 |
+
)
|
| 1075 |
+
registration.register(
|
| 1076 |
+
id="SharedBlockPush-v0",
|
| 1077 |
+
entry_point=BlockPush,
|
| 1078 |
+
kwargs=dict(shared_memory=True),
|
| 1079 |
+
max_episode_steps=100,
|
| 1080 |
+
)
|
| 1081 |
+
registration.register(
|
| 1082 |
+
id="SharedBlockPushNormalized-v0",
|
| 1083 |
+
entry_point=BlockPushNormalized,
|
| 1084 |
+
kwargs=dict(task=BlockTaskVariant.PUSH_NORMALIZED, shared_memory=True),
|
| 1085 |
+
max_episode_steps=100,
|
| 1086 |
+
)
|
| 1087 |
+
registration.register(
|
| 1088 |
+
id="SharedBlockReach-v0",
|
| 1089 |
+
entry_point=BlockPush,
|
| 1090 |
+
kwargs=dict(task=BlockTaskVariant.REACH, shared_memory=True),
|
| 1091 |
+
max_episode_steps=50,
|
| 1092 |
+
)
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/block_pushing_discontinuous.py
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 The Reach ML Authors.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
|
| 16 |
+
"""Discontinuous block pushing."""
|
| 17 |
+
import collections
|
| 18 |
+
import enum
|
| 19 |
+
import math
|
| 20 |
+
from typing import List, Optional
|
| 21 |
+
|
| 22 |
+
from gym import spaces
|
| 23 |
+
from gym.envs import registration
|
| 24 |
+
from diffusion_policy.env.block_pushing import block_pushing
|
| 25 |
+
from diffusion_policy.env.block_pushing.utils import utils_pybullet
|
| 26 |
+
from diffusion_policy.env.block_pushing.utils.pose3d import Pose3d
|
| 27 |
+
import numpy as np
|
| 28 |
+
from scipy.spatial import transform
|
| 29 |
+
import pybullet
|
| 30 |
+
import pybullet_utils.bullet_client as bullet_client
|
| 31 |
+
|
| 32 |
+
ZONE2_URDF_PATH = "third_party/py/envs/assets/zone2.urdf"
|
| 33 |
+
|
| 34 |
+
MIN_TARGET_DIST = 0.15
|
| 35 |
+
NUM_RESET_ATTEMPTS = 1000
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def build_env_name(task, shared_memory, use_image_obs):
|
| 39 |
+
"""Construct the env name from parameters."""
|
| 40 |
+
del task
|
| 41 |
+
env_name = "BlockPushDiscontinuous"
|
| 42 |
+
|
| 43 |
+
if use_image_obs:
|
| 44 |
+
env_name = env_name + "Rgb"
|
| 45 |
+
|
| 46 |
+
if shared_memory:
|
| 47 |
+
env_name = "Shared" + env_name
|
| 48 |
+
|
| 49 |
+
env_name = env_name + "-v0"
|
| 50 |
+
|
| 51 |
+
return env_name
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
class BlockTaskVariant(enum.Enum):
|
| 55 |
+
REACH = "Reach"
|
| 56 |
+
REACH_NORMALIZED = "ReachNormalized"
|
| 57 |
+
PUSH = "Push"
|
| 58 |
+
PUSH_NORMALIZED = "PushNormalized"
|
| 59 |
+
INSERT = "Insert"
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
# pytype: skip-file
|
| 63 |
+
class BlockPushDiscontinuous(block_pushing.BlockPush):
|
| 64 |
+
"""Discontinuous block pushing."""
|
| 65 |
+
|
| 66 |
+
def __init__(
|
| 67 |
+
self,
|
| 68 |
+
control_frequency=10.0,
|
| 69 |
+
task=BlockTaskVariant.PUSH,
|
| 70 |
+
image_size=None,
|
| 71 |
+
shared_memory=False,
|
| 72 |
+
seed=None,
|
| 73 |
+
goal_dist_tolerance=0.04,
|
| 74 |
+
):
|
| 75 |
+
super(BlockPushDiscontinuous, self).__init__(
|
| 76 |
+
control_frequency=control_frequency,
|
| 77 |
+
task=task,
|
| 78 |
+
image_size=image_size,
|
| 79 |
+
shared_memory=shared_memory,
|
| 80 |
+
seed=seed,
|
| 81 |
+
goal_dist_tolerance=goal_dist_tolerance,
|
| 82 |
+
)
|
| 83 |
+
|
| 84 |
+
@property
|
| 85 |
+
def target_poses(self):
|
| 86 |
+
return self._target_poses
|
| 87 |
+
|
| 88 |
+
def get_goal_translation(self):
|
| 89 |
+
"""Return the translation component of the goal (2D)."""
|
| 90 |
+
if self._target_poses:
|
| 91 |
+
return [i.translation for i in self._target_poses]
|
| 92 |
+
else:
|
| 93 |
+
return None
|
| 94 |
+
|
| 95 |
+
def _setup_pybullet_scene(self):
|
| 96 |
+
self._pybullet_client = bullet_client.BulletClient(self._connection_mode)
|
| 97 |
+
|
| 98 |
+
# Temporarily disable rendering to speed up loading URDFs.
|
| 99 |
+
pybullet.configureDebugVisualizer(pybullet.COV_ENABLE_RENDERING, 0)
|
| 100 |
+
|
| 101 |
+
self._setup_workspace_and_robot()
|
| 102 |
+
target_urdf_path = block_pushing.ZONE_URDF_PATH
|
| 103 |
+
|
| 104 |
+
self._target_ids = []
|
| 105 |
+
for _ in [block_pushing.ZONE_URDF_PATH, ZONE2_URDF_PATH]:
|
| 106 |
+
self._target_ids.append(
|
| 107 |
+
utils_pybullet.load_urdf(
|
| 108 |
+
self._pybullet_client, target_urdf_path, useFixedBase=True
|
| 109 |
+
)
|
| 110 |
+
)
|
| 111 |
+
self._block_ids = [
|
| 112 |
+
utils_pybullet.load_urdf(
|
| 113 |
+
self._pybullet_client, block_pushing.BLOCK_URDF_PATH, useFixedBase=False
|
| 114 |
+
)
|
| 115 |
+
]
|
| 116 |
+
|
| 117 |
+
# Re-enable rendering.
|
| 118 |
+
pybullet.configureDebugVisualizer(pybullet.COV_ENABLE_RENDERING, 1)
|
| 119 |
+
|
| 120 |
+
self.step_simulation_to_stabilize()
|
| 121 |
+
|
| 122 |
+
def _reset_target_poses(self, workspace_center_x):
|
| 123 |
+
"""Resets target poses."""
|
| 124 |
+
self._target_poses = [None for _ in range(len(self._target_ids))]
|
| 125 |
+
|
| 126 |
+
def _reset_target_pose(idx, avoid=None):
|
| 127 |
+
def _get_random_translation():
|
| 128 |
+
# Choose x,y randomly.
|
| 129 |
+
target_x = workspace_center_x + self._rng.uniform(low=-0.10, high=0.10)
|
| 130 |
+
# Fix ys for this environment.
|
| 131 |
+
if idx == 0:
|
| 132 |
+
target_y = 0
|
| 133 |
+
else:
|
| 134 |
+
target_y = 0.4
|
| 135 |
+
target_translation = np.array([target_x, target_y, 0.020])
|
| 136 |
+
return target_translation
|
| 137 |
+
|
| 138 |
+
if avoid is None:
|
| 139 |
+
target_translation = _get_random_translation()
|
| 140 |
+
else:
|
| 141 |
+
# Reject targets too close to `avoid`.
|
| 142 |
+
for _ in range(NUM_RESET_ATTEMPTS):
|
| 143 |
+
target_translation = _get_random_translation()
|
| 144 |
+
dist = np.linalg.norm(target_translation[0] - avoid[0])
|
| 145 |
+
if dist > MIN_TARGET_DIST:
|
| 146 |
+
break
|
| 147 |
+
target_sampled_angle = math.pi + self._rng.uniform(
|
| 148 |
+
low=-math.pi / 6, high=math.pi / 6
|
| 149 |
+
)
|
| 150 |
+
target_rotation = transform.Rotation.from_rotvec(
|
| 151 |
+
[0, 0, target_sampled_angle]
|
| 152 |
+
)
|
| 153 |
+
self._pybullet_client.resetBasePositionAndOrientation(
|
| 154 |
+
self._target_ids[idx],
|
| 155 |
+
target_translation.tolist(),
|
| 156 |
+
target_rotation.as_quat().tolist(),
|
| 157 |
+
)
|
| 158 |
+
self._target_poses[idx] = Pose3d(
|
| 159 |
+
rotation=target_rotation, translation=target_translation
|
| 160 |
+
)
|
| 161 |
+
|
| 162 |
+
try_idx = 0
|
| 163 |
+
while True:
|
| 164 |
+
# Choose the first target.
|
| 165 |
+
_reset_target_pose(0)
|
| 166 |
+
# Choose the second target, avoiding the first.
|
| 167 |
+
_reset_target_pose(1, avoid=self._target_poses[0].translation)
|
| 168 |
+
dist = np.linalg.norm(
|
| 169 |
+
self._target_poses[0].translation[0]
|
| 170 |
+
- self._target_poses[1].translation[0]
|
| 171 |
+
)
|
| 172 |
+
if dist > MIN_TARGET_DIST:
|
| 173 |
+
break
|
| 174 |
+
try_idx += 1
|
| 175 |
+
if try_idx >= NUM_RESET_ATTEMPTS:
|
| 176 |
+
raise ValueError("could not find matching target")
|
| 177 |
+
assert dist > MIN_TARGET_DIST
|
| 178 |
+
|
| 179 |
+
def reset(self):
|
| 180 |
+
self._pybullet_client.restoreState(self._saved_state)
|
| 181 |
+
|
| 182 |
+
rotation = transform.Rotation.from_rotvec([0, math.pi, 0])
|
| 183 |
+
translation = np.array([0.3, -0.4, block_pushing.EFFECTOR_HEIGHT])
|
| 184 |
+
starting_pose = Pose3d(rotation=rotation, translation=translation)
|
| 185 |
+
self._set_robot_target_effector_pose(starting_pose)
|
| 186 |
+
|
| 187 |
+
workspace_center_x = 0.4
|
| 188 |
+
|
| 189 |
+
# Reset block pose.
|
| 190 |
+
block_x = workspace_center_x + self._rng.uniform(low=-0.1, high=0.1)
|
| 191 |
+
block_y = -0.2 + self._rng.uniform(low=-0.15, high=0.15)
|
| 192 |
+
block_translation = np.array([block_x, block_y, 0])
|
| 193 |
+
block_sampled_angle = self._rng.uniform(math.pi)
|
| 194 |
+
block_rotation = transform.Rotation.from_rotvec([0, 0, block_sampled_angle])
|
| 195 |
+
|
| 196 |
+
self._pybullet_client.resetBasePositionAndOrientation(
|
| 197 |
+
self._block_ids[0],
|
| 198 |
+
block_translation.tolist(),
|
| 199 |
+
block_rotation.as_quat().tolist(),
|
| 200 |
+
)
|
| 201 |
+
|
| 202 |
+
# Reset target pose.
|
| 203 |
+
self._reset_target_poses(workspace_center_x)
|
| 204 |
+
|
| 205 |
+
self.step_simulation_to_stabilize()
|
| 206 |
+
state = self._compute_state()
|
| 207 |
+
self._previous_state = state
|
| 208 |
+
self.min_dist_to_first_goal = np.inf
|
| 209 |
+
self.min_dist_to_second_goal = np.inf
|
| 210 |
+
self.steps = 0
|
| 211 |
+
return state
|
| 212 |
+
|
| 213 |
+
def _compute_goal_distance(self, state):
|
| 214 |
+
# Reward is 1. blocks is inside any target.
|
| 215 |
+
return np.mean([self.min_dist_to_first_goal, self.min_dist_to_second_goal])
|
| 216 |
+
|
| 217 |
+
def _compute_state(self):
|
| 218 |
+
effector_pose = self._robot.forward_kinematics()
|
| 219 |
+
block_position_and_orientation = (
|
| 220 |
+
self._pybullet_client.getBasePositionAndOrientation(self._block_ids[0])
|
| 221 |
+
)
|
| 222 |
+
block_pose = Pose3d(
|
| 223 |
+
rotation=transform.Rotation.from_quat(block_position_and_orientation[1]),
|
| 224 |
+
translation=block_position_and_orientation[0],
|
| 225 |
+
)
|
| 226 |
+
|
| 227 |
+
def _yaw_from_pose(pose):
|
| 228 |
+
return np.array([pose.rotation.as_euler("xyz", degrees=False)[-1]])
|
| 229 |
+
|
| 230 |
+
obs = collections.OrderedDict(
|
| 231 |
+
block_translation=block_pose.translation[0:2],
|
| 232 |
+
block_orientation=_yaw_from_pose(block_pose),
|
| 233 |
+
effector_translation=effector_pose.translation[0:2],
|
| 234 |
+
effector_target_translation=self._target_effector_pose.translation[0:2],
|
| 235 |
+
target_translation=self._target_poses[0].translation[0:2],
|
| 236 |
+
target_orientation=_yaw_from_pose(self._target_poses[0]),
|
| 237 |
+
target2_translation=self._target_poses[1].translation[0:2],
|
| 238 |
+
target2_orientation=_yaw_from_pose(self._target_poses[1]),
|
| 239 |
+
)
|
| 240 |
+
if self._image_size is not None:
|
| 241 |
+
obs["rgb"] = self._render_camera(self._image_size)
|
| 242 |
+
return obs
|
| 243 |
+
|
| 244 |
+
def step(self, action):
|
| 245 |
+
self._step_robot_and_sim(action)
|
| 246 |
+
state = self._compute_state()
|
| 247 |
+
reward = self._get_reward(state)
|
| 248 |
+
done = False
|
| 249 |
+
if reward > 0.0:
|
| 250 |
+
done = True
|
| 251 |
+
# Cache so we can compute success.
|
| 252 |
+
self.state = state
|
| 253 |
+
return state, reward, done, {}
|
| 254 |
+
|
| 255 |
+
def dist(self, state, target):
|
| 256 |
+
# Reward is 1. blocks is inside any target.
|
| 257 |
+
return np.linalg.norm(
|
| 258 |
+
state["block_translation"] - state["%s_translation" % target]
|
| 259 |
+
)
|
| 260 |
+
|
| 261 |
+
def _get_reward(self, state):
|
| 262 |
+
"""Reward is 1.0 if agent hits both goals and stays at second."""
|
| 263 |
+
# This also statefully updates these values.
|
| 264 |
+
self.min_dist_to_first_goal = min(
|
| 265 |
+
self.dist(state, "target"), self.min_dist_to_first_goal
|
| 266 |
+
)
|
| 267 |
+
self.min_dist_to_second_goal = min(
|
| 268 |
+
self.dist(state, "target2"), self.min_dist_to_second_goal
|
| 269 |
+
)
|
| 270 |
+
|
| 271 |
+
def _reward(thresh):
|
| 272 |
+
reward_first = True if self.min_dist_to_first_goal < thresh else False
|
| 273 |
+
reward_second = True if self.min_dist_to_second_goal < thresh else False
|
| 274 |
+
return 1.0 if (reward_first and reward_second) else 0.0
|
| 275 |
+
|
| 276 |
+
reward = _reward(self.goal_dist_tolerance)
|
| 277 |
+
return reward
|
| 278 |
+
|
| 279 |
+
@property
|
| 280 |
+
def succeeded(self):
|
| 281 |
+
thresh = self.goal_dist_tolerance
|
| 282 |
+
hit_first = True if self.min_dist_to_first_goal < thresh else False
|
| 283 |
+
hit_second = True if self.min_dist_to_first_goal < thresh else False
|
| 284 |
+
current_distance_to_second = self.dist(self.state, "target2")
|
| 285 |
+
still_at_second = True if current_distance_to_second < thresh else False
|
| 286 |
+
return hit_first and hit_second and still_at_second
|
| 287 |
+
|
| 288 |
+
def _create_observation_space(self, image_size):
|
| 289 |
+
pi2 = math.pi * 2
|
| 290 |
+
|
| 291 |
+
obs_dict = collections.OrderedDict(
|
| 292 |
+
block_translation=spaces.Box(low=-5, high=5, shape=(2,)), # x,y
|
| 293 |
+
block_orientation=spaces.Box(low=-pi2, high=pi2, shape=(1,)), # phi
|
| 294 |
+
effector_translation=spaces.Box(
|
| 295 |
+
# Small buffer for to IK noise.
|
| 296 |
+
low=block_pushing.WORKSPACE_BOUNDS[0] - 0.1,
|
| 297 |
+
high=block_pushing.WORKSPACE_BOUNDS[1] + 0.1,
|
| 298 |
+
), # x,y
|
| 299 |
+
effector_target_translation=spaces.Box(
|
| 300 |
+
# Small buffer for to IK noise.
|
| 301 |
+
low=block_pushing.WORKSPACE_BOUNDS[0] - 0.1,
|
| 302 |
+
high=block_pushing.WORKSPACE_BOUNDS[1] + 0.1,
|
| 303 |
+
), # x,y
|
| 304 |
+
target_translation=spaces.Box(low=-5, high=5, shape=(2,)), # x,y
|
| 305 |
+
target_orientation=spaces.Box(
|
| 306 |
+
low=-pi2,
|
| 307 |
+
high=pi2,
|
| 308 |
+
shape=(1,),
|
| 309 |
+
), # theta
|
| 310 |
+
target2_translation=spaces.Box(low=-5, high=5, shape=(2,)), # x,y
|
| 311 |
+
target2_orientation=spaces.Box(
|
| 312 |
+
low=-pi2,
|
| 313 |
+
high=pi2,
|
| 314 |
+
shape=(1,),
|
| 315 |
+
), # theta
|
| 316 |
+
)
|
| 317 |
+
if image_size is not None:
|
| 318 |
+
obs_dict["rgb"] = spaces.Box(
|
| 319 |
+
low=0, high=255, shape=(image_size[0], image_size[1], 3), dtype=np.uint8
|
| 320 |
+
)
|
| 321 |
+
return spaces.Dict(obs_dict)
|
| 322 |
+
|
| 323 |
+
|
| 324 |
+
if "BlockPushDiscontinuous-v0" in registration.registry.env_specs:
|
| 325 |
+
del registration.registry.env_specs["BlockPushDiscontinuous-v0"]
|
| 326 |
+
|
| 327 |
+
registration.register(
|
| 328 |
+
id="BlockPushDiscontinuous-v0",
|
| 329 |
+
entry_point=BlockPushDiscontinuous,
|
| 330 |
+
max_episode_steps=200,
|
| 331 |
+
)
|
| 332 |
+
|
| 333 |
+
registration.register(
|
| 334 |
+
id="BlockPushDiscontinuousRgb-v0",
|
| 335 |
+
entry_point=BlockPushDiscontinuous,
|
| 336 |
+
max_episode_steps=200,
|
| 337 |
+
kwargs=dict(image_size=(block_pushing.IMAGE_HEIGHT, block_pushing.IMAGE_WIDTH)),
|
| 338 |
+
)
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/block_pushing_multimodal.py
ADDED
|
@@ -0,0 +1,802 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 The Reach ML Authors.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
|
| 16 |
+
"""Multimodal block environments for the XArm."""
|
| 17 |
+
|
| 18 |
+
import collections
|
| 19 |
+
import logging
|
| 20 |
+
import math
|
| 21 |
+
from typing import Dict, List, Optional, Union
|
| 22 |
+
import copy
|
| 23 |
+
import time
|
| 24 |
+
|
| 25 |
+
from gym import spaces
|
| 26 |
+
from gym.envs import registration
|
| 27 |
+
from diffusion_policy.env.block_pushing import block_pushing
|
| 28 |
+
from diffusion_policy.env.block_pushing.utils import utils_pybullet
|
| 29 |
+
from diffusion_policy.env.block_pushing.utils.pose3d import Pose3d
|
| 30 |
+
from diffusion_policy.env.block_pushing.utils.utils_pybullet import ObjState
|
| 31 |
+
from diffusion_policy.env.block_pushing.utils.utils_pybullet import XarmState
|
| 32 |
+
import numpy as np
|
| 33 |
+
from scipy.spatial import transform
|
| 34 |
+
import pybullet
|
| 35 |
+
import pybullet_utils.bullet_client as bullet_client
|
| 36 |
+
|
| 37 |
+
# pytype: skip-file
|
| 38 |
+
BLOCK2_URDF_PATH = "third_party/py/envs/assets/block2.urdf"
|
| 39 |
+
ZONE2_URDF_PATH = "third_party/py/envs/assets/zone2.urdf"
|
| 40 |
+
|
| 41 |
+
# When resetting multiple targets, they should all be this far apart.
|
| 42 |
+
MIN_BLOCK_DIST = 0.1
|
| 43 |
+
MIN_TARGET_DIST = 0.12
|
| 44 |
+
# pylint: enable=line-too-long
|
| 45 |
+
NUM_RESET_ATTEMPTS = 1000
|
| 46 |
+
|
| 47 |
+
# Random movement of blocks
|
| 48 |
+
RANDOM_X_SHIFT = 0.1
|
| 49 |
+
RANDOM_Y_SHIFT = 0.15
|
| 50 |
+
|
| 51 |
+
logging.basicConfig(
|
| 52 |
+
level="INFO",
|
| 53 |
+
format="%(asctime)s [%(levelname)s] %(message)s",
|
| 54 |
+
filemode="w",
|
| 55 |
+
)
|
| 56 |
+
logger = logging.getLogger()
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
def build_env_name(task, shared_memory, use_image_obs):
|
| 60 |
+
"""Construct the env name from parameters."""
|
| 61 |
+
del task
|
| 62 |
+
env_name = "BlockPushMultimodal"
|
| 63 |
+
|
| 64 |
+
if use_image_obs:
|
| 65 |
+
env_name = env_name + "Rgb"
|
| 66 |
+
|
| 67 |
+
if shared_memory:
|
| 68 |
+
env_name = "Shared" + env_name
|
| 69 |
+
|
| 70 |
+
env_name = env_name + "-v0"
|
| 71 |
+
|
| 72 |
+
return env_name
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
class BlockPushEventManager:
|
| 76 |
+
def __init__(self):
|
| 77 |
+
self.event_steps = {
|
| 78 |
+
'REACH_0': -1,
|
| 79 |
+
'REACH_1': -1,
|
| 80 |
+
'TARGET_0_0': -1,
|
| 81 |
+
'TARGET_0_1': -1,
|
| 82 |
+
'TARGET_1_0': -1,
|
| 83 |
+
'TARGET_1_1': -1
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
def reach(self, step, block_id):
|
| 87 |
+
key = f'REACH_{block_id}'
|
| 88 |
+
if self.event_steps[key] < 0:
|
| 89 |
+
self.event_steps[key] = step
|
| 90 |
+
|
| 91 |
+
def target(self, step, block_id, target_id):
|
| 92 |
+
key = f'TARGET_{block_id}_{target_id}'
|
| 93 |
+
if self.event_steps[key] < 0:
|
| 94 |
+
self.event_steps[key] = step
|
| 95 |
+
|
| 96 |
+
def reset(self):
|
| 97 |
+
for key in list(self.event_steps):
|
| 98 |
+
self.event_steps[key] = -1
|
| 99 |
+
|
| 100 |
+
def get_info(self):
|
| 101 |
+
return copy.deepcopy(self.event_steps)
|
| 102 |
+
|
| 103 |
+
class BlockPushMultimodal(block_pushing.BlockPush):
|
| 104 |
+
"""2 blocks, 2 targets."""
|
| 105 |
+
|
| 106 |
+
def __init__(
|
| 107 |
+
self,
|
| 108 |
+
control_frequency=10.0,
|
| 109 |
+
task=block_pushing.BlockTaskVariant.PUSH,
|
| 110 |
+
image_size=None,
|
| 111 |
+
shared_memory=False,
|
| 112 |
+
seed=None,
|
| 113 |
+
goal_dist_tolerance=0.05,
|
| 114 |
+
abs_action=False
|
| 115 |
+
):
|
| 116 |
+
"""Creates an env instance.
|
| 117 |
+
|
| 118 |
+
Args:
|
| 119 |
+
control_frequency: Control frequency for the arm. Each env step will
|
| 120 |
+
advance the simulation by 1/control_frequency seconds.
|
| 121 |
+
task: enum for which task, see BlockTaskVariant enum.
|
| 122 |
+
image_size: Optional image size (height, width). If None, no image
|
| 123 |
+
observations will be used.
|
| 124 |
+
shared_memory: If True `pybullet.SHARED_MEMORY` is used to connect to
|
| 125 |
+
pybullet. Useful to debug.
|
| 126 |
+
seed: Optional seed for the environment.
|
| 127 |
+
goal_dist_tolerance: float, how far away from the goal to terminate.
|
| 128 |
+
"""
|
| 129 |
+
self._target_ids = None
|
| 130 |
+
self._target_poses = None
|
| 131 |
+
self._event_manager = BlockPushEventManager()
|
| 132 |
+
super(BlockPushMultimodal, self).__init__(
|
| 133 |
+
control_frequency=control_frequency,
|
| 134 |
+
task=task,
|
| 135 |
+
image_size=image_size,
|
| 136 |
+
shared_memory=shared_memory,
|
| 137 |
+
seed=seed,
|
| 138 |
+
goal_dist_tolerance=goal_dist_tolerance,
|
| 139 |
+
)
|
| 140 |
+
self._init_distance = [-1.0, -1.0]
|
| 141 |
+
self._in_target = [[-1.0, -1.0], [-1.0, -1.0]]
|
| 142 |
+
self._first_move = [-1, -1]
|
| 143 |
+
self._step_num = 0
|
| 144 |
+
self._abs_action = abs_action
|
| 145 |
+
|
| 146 |
+
@property
|
| 147 |
+
def target_poses(self):
|
| 148 |
+
return self._target_poses
|
| 149 |
+
|
| 150 |
+
def get_goal_translation(self):
|
| 151 |
+
"""Return the translation component of the goal (2D)."""
|
| 152 |
+
if self._target_poses:
|
| 153 |
+
return [i.translation for i in self._target_poses]
|
| 154 |
+
else:
|
| 155 |
+
return None
|
| 156 |
+
|
| 157 |
+
def _setup_pybullet_scene(self):
|
| 158 |
+
self._pybullet_client = bullet_client.BulletClient(self._connection_mode)
|
| 159 |
+
|
| 160 |
+
# Temporarily disable rendering to speed up loading URDFs.
|
| 161 |
+
pybullet.configureDebugVisualizer(pybullet.COV_ENABLE_RENDERING, 0)
|
| 162 |
+
|
| 163 |
+
self._setup_workspace_and_robot()
|
| 164 |
+
|
| 165 |
+
self._target_ids = [
|
| 166 |
+
utils_pybullet.load_urdf(self._pybullet_client, i, useFixedBase=True)
|
| 167 |
+
for i in [block_pushing.ZONE_URDF_PATH, ZONE2_URDF_PATH]
|
| 168 |
+
]
|
| 169 |
+
self._block_ids = []
|
| 170 |
+
for i in [block_pushing.BLOCK_URDF_PATH, BLOCK2_URDF_PATH]:
|
| 171 |
+
self._block_ids.append(
|
| 172 |
+
utils_pybullet.load_urdf(self._pybullet_client, i, useFixedBase=False)
|
| 173 |
+
)
|
| 174 |
+
|
| 175 |
+
# Re-enable rendering.
|
| 176 |
+
pybullet.configureDebugVisualizer(pybullet.COV_ENABLE_RENDERING, 1)
|
| 177 |
+
|
| 178 |
+
self.step_simulation_to_stabilize()
|
| 179 |
+
|
| 180 |
+
def _reset_block_poses(self, workspace_center_x):
|
| 181 |
+
"""Resets block poses."""
|
| 182 |
+
|
| 183 |
+
# Helper for choosing random block position.
|
| 184 |
+
def _reset_block_pose(idx, add=0.0, avoid=None):
|
| 185 |
+
def _get_random_translation():
|
| 186 |
+
block_x = (
|
| 187 |
+
workspace_center_x
|
| 188 |
+
+ add
|
| 189 |
+
+ self._rng.uniform(low=-RANDOM_X_SHIFT, high=RANDOM_X_SHIFT)
|
| 190 |
+
)
|
| 191 |
+
block_y = -0.2 + self._rng.uniform(
|
| 192 |
+
low=-RANDOM_Y_SHIFT, high=RANDOM_Y_SHIFT
|
| 193 |
+
)
|
| 194 |
+
block_translation = np.array([block_x, block_y, 0])
|
| 195 |
+
return block_translation
|
| 196 |
+
|
| 197 |
+
if avoid is None:
|
| 198 |
+
block_translation = _get_random_translation()
|
| 199 |
+
else:
|
| 200 |
+
# Reject targets too close to `avoid`.
|
| 201 |
+
for _ in range(NUM_RESET_ATTEMPTS):
|
| 202 |
+
block_translation = _get_random_translation()
|
| 203 |
+
dist = np.linalg.norm(block_translation[0] - avoid[0])
|
| 204 |
+
# print('block inner try_idx %d, dist %.3f' % (try_idx, dist))
|
| 205 |
+
if dist > MIN_BLOCK_DIST:
|
| 206 |
+
break
|
| 207 |
+
block_sampled_angle = self._rng.uniform(math.pi)
|
| 208 |
+
block_rotation = transform.Rotation.from_rotvec([0, 0, block_sampled_angle])
|
| 209 |
+
self._pybullet_client.resetBasePositionAndOrientation(
|
| 210 |
+
self._block_ids[idx],
|
| 211 |
+
block_translation.tolist(),
|
| 212 |
+
block_rotation.as_quat().tolist(),
|
| 213 |
+
)
|
| 214 |
+
return block_translation
|
| 215 |
+
|
| 216 |
+
# Reject targets too close to `avoid`.
|
| 217 |
+
for _ in range(NUM_RESET_ATTEMPTS):
|
| 218 |
+
# Reset first block.
|
| 219 |
+
b0_translation = _reset_block_pose(0)
|
| 220 |
+
# Reset second block away from first block.
|
| 221 |
+
b1_translation = _reset_block_pose(1, avoid=b0_translation)
|
| 222 |
+
dist = np.linalg.norm(b0_translation[0] - b1_translation[0])
|
| 223 |
+
if dist > MIN_BLOCK_DIST:
|
| 224 |
+
break
|
| 225 |
+
else:
|
| 226 |
+
raise ValueError("could not find matching block")
|
| 227 |
+
assert dist > MIN_BLOCK_DIST
|
| 228 |
+
|
| 229 |
+
def _reset_target_poses(self, workspace_center_x):
|
| 230 |
+
"""Resets target poses."""
|
| 231 |
+
|
| 232 |
+
def _reset_target_pose(idx, add=0.0, avoid=None):
|
| 233 |
+
def _get_random_translation():
|
| 234 |
+
# Choose x,y randomly.
|
| 235 |
+
target_x = (
|
| 236 |
+
workspace_center_x
|
| 237 |
+
+ add
|
| 238 |
+
+ self._rng.uniform(
|
| 239 |
+
low=-0.05 * RANDOM_X_SHIFT, high=0.05 * RANDOM_X_SHIFT
|
| 240 |
+
)
|
| 241 |
+
)
|
| 242 |
+
target_y = 0.2 + self._rng.uniform(
|
| 243 |
+
low=-0.05 * RANDOM_Y_SHIFT, high=0.05 * RANDOM_Y_SHIFT
|
| 244 |
+
)
|
| 245 |
+
target_translation = np.array([target_x, target_y, 0.020])
|
| 246 |
+
return target_translation
|
| 247 |
+
|
| 248 |
+
if avoid is None:
|
| 249 |
+
target_translation = _get_random_translation()
|
| 250 |
+
else:
|
| 251 |
+
# Reject targets too close to `avoid`.
|
| 252 |
+
for _ in range(NUM_RESET_ATTEMPTS):
|
| 253 |
+
target_translation = _get_random_translation()
|
| 254 |
+
dist = np.linalg.norm(target_translation[0] - avoid[0])
|
| 255 |
+
# print('target inner try_idx %d, dist %.3f' % (try_idx, dist))
|
| 256 |
+
if dist > MIN_TARGET_DIST:
|
| 257 |
+
break
|
| 258 |
+
target_sampled_angle = math.pi + self._rng.uniform(
|
| 259 |
+
low=-math.pi / 30, high=math.pi / 30
|
| 260 |
+
)
|
| 261 |
+
target_rotation = transform.Rotation.from_rotvec(
|
| 262 |
+
[0, 0, target_sampled_angle]
|
| 263 |
+
)
|
| 264 |
+
self._pybullet_client.resetBasePositionAndOrientation(
|
| 265 |
+
self._target_ids[idx],
|
| 266 |
+
target_translation.tolist(),
|
| 267 |
+
target_rotation.as_quat().tolist(),
|
| 268 |
+
)
|
| 269 |
+
self._target_poses[idx] = Pose3d(
|
| 270 |
+
rotation=target_rotation, translation=target_translation
|
| 271 |
+
)
|
| 272 |
+
|
| 273 |
+
if self._target_poses is None:
|
| 274 |
+
self._target_poses = [None for _ in range(len(self._target_ids))]
|
| 275 |
+
|
| 276 |
+
for _ in range(NUM_RESET_ATTEMPTS):
|
| 277 |
+
# Choose the first target.
|
| 278 |
+
add = 0.12 * self._rng.choice([-1, 1])
|
| 279 |
+
# Randomly flip the location of the targets.
|
| 280 |
+
_reset_target_pose(0, add=add)
|
| 281 |
+
_reset_target_pose(1, add=-add, avoid=self._target_poses[0].translation)
|
| 282 |
+
dist = np.linalg.norm(
|
| 283 |
+
self._target_poses[0].translation[0]
|
| 284 |
+
- self._target_poses[1].translation[0]
|
| 285 |
+
)
|
| 286 |
+
if dist > MIN_TARGET_DIST:
|
| 287 |
+
break
|
| 288 |
+
else:
|
| 289 |
+
raise ValueError("could not find matching target")
|
| 290 |
+
assert dist > MIN_TARGET_DIST
|
| 291 |
+
|
| 292 |
+
def _reset_object_poses(self, workspace_center_x, workspace_center_y):
|
| 293 |
+
# Reset block poses.
|
| 294 |
+
self._reset_block_poses(workspace_center_x)
|
| 295 |
+
|
| 296 |
+
# Reset target poses.
|
| 297 |
+
self._reset_target_poses(workspace_center_x)
|
| 298 |
+
|
| 299 |
+
self._init_distance = [-1.0, -1.0]
|
| 300 |
+
self._in_target = [[-1.0, -1.0], [-1.0, -1.0]]
|
| 301 |
+
self._step_num = 0
|
| 302 |
+
|
| 303 |
+
def reset(self, reset_poses=True):
|
| 304 |
+
workspace_center_x = 0.4
|
| 305 |
+
workspace_center_y = 0.0
|
| 306 |
+
|
| 307 |
+
if reset_poses:
|
| 308 |
+
self._pybullet_client.restoreState(self._saved_state)
|
| 309 |
+
|
| 310 |
+
rotation = transform.Rotation.from_rotvec([0, math.pi, 0])
|
| 311 |
+
translation = np.array([0.3, -0.4, block_pushing.EFFECTOR_HEIGHT])
|
| 312 |
+
starting_pose = Pose3d(rotation=rotation, translation=translation)
|
| 313 |
+
self._set_robot_target_effector_pose(starting_pose)
|
| 314 |
+
self._reset_object_poses(workspace_center_x, workspace_center_y)
|
| 315 |
+
|
| 316 |
+
# else:
|
| 317 |
+
self._target_poses = [
|
| 318 |
+
self._get_target_pose(idx) for idx in self._target_ids
|
| 319 |
+
]
|
| 320 |
+
|
| 321 |
+
if reset_poses:
|
| 322 |
+
self.step_simulation_to_stabilize()
|
| 323 |
+
|
| 324 |
+
state = self._compute_state()
|
| 325 |
+
self._previous_state = state
|
| 326 |
+
self._event_manager.reset()
|
| 327 |
+
return state
|
| 328 |
+
|
| 329 |
+
def _get_target_pose(self, idx):
|
| 330 |
+
(
|
| 331 |
+
target_translation,
|
| 332 |
+
target_orientation_quat,
|
| 333 |
+
) = self._pybullet_client.getBasePositionAndOrientation(idx)
|
| 334 |
+
target_rotation = transform.Rotation.from_quat(target_orientation_quat)
|
| 335 |
+
target_translation = np.array(target_translation)
|
| 336 |
+
return Pose3d(rotation=target_rotation, translation=target_translation)
|
| 337 |
+
|
| 338 |
+
def _compute_reach_target(self, state):
|
| 339 |
+
xy_block = state["block_translation"]
|
| 340 |
+
xy_target = state["target_translation"]
|
| 341 |
+
|
| 342 |
+
xy_block_to_target = xy_target - xy_block
|
| 343 |
+
xy_dir_block_to_target = (xy_block_to_target) / np.linalg.norm(
|
| 344 |
+
xy_block_to_target
|
| 345 |
+
)
|
| 346 |
+
self.reach_target_translation = xy_block + -1 * xy_dir_block_to_target * 0.05
|
| 347 |
+
|
| 348 |
+
def _compute_state(self):
|
| 349 |
+
effector_pose = self._robot.forward_kinematics()
|
| 350 |
+
|
| 351 |
+
def _get_block_pose(idx):
|
| 352 |
+
block_position_and_orientation = (
|
| 353 |
+
self._pybullet_client.getBasePositionAndOrientation(
|
| 354 |
+
self._block_ids[idx]
|
| 355 |
+
)
|
| 356 |
+
)
|
| 357 |
+
block_pose = Pose3d(
|
| 358 |
+
rotation=transform.Rotation.from_quat(
|
| 359 |
+
block_position_and_orientation[1]
|
| 360 |
+
),
|
| 361 |
+
translation=block_position_and_orientation[0],
|
| 362 |
+
)
|
| 363 |
+
return block_pose
|
| 364 |
+
|
| 365 |
+
block_poses = [_get_block_pose(i) for i in range(len(self._block_ids))]
|
| 366 |
+
|
| 367 |
+
def _yaw_from_pose(pose):
|
| 368 |
+
return np.array([pose.rotation.as_euler("xyz", degrees=False)[-1] % np.pi])
|
| 369 |
+
|
| 370 |
+
obs = collections.OrderedDict(
|
| 371 |
+
block_translation=block_poses[0].translation[0:2],
|
| 372 |
+
block_orientation=_yaw_from_pose(block_poses[0]),
|
| 373 |
+
block2_translation=block_poses[1].translation[0:2],
|
| 374 |
+
block2_orientation=_yaw_from_pose(block_poses[1]),
|
| 375 |
+
effector_translation=effector_pose.translation[0:2],
|
| 376 |
+
effector_target_translation=self._target_effector_pose.translation[0:2],
|
| 377 |
+
target_translation=self._target_poses[0].translation[0:2],
|
| 378 |
+
target_orientation=_yaw_from_pose(self._target_poses[0]),
|
| 379 |
+
target2_translation=self._target_poses[1].translation[0:2],
|
| 380 |
+
target2_orientation=_yaw_from_pose(self._target_poses[1]),
|
| 381 |
+
)
|
| 382 |
+
|
| 383 |
+
for i in range(2):
|
| 384 |
+
new_distance = np.linalg.norm(
|
| 385 |
+
block_poses[i].translation[0:2]
|
| 386 |
+
) # + np.linalg.norm(_yaw_from_pose(block_poses[i]))
|
| 387 |
+
if self._init_distance[i] == -1:
|
| 388 |
+
self._init_distance[i] = new_distance
|
| 389 |
+
else:
|
| 390 |
+
if self._init_distance[i] != 100:
|
| 391 |
+
if np.abs(new_distance - self._init_distance[i]) > 1e-3:
|
| 392 |
+
logger.info(f"Block {i} moved on step {self._step_num}")
|
| 393 |
+
self._event_manager.reach(step=self._step_num, block_id=i)
|
| 394 |
+
self._init_distance[i] = 100
|
| 395 |
+
|
| 396 |
+
self._step_num += 1
|
| 397 |
+
if self._image_size is not None:
|
| 398 |
+
obs["rgb"] = self._render_camera(self._image_size)
|
| 399 |
+
return obs
|
| 400 |
+
|
| 401 |
+
def step(self, action):
|
| 402 |
+
self._step_robot_and_sim(action)
|
| 403 |
+
|
| 404 |
+
state = self._compute_state()
|
| 405 |
+
done = False
|
| 406 |
+
reward = self._get_reward(state)
|
| 407 |
+
if reward >= 0.5:
|
| 408 |
+
# Terminate the episode if both blocks are close enough to the targets.
|
| 409 |
+
done = True
|
| 410 |
+
|
| 411 |
+
info = self._event_manager.get_info()
|
| 412 |
+
return state, reward, done, info
|
| 413 |
+
|
| 414 |
+
def _step_robot_and_sim(self, action):
|
| 415 |
+
"""Steps the robot and pybullet sim."""
|
| 416 |
+
# Compute target_effector_pose by shifting the effector's pose by the
|
| 417 |
+
# action.
|
| 418 |
+
if self._abs_action:
|
| 419 |
+
target_effector_translation = np.array([action[0], action[1], 0])
|
| 420 |
+
else:
|
| 421 |
+
target_effector_translation = np.array(
|
| 422 |
+
self._target_effector_pose.translation
|
| 423 |
+
) + np.array([action[0], action[1], 0])
|
| 424 |
+
|
| 425 |
+
target_effector_translation[0:2] = np.clip(
|
| 426 |
+
target_effector_translation[0:2],
|
| 427 |
+
self.workspace_bounds[0],
|
| 428 |
+
self.workspace_bounds[1],
|
| 429 |
+
)
|
| 430 |
+
target_effector_translation[-1] = self.effector_height
|
| 431 |
+
target_effector_pose = Pose3d(
|
| 432 |
+
rotation=block_pushing.EFFECTOR_DOWN_ROTATION, translation=target_effector_translation
|
| 433 |
+
)
|
| 434 |
+
|
| 435 |
+
self._set_robot_target_effector_pose(target_effector_pose)
|
| 436 |
+
|
| 437 |
+
# Update sleep time dynamically to stay near real-time.
|
| 438 |
+
frame_sleep_time = 0
|
| 439 |
+
if self._connection_mode == pybullet.SHARED_MEMORY:
|
| 440 |
+
cur_time = time.time()
|
| 441 |
+
if self._last_loop_time is not None:
|
| 442 |
+
# Calculate the total, non-sleeping time from the previous frame, this
|
| 443 |
+
# includes the actual step as well as any compute that happens in the
|
| 444 |
+
# caller thread (model inference, etc).
|
| 445 |
+
compute_time = (
|
| 446 |
+
cur_time
|
| 447 |
+
- self._last_loop_time
|
| 448 |
+
- self._last_loop_frame_sleep_time * self._sim_steps_per_step
|
| 449 |
+
)
|
| 450 |
+
# Use this to calculate the current frame's total sleep time to ensure
|
| 451 |
+
# that env.step runs at policy rate. This is an estimate since the
|
| 452 |
+
# previous frame's compute time may not match the current frame.
|
| 453 |
+
total_sleep_time = max((1 / self._control_frequency) - compute_time, 0)
|
| 454 |
+
# Now spread this out over the inner sim steps. This doesn't change
|
| 455 |
+
# control in any way, but makes the animation appear smooth.
|
| 456 |
+
frame_sleep_time = total_sleep_time / self._sim_steps_per_step
|
| 457 |
+
else:
|
| 458 |
+
# No estimate of the previous frame's compute, assume it is zero.
|
| 459 |
+
frame_sleep_time = 1 / self._step_frequency
|
| 460 |
+
|
| 461 |
+
# Cache end of this loop time, to compute sleep time on next iteration.
|
| 462 |
+
self._last_loop_time = cur_time
|
| 463 |
+
self._last_loop_frame_sleep_time = frame_sleep_time
|
| 464 |
+
|
| 465 |
+
for _ in range(self._sim_steps_per_step):
|
| 466 |
+
if self._connection_mode == pybullet.SHARED_MEMORY:
|
| 467 |
+
block_pushing.sleep_spin(frame_sleep_time)
|
| 468 |
+
self._pybullet_client.stepSimulation()
|
| 469 |
+
|
| 470 |
+
def _get_reward(self, state):
|
| 471 |
+
# Reward is 1. if both blocks are inside targets, but not the same target.
|
| 472 |
+
targets = ["target", "target2"]
|
| 473 |
+
|
| 474 |
+
def _block_target_dist(block, target):
|
| 475 |
+
return np.linalg.norm(
|
| 476 |
+
state["%s_translation" % block] - state["%s_translation" % target]
|
| 477 |
+
)
|
| 478 |
+
|
| 479 |
+
def _closest_target(block):
|
| 480 |
+
# Distances to all targets.
|
| 481 |
+
dists = [_block_target_dist(block, t) for t in targets]
|
| 482 |
+
# Which is closest.
|
| 483 |
+
closest_target = targets[np.argmin(dists)]
|
| 484 |
+
closest_dist = np.min(dists)
|
| 485 |
+
# Is it in the closest target?
|
| 486 |
+
in_target = closest_dist < self.goal_dist_tolerance
|
| 487 |
+
return closest_target, in_target
|
| 488 |
+
|
| 489 |
+
blocks = ["block", "block2"]
|
| 490 |
+
|
| 491 |
+
reward = 0.0
|
| 492 |
+
|
| 493 |
+
for t_i, t in enumerate(targets):
|
| 494 |
+
for b_i, b in enumerate(blocks):
|
| 495 |
+
if self._in_target[t_i][b_i] == -1:
|
| 496 |
+
dist = _block_target_dist(b, t)
|
| 497 |
+
if dist < self.goal_dist_tolerance:
|
| 498 |
+
self._in_target[t_i][b_i] = 0
|
| 499 |
+
logger.info(
|
| 500 |
+
f"Block {b_i} entered target {t_i} on step {self._step_num}"
|
| 501 |
+
)
|
| 502 |
+
self._event_manager.target(step=self._step_num, block_id=b_i, target_id=t_i)
|
| 503 |
+
reward += 0.49
|
| 504 |
+
|
| 505 |
+
b0_closest_target, b0_in_target = _closest_target("block")
|
| 506 |
+
b1_closest_target, b1_in_target = _closest_target("block2")
|
| 507 |
+
# reward = 0.0
|
| 508 |
+
if b0_in_target and b1_in_target and (b0_closest_target != b1_closest_target):
|
| 509 |
+
reward = 0.51
|
| 510 |
+
return reward
|
| 511 |
+
|
| 512 |
+
def _compute_goal_distance(self, state):
|
| 513 |
+
blocks = ["block", "block2"]
|
| 514 |
+
|
| 515 |
+
def _target_block_dist(target, block):
|
| 516 |
+
return np.linalg.norm(
|
| 517 |
+
state["%s_translation" % block] - state["%s_translation" % target]
|
| 518 |
+
)
|
| 519 |
+
|
| 520 |
+
def _closest_block_dist(target):
|
| 521 |
+
dists = [_target_block_dist(target, b) for b in blocks]
|
| 522 |
+
closest_dist = np.min(dists)
|
| 523 |
+
return closest_dist
|
| 524 |
+
|
| 525 |
+
t0_closest_dist = _closest_block_dist("target")
|
| 526 |
+
t1_closest_dist = _closest_block_dist("target2")
|
| 527 |
+
return np.mean([t0_closest_dist, t1_closest_dist])
|
| 528 |
+
|
| 529 |
+
@property
|
| 530 |
+
def succeeded(self):
|
| 531 |
+
state = self._compute_state()
|
| 532 |
+
reward = self._get_reward(state)
|
| 533 |
+
if reward >= 0.5:
|
| 534 |
+
return True
|
| 535 |
+
return False
|
| 536 |
+
|
| 537 |
+
def _create_observation_space(self, image_size):
|
| 538 |
+
pi2 = math.pi * 2
|
| 539 |
+
|
| 540 |
+
obs_dict = collections.OrderedDict(
|
| 541 |
+
block_translation=spaces.Box(low=-5, high=5, shape=(2,)), # x,y
|
| 542 |
+
block_orientation=spaces.Box(low=-pi2, high=pi2, shape=(1,)), # phi
|
| 543 |
+
block2_translation=spaces.Box(low=-5, high=5, shape=(2,)), # x,y
|
| 544 |
+
block2_orientation=spaces.Box(low=-pi2, high=pi2, shape=(1,)), # phi
|
| 545 |
+
effector_translation=spaces.Box(
|
| 546 |
+
low=block_pushing.WORKSPACE_BOUNDS[0] - 0.1,
|
| 547 |
+
high=block_pushing.WORKSPACE_BOUNDS[1] + 0.1,
|
| 548 |
+
), # x,y
|
| 549 |
+
effector_target_translation=spaces.Box(
|
| 550 |
+
low=block_pushing.WORKSPACE_BOUNDS[0] - 0.1,
|
| 551 |
+
high=block_pushing.WORKSPACE_BOUNDS[1] + 0.1,
|
| 552 |
+
), # x,y
|
| 553 |
+
target_translation=spaces.Box(low=-5, high=5, shape=(2,)), # x,y
|
| 554 |
+
target_orientation=spaces.Box(
|
| 555 |
+
low=-pi2,
|
| 556 |
+
high=pi2,
|
| 557 |
+
shape=(1,),
|
| 558 |
+
), # theta
|
| 559 |
+
target2_translation=spaces.Box(low=-5, high=5, shape=(2,)), # x,y
|
| 560 |
+
target2_orientation=spaces.Box(
|
| 561 |
+
low=-pi2,
|
| 562 |
+
high=pi2,
|
| 563 |
+
shape=(1,),
|
| 564 |
+
), # theta
|
| 565 |
+
)
|
| 566 |
+
if image_size is not None:
|
| 567 |
+
obs_dict["rgb"] = spaces.Box(
|
| 568 |
+
low=0, high=255, shape=(image_size[0], image_size[1], 3), dtype=np.uint8
|
| 569 |
+
)
|
| 570 |
+
return spaces.Dict(obs_dict)
|
| 571 |
+
|
| 572 |
+
def get_pybullet_state(self):
|
| 573 |
+
"""Save pybullet state of the scene.
|
| 574 |
+
|
| 575 |
+
Returns:
|
| 576 |
+
dict containing 'robots', 'robot_end_effectors', 'targets', 'objects',
|
| 577 |
+
each containing a list of ObjState.
|
| 578 |
+
"""
|
| 579 |
+
state: Dict[str, List[ObjState]] = {}
|
| 580 |
+
|
| 581 |
+
state["robots"] = [
|
| 582 |
+
XarmState.get_bullet_state(
|
| 583 |
+
self._pybullet_client,
|
| 584 |
+
self.robot.xarm,
|
| 585 |
+
target_effector_pose=self._target_effector_pose,
|
| 586 |
+
goal_translation=None,
|
| 587 |
+
)
|
| 588 |
+
]
|
| 589 |
+
|
| 590 |
+
state["robot_end_effectors"] = []
|
| 591 |
+
if self.robot.end_effector:
|
| 592 |
+
state["robot_end_effectors"].append(
|
| 593 |
+
ObjState.get_bullet_state(
|
| 594 |
+
self._pybullet_client, self.robot.end_effector
|
| 595 |
+
)
|
| 596 |
+
)
|
| 597 |
+
|
| 598 |
+
state["targets"] = []
|
| 599 |
+
if self._target_ids:
|
| 600 |
+
for target_id in self._target_ids:
|
| 601 |
+
state["targets"].append(
|
| 602 |
+
ObjState.get_bullet_state(self._pybullet_client, target_id)
|
| 603 |
+
)
|
| 604 |
+
|
| 605 |
+
state["objects"] = []
|
| 606 |
+
for obj_id in self.get_obj_ids():
|
| 607 |
+
state["objects"].append(
|
| 608 |
+
ObjState.get_bullet_state(self._pybullet_client, obj_id)
|
| 609 |
+
)
|
| 610 |
+
|
| 611 |
+
return state
|
| 612 |
+
|
| 613 |
+
def set_pybullet_state(self, state):
|
| 614 |
+
"""Restore pyullet state.
|
| 615 |
+
|
| 616 |
+
WARNING: py_environment wrapper assumes environments aren't reset in their
|
| 617 |
+
constructor and will often reset the environment unintentionally. It is
|
| 618 |
+
always recommended that you call env.reset on the tfagents wrapper before
|
| 619 |
+
playback (replaying pybullet_state).
|
| 620 |
+
|
| 621 |
+
Args:
|
| 622 |
+
state: dict containing 'robots', 'robot_end_effectors', 'targets',
|
| 623 |
+
'objects', each containing a list of ObjState.
|
| 624 |
+
"""
|
| 625 |
+
|
| 626 |
+
assert isinstance(state["robots"][0], XarmState)
|
| 627 |
+
xarm_state: XarmState = state["robots"][0]
|
| 628 |
+
xarm_state.set_bullet_state(self._pybullet_client, self.robot.xarm)
|
| 629 |
+
self._set_robot_target_effector_pose(xarm_state.target_effector_pose)
|
| 630 |
+
|
| 631 |
+
def _set_state_safe(obj_state, obj_id):
|
| 632 |
+
if obj_state is not None:
|
| 633 |
+
assert obj_id is not None, "Cannot set state for missing object."
|
| 634 |
+
obj_state.set_bullet_state(self._pybullet_client, obj_id)
|
| 635 |
+
else:
|
| 636 |
+
assert obj_id is None, f"No state found for obj_id {obj_id}"
|
| 637 |
+
|
| 638 |
+
robot_end_effectors = state["robot_end_effectors"]
|
| 639 |
+
_set_state_safe(
|
| 640 |
+
None if not robot_end_effectors else robot_end_effectors[0],
|
| 641 |
+
self.robot.end_effector,
|
| 642 |
+
)
|
| 643 |
+
|
| 644 |
+
for target_state, target_id in zip(state["targets"], self._target_ids):
|
| 645 |
+
_set_state_safe(target_state, target_id)
|
| 646 |
+
|
| 647 |
+
obj_ids = self.get_obj_ids()
|
| 648 |
+
assert len(state["objects"]) == len(obj_ids), "State length mismatch"
|
| 649 |
+
for obj_state, obj_id in zip(state["objects"], obj_ids):
|
| 650 |
+
_set_state_safe(obj_state, obj_id)
|
| 651 |
+
|
| 652 |
+
self.reset(reset_poses=False)
|
| 653 |
+
|
| 654 |
+
|
| 655 |
+
class BlockPushHorizontalMultimodal(BlockPushMultimodal):
|
| 656 |
+
def _reset_object_poses(self, workspace_center_x, workspace_center_y):
|
| 657 |
+
# Reset block poses.
|
| 658 |
+
self._reset_block_poses(workspace_center_y)
|
| 659 |
+
|
| 660 |
+
# Reset target poses.
|
| 661 |
+
self._reset_target_poses(workspace_center_y)
|
| 662 |
+
|
| 663 |
+
def _reset_block_poses(self, workspace_center_y):
|
| 664 |
+
"""Resets block poses."""
|
| 665 |
+
|
| 666 |
+
# Helper for choosing random block position.
|
| 667 |
+
def _reset_block_pose(idx, add=0.0, avoid=None):
|
| 668 |
+
def _get_random_translation():
|
| 669 |
+
block_x = 0.35 + 0.5 * self._rng.uniform(
|
| 670 |
+
low=-RANDOM_X_SHIFT, high=RANDOM_X_SHIFT
|
| 671 |
+
)
|
| 672 |
+
block_y = (
|
| 673 |
+
workspace_center_y
|
| 674 |
+
+ add
|
| 675 |
+
+ 0.5 * self._rng.uniform(low=-RANDOM_Y_SHIFT, high=RANDOM_Y_SHIFT)
|
| 676 |
+
)
|
| 677 |
+
block_translation = np.array([block_x, block_y, 0])
|
| 678 |
+
return block_translation
|
| 679 |
+
|
| 680 |
+
if avoid is None:
|
| 681 |
+
block_translation = _get_random_translation()
|
| 682 |
+
else:
|
| 683 |
+
# Reject targets too close to `avoid`.
|
| 684 |
+
for _ in range(NUM_RESET_ATTEMPTS):
|
| 685 |
+
block_translation = _get_random_translation()
|
| 686 |
+
dist = np.linalg.norm(block_translation[0] - avoid[0])
|
| 687 |
+
# print('block inner try_idx %d, dist %.3f' % (try_idx, dist))
|
| 688 |
+
if dist > MIN_BLOCK_DIST:
|
| 689 |
+
break
|
| 690 |
+
block_sampled_angle = self._rng.uniform(math.pi)
|
| 691 |
+
block_rotation = transform.Rotation.from_rotvec([0, 0, block_sampled_angle])
|
| 692 |
+
self._pybullet_client.resetBasePositionAndOrientation(
|
| 693 |
+
self._block_ids[idx],
|
| 694 |
+
block_translation.tolist(),
|
| 695 |
+
block_rotation.as_quat().tolist(),
|
| 696 |
+
)
|
| 697 |
+
return block_translation
|
| 698 |
+
|
| 699 |
+
# Reject targets too close to `avoid`.
|
| 700 |
+
for _ in range(NUM_RESET_ATTEMPTS):
|
| 701 |
+
# Reset first block.
|
| 702 |
+
add = 0.2 * self._rng.choice([-1, 1])
|
| 703 |
+
b0_translation = _reset_block_pose(0, add=add)
|
| 704 |
+
# Reset second block away from first block.
|
| 705 |
+
b1_translation = _reset_block_pose(1, add=-add, avoid=b0_translation)
|
| 706 |
+
dist = np.linalg.norm(b0_translation[0] - b1_translation[0])
|
| 707 |
+
if dist > MIN_BLOCK_DIST:
|
| 708 |
+
break
|
| 709 |
+
else:
|
| 710 |
+
raise ValueError("could not find matching block")
|
| 711 |
+
assert dist > MIN_BLOCK_DIST
|
| 712 |
+
|
| 713 |
+
def _reset_target_poses(self, workspace_center_y):
|
| 714 |
+
"""Resets target poses."""
|
| 715 |
+
|
| 716 |
+
def _reset_target_pose(idx, add=0.0, avoid=None):
|
| 717 |
+
def _get_random_translation():
|
| 718 |
+
# Choose x,y randomly.
|
| 719 |
+
target_x = 0.5 + self._rng.uniform(
|
| 720 |
+
low=-0.05 * RANDOM_X_SHIFT, high=0.05 * RANDOM_X_SHIFT
|
| 721 |
+
)
|
| 722 |
+
target_y = (
|
| 723 |
+
workspace_center_y
|
| 724 |
+
+ add
|
| 725 |
+
+ self._rng.uniform(
|
| 726 |
+
low=-0.05 * RANDOM_Y_SHIFT, high=0.05 * RANDOM_Y_SHIFT
|
| 727 |
+
)
|
| 728 |
+
)
|
| 729 |
+
target_translation = np.array([target_x, target_y, 0.020])
|
| 730 |
+
return target_translation
|
| 731 |
+
|
| 732 |
+
if avoid is None:
|
| 733 |
+
target_translation = _get_random_translation()
|
| 734 |
+
else:
|
| 735 |
+
# Reject targets too close to `avoid`.
|
| 736 |
+
for _ in range(NUM_RESET_ATTEMPTS):
|
| 737 |
+
target_translation = _get_random_translation()
|
| 738 |
+
dist = np.linalg.norm(target_translation[0] - avoid[0])
|
| 739 |
+
# print('target inner try_idx %d, dist %.3f' % (try_idx, dist))
|
| 740 |
+
if dist > MIN_TARGET_DIST:
|
| 741 |
+
break
|
| 742 |
+
target_sampled_angle = math.pi + self._rng.uniform(
|
| 743 |
+
low=-math.pi / 30, high=math.pi / 30
|
| 744 |
+
)
|
| 745 |
+
target_rotation = transform.Rotation.from_rotvec(
|
| 746 |
+
[0, 0, target_sampled_angle]
|
| 747 |
+
)
|
| 748 |
+
self._pybullet_client.resetBasePositionAndOrientation(
|
| 749 |
+
self._target_ids[idx],
|
| 750 |
+
target_translation.tolist(),
|
| 751 |
+
target_rotation.as_quat().tolist(),
|
| 752 |
+
)
|
| 753 |
+
self._target_poses[idx] = Pose3d(
|
| 754 |
+
rotation=target_rotation, translation=target_translation
|
| 755 |
+
)
|
| 756 |
+
|
| 757 |
+
if self._target_poses is None:
|
| 758 |
+
self._target_poses = [None for _ in range(len(self._target_ids))]
|
| 759 |
+
|
| 760 |
+
for _ in range(NUM_RESET_ATTEMPTS):
|
| 761 |
+
# Choose the first target.
|
| 762 |
+
add = 0.2 * self._rng.choice([-1, 1])
|
| 763 |
+
# Randomly flip the location of the targets.
|
| 764 |
+
_reset_target_pose(0, add=add)
|
| 765 |
+
_reset_target_pose(1, add=-add, avoid=self._target_poses[0].translation)
|
| 766 |
+
dist = np.linalg.norm(
|
| 767 |
+
self._target_poses[0].translation[0]
|
| 768 |
+
- self._target_poses[1].translation[0]
|
| 769 |
+
)
|
| 770 |
+
break
|
| 771 |
+
# if dist > MIN_TARGET_DIST:
|
| 772 |
+
# break
|
| 773 |
+
else:
|
| 774 |
+
raise ValueError("could not find matching target")
|
| 775 |
+
# assert dist > MIN_TARGET_DIST
|
| 776 |
+
|
| 777 |
+
|
| 778 |
+
if "BlockPushMultimodal-v0" in registration.registry.env_specs:
|
| 779 |
+
del registration.registry.env_specs["BlockPushMultimodal-v0"]
|
| 780 |
+
|
| 781 |
+
registration.register(
|
| 782 |
+
id="BlockPushMultimodal-v0", entry_point=BlockPushMultimodal, max_episode_steps=350
|
| 783 |
+
)
|
| 784 |
+
|
| 785 |
+
registration.register(
|
| 786 |
+
id="BlockPushMultimodalFlipped-v0",
|
| 787 |
+
entry_point=BlockPushHorizontalMultimodal,
|
| 788 |
+
max_episode_steps=25,
|
| 789 |
+
)
|
| 790 |
+
|
| 791 |
+
registration.register(
|
| 792 |
+
id="SharedBlockPushMultimodal-v0",
|
| 793 |
+
entry_point=BlockPushMultimodal,
|
| 794 |
+
kwargs=dict(shared_memory=True),
|
| 795 |
+
max_episode_steps=350,
|
| 796 |
+
)
|
| 797 |
+
registration.register(
|
| 798 |
+
id="BlockPushMultimodalRgb-v0",
|
| 799 |
+
entry_point=BlockPushMultimodal,
|
| 800 |
+
max_episode_steps=350,
|
| 801 |
+
kwargs=dict(image_size=(block_pushing.IMAGE_HEIGHT, block_pushing.IMAGE_WIDTH)),
|
| 802 |
+
)
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/oracles/discontinuous_push_oracle.py
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 The Reach ML Authors.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
|
| 16 |
+
"""Pushes to first target, waits, then pushes to second target."""
|
| 17 |
+
|
| 18 |
+
import diffusion_policy.env.block_pushing.oracles.oriented_push_oracle as oriented_push_oracle_module
|
| 19 |
+
import numpy as np
|
| 20 |
+
from tf_agents.trajectories import policy_step
|
| 21 |
+
from tf_agents.trajectories import time_step as ts
|
| 22 |
+
from tf_agents.typing import types
|
| 23 |
+
|
| 24 |
+
# Only used for debug visualization.
|
| 25 |
+
import pybullet # pylint: disable=unused-import
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class DiscontinuousOrientedPushOracle(oriented_push_oracle_module.OrientedPushOracle):
|
| 29 |
+
"""Pushes to first target, waits, then pushes to second target."""
|
| 30 |
+
|
| 31 |
+
def __init__(self, env, goal_tolerance=0.04, wait=0):
|
| 32 |
+
super(DiscontinuousOrientedPushOracle, self).__init__(env)
|
| 33 |
+
self._countdown = 0
|
| 34 |
+
self._wait = wait
|
| 35 |
+
self._goal_dist_tolerance = goal_tolerance
|
| 36 |
+
|
| 37 |
+
def reset(self):
|
| 38 |
+
self.phase = "move_to_pre_block"
|
| 39 |
+
self._countdown = 0
|
| 40 |
+
|
| 41 |
+
def _action(self, time_step, policy_state):
|
| 42 |
+
if time_step.is_first():
|
| 43 |
+
self.reset()
|
| 44 |
+
# Move to first target first.
|
| 45 |
+
self._current_target = "target"
|
| 46 |
+
self._has_switched = False
|
| 47 |
+
|
| 48 |
+
def _block_target_dist(block, target):
|
| 49 |
+
dist = np.linalg.norm(
|
| 50 |
+
time_step.observation["%s_translation" % block]
|
| 51 |
+
- time_step.observation["%s_translation" % target]
|
| 52 |
+
)
|
| 53 |
+
return dist
|
| 54 |
+
|
| 55 |
+
d1 = _block_target_dist("block", "target")
|
| 56 |
+
if d1 < self._goal_dist_tolerance and not self._has_switched:
|
| 57 |
+
self._countdown = self._wait
|
| 58 |
+
# If first block has been pushed to first target, switch to second block.
|
| 59 |
+
self._has_switched = True
|
| 60 |
+
self._current_target = "target2"
|
| 61 |
+
|
| 62 |
+
xy_delta = self._get_action_for_block_target(
|
| 63 |
+
time_step, block="block", target=self._current_target
|
| 64 |
+
)
|
| 65 |
+
|
| 66 |
+
if self._countdown > 0:
|
| 67 |
+
xy_delta = np.zeros_like(xy_delta)
|
| 68 |
+
self._countdown -= 1
|
| 69 |
+
|
| 70 |
+
return policy_step.PolicyStep(action=np.asarray(xy_delta, dtype=np.float32))
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/oracles/multimodal_push_oracle.py
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 The Reach ML Authors.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
|
| 16 |
+
"""Oracle for multimodal pushing task."""
|
| 17 |
+
import diffusion_policy.env.block_pushing.oracles.oriented_push_oracle as oriented_push_oracle_module
|
| 18 |
+
import numpy as np
|
| 19 |
+
from tf_agents.trajectories import policy_step
|
| 20 |
+
from tf_agents.trajectories import time_step as ts
|
| 21 |
+
from tf_agents.typing import types
|
| 22 |
+
|
| 23 |
+
# Only used for debug visualization.
|
| 24 |
+
import pybullet # pylint: disable=unused-import
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class MultimodalOrientedPushOracle(oriented_push_oracle_module.OrientedPushOracle):
|
| 28 |
+
"""Oracle for multimodal pushing task."""
|
| 29 |
+
|
| 30 |
+
def __init__(self, env, goal_dist_tolerance=0.04, action_noise_std=0.0):
|
| 31 |
+
super(MultimodalOrientedPushOracle, self).__init__(env)
|
| 32 |
+
self._goal_dist_tolerance = goal_dist_tolerance
|
| 33 |
+
self._action_noise_std = action_noise_std
|
| 34 |
+
|
| 35 |
+
def reset(self):
|
| 36 |
+
self.origin = None
|
| 37 |
+
self.first_preblock = None
|
| 38 |
+
self.phase = "move_to_pre_block"
|
| 39 |
+
|
| 40 |
+
def _get_move_to_preblock(self, xy_pre_block, xy_ee):
|
| 41 |
+
max_step_velocity = 0.3
|
| 42 |
+
# Go 5 cm away from the block, on the line between the block and target.
|
| 43 |
+
xy_delta_to_preblock = xy_pre_block - xy_ee
|
| 44 |
+
diff = np.linalg.norm(xy_delta_to_preblock)
|
| 45 |
+
if diff < 0.001:
|
| 46 |
+
self.phase = "move_to_block"
|
| 47 |
+
if self.first_preblock is None:
|
| 48 |
+
self.first_preblock = np.copy(xy_pre_block)
|
| 49 |
+
xy_delta = xy_delta_to_preblock
|
| 50 |
+
return xy_delta, max_step_velocity
|
| 51 |
+
|
| 52 |
+
def _get_action_for_block_target(self, time_step, block="block", target="target"):
|
| 53 |
+
# Specifying this as velocity makes it independent of control frequency.
|
| 54 |
+
max_step_velocity = 0.35
|
| 55 |
+
|
| 56 |
+
info = self._get_action_info(time_step, block, target)
|
| 57 |
+
|
| 58 |
+
if self.origin is None:
|
| 59 |
+
self.origin = np.copy(info.xy_ee)
|
| 60 |
+
|
| 61 |
+
if self.phase == "move_to_pre_block":
|
| 62 |
+
xy_delta, max_step_velocity = self._get_move_to_preblock(
|
| 63 |
+
info.xy_pre_block, info.xy_ee
|
| 64 |
+
)
|
| 65 |
+
|
| 66 |
+
if self.phase == "return_to_first_preblock":
|
| 67 |
+
max_step_velocity = 0.3
|
| 68 |
+
if self.first_preblock is None:
|
| 69 |
+
self.first_preblock = self.origin
|
| 70 |
+
# Return to the first preblock.
|
| 71 |
+
xy_delta_to_origin = self.first_preblock - info.xy_ee
|
| 72 |
+
diff = np.linalg.norm(xy_delta_to_origin)
|
| 73 |
+
if diff < 0.001:
|
| 74 |
+
self.phase = "return_to_origin"
|
| 75 |
+
xy_delta = xy_delta_to_origin
|
| 76 |
+
|
| 77 |
+
if self.phase == "return_to_origin":
|
| 78 |
+
max_step_velocity = 0.3
|
| 79 |
+
# Go 5 cm away from the block, on the line between the block and target.
|
| 80 |
+
xy_delta_to_origin = self.origin - info.xy_ee
|
| 81 |
+
diff = np.linalg.norm(xy_delta_to_origin)
|
| 82 |
+
if diff < 0.001:
|
| 83 |
+
self.phase = "move_to_pre_block"
|
| 84 |
+
xy_delta = xy_delta_to_origin
|
| 85 |
+
|
| 86 |
+
if self.phase == "move_to_block":
|
| 87 |
+
xy_delta = self._get_move_to_block(
|
| 88 |
+
info.xy_delta_to_nexttoblock,
|
| 89 |
+
info.theta_threshold_to_orient,
|
| 90 |
+
info.theta_error,
|
| 91 |
+
)
|
| 92 |
+
|
| 93 |
+
if self.phase == "push_block":
|
| 94 |
+
xy_delta = self._get_push_block(
|
| 95 |
+
info.theta_error,
|
| 96 |
+
info.theta_threshold_to_orient,
|
| 97 |
+
info.xy_delta_to_touchingblock,
|
| 98 |
+
)
|
| 99 |
+
|
| 100 |
+
orient_circle_diameter = 0.025
|
| 101 |
+
|
| 102 |
+
if self.phase == "orient_block_left" or self.phase == "orient_block_right":
|
| 103 |
+
max_step_velocity = 0.15
|
| 104 |
+
|
| 105 |
+
if self.phase == "orient_block_left":
|
| 106 |
+
xy_delta = self._get_orient_block_left(
|
| 107 |
+
info.xy_dir_block_to_ee,
|
| 108 |
+
orient_circle_diameter,
|
| 109 |
+
info.xy_block,
|
| 110 |
+
info.xy_ee,
|
| 111 |
+
info.theta_error,
|
| 112 |
+
info.theta_threshold_flat_enough,
|
| 113 |
+
)
|
| 114 |
+
|
| 115 |
+
if self.phase == "orient_block_right":
|
| 116 |
+
xy_delta = self._get_orient_block_right(
|
| 117 |
+
info.xy_dir_block_to_ee,
|
| 118 |
+
orient_circle_diameter,
|
| 119 |
+
info.xy_block,
|
| 120 |
+
info.xy_ee,
|
| 121 |
+
info.theta_error,
|
| 122 |
+
info.theta_threshold_flat_enough,
|
| 123 |
+
)
|
| 124 |
+
|
| 125 |
+
if self._action_noise_std != 0.0:
|
| 126 |
+
xy_delta += self._np_random_state.randn(2) * self._action_noise_std
|
| 127 |
+
|
| 128 |
+
max_step_distance = max_step_velocity * (1 / self._env.get_control_frequency())
|
| 129 |
+
length = np.linalg.norm(xy_delta)
|
| 130 |
+
if length > max_step_distance:
|
| 131 |
+
xy_direction = xy_delta / length
|
| 132 |
+
xy_delta = xy_direction * max_step_distance
|
| 133 |
+
return xy_delta
|
| 134 |
+
|
| 135 |
+
def _choose_goal_order(self):
|
| 136 |
+
"""Chooses block->target order for multimodal pushing."""
|
| 137 |
+
# Define all possible ((first_block, first_target),
|
| 138 |
+
# (second_block, second_target)).
|
| 139 |
+
possible_orders = [
|
| 140 |
+
(("block", "target"), ("block2", "target2")),
|
| 141 |
+
(("block", "target2"), ("block2", "target")),
|
| 142 |
+
(("block2", "target"), ("block", "target2")),
|
| 143 |
+
(("block2", "target2"), ("block", "target")),
|
| 144 |
+
]
|
| 145 |
+
# import pdb; pdb.set_trace()
|
| 146 |
+
# result = random.choice(possible_orders)
|
| 147 |
+
result = possible_orders[self._env._rng.choice(len(possible_orders))]
|
| 148 |
+
return result
|
| 149 |
+
|
| 150 |
+
def _action(self, time_step, policy_state):
|
| 151 |
+
if time_step.is_first():
|
| 152 |
+
self.reset()
|
| 153 |
+
(
|
| 154 |
+
(self._first_block, self._first_target),
|
| 155 |
+
(self._second_block, self._second_target),
|
| 156 |
+
) = self._choose_goal_order()
|
| 157 |
+
self._current_block, self._current_target = (
|
| 158 |
+
self._first_block,
|
| 159 |
+
self._first_target,
|
| 160 |
+
)
|
| 161 |
+
self._has_switched = False
|
| 162 |
+
|
| 163 |
+
def _block_target_dist(block, target):
|
| 164 |
+
dist = np.linalg.norm(
|
| 165 |
+
time_step.observation["%s_translation" % block]
|
| 166 |
+
- time_step.observation["%s_translation" % target]
|
| 167 |
+
)
|
| 168 |
+
return dist
|
| 169 |
+
|
| 170 |
+
if (
|
| 171 |
+
_block_target_dist(self._first_block, self._first_target)
|
| 172 |
+
< self._goal_dist_tolerance
|
| 173 |
+
and not self._has_switched
|
| 174 |
+
):
|
| 175 |
+
# If first block has been pushed to first target, switch to second block.
|
| 176 |
+
self._current_block, self._current_target = (
|
| 177 |
+
self._second_block,
|
| 178 |
+
self._second_target,
|
| 179 |
+
)
|
| 180 |
+
self._has_switched = True
|
| 181 |
+
self.phase = "return_to_first_preblock"
|
| 182 |
+
|
| 183 |
+
xy_delta = self._get_action_for_block_target(
|
| 184 |
+
time_step, block=self._current_block, target=self._current_target
|
| 185 |
+
)
|
| 186 |
+
|
| 187 |
+
return policy_step.PolicyStep(action=np.asarray(xy_delta, dtype=np.float32))
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/oracles/oriented_push_oracle.py
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 The Reach ML Authors.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
|
| 16 |
+
"""Oracle for pushing task which orients the block then pushes it."""
|
| 17 |
+
|
| 18 |
+
import diffusion_policy.env.block_pushing.oracles.pushing_info as pushing_info_module
|
| 19 |
+
import numpy as np
|
| 20 |
+
from tf_agents.policies import py_policy
|
| 21 |
+
from tf_agents.trajectories import policy_step
|
| 22 |
+
from tf_agents.trajectories import time_step as ts
|
| 23 |
+
from tf_agents.typing import types
|
| 24 |
+
|
| 25 |
+
# Only used for debug visualization.
|
| 26 |
+
import pybullet # pylint: disable=unused-import
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
class OrientedPushOracle(py_policy.PyPolicy):
|
| 30 |
+
"""Oracle for pushing task which orients the block then pushes it."""
|
| 31 |
+
|
| 32 |
+
def __init__(self, env, action_noise_std=0.0):
|
| 33 |
+
super(OrientedPushOracle, self).__init__(
|
| 34 |
+
env.time_step_spec(), env.action_spec()
|
| 35 |
+
)
|
| 36 |
+
self._env = env
|
| 37 |
+
self._np_random_state = np.random.RandomState(0)
|
| 38 |
+
self.phase = "move_to_pre_block"
|
| 39 |
+
self._action_noise_std = action_noise_std
|
| 40 |
+
|
| 41 |
+
def reset(self):
|
| 42 |
+
self.phase = "move_to_pre_block"
|
| 43 |
+
|
| 44 |
+
def get_theta_from_vector(self, vector):
|
| 45 |
+
return np.arctan2(vector[1], vector[0])
|
| 46 |
+
|
| 47 |
+
def theta_to_rotation2d(self, theta):
|
| 48 |
+
r = np.array([[np.cos(theta), -np.sin(theta)], [np.sin(theta), np.cos(theta)]])
|
| 49 |
+
return r
|
| 50 |
+
|
| 51 |
+
def rotate(self, theta, xy_dir_block_to_ee):
|
| 52 |
+
rot_2d = self.theta_to_rotation2d(theta)
|
| 53 |
+
return rot_2d @ xy_dir_block_to_ee
|
| 54 |
+
|
| 55 |
+
def _get_action_info(self, time_step, block, target):
|
| 56 |
+
xy_block = time_step.observation["%s_translation" % block][:2]
|
| 57 |
+
theta_block = time_step.observation["%s_orientation" % block]
|
| 58 |
+
xy_target = time_step.observation["%s_translation" % target][:2]
|
| 59 |
+
xy_ee = time_step.observation["effector_target_translation"][:2]
|
| 60 |
+
|
| 61 |
+
xy_block_to_target = xy_target - xy_block
|
| 62 |
+
xy_dir_block_to_target = (xy_block_to_target) / np.linalg.norm(
|
| 63 |
+
xy_block_to_target
|
| 64 |
+
)
|
| 65 |
+
theta_to_target = self.get_theta_from_vector(xy_dir_block_to_target)
|
| 66 |
+
|
| 67 |
+
theta_error = theta_to_target - theta_block
|
| 68 |
+
# Block has 4-way symmetry.
|
| 69 |
+
while theta_error > np.pi / 4:
|
| 70 |
+
theta_error -= np.pi / 2.0
|
| 71 |
+
while theta_error < -np.pi / 4:
|
| 72 |
+
theta_error += np.pi / 2.0
|
| 73 |
+
|
| 74 |
+
xy_pre_block = xy_block + -xy_dir_block_to_target * 0.05
|
| 75 |
+
xy_nexttoblock = xy_block + -xy_dir_block_to_target * 0.03
|
| 76 |
+
xy_touchingblock = xy_block + -xy_dir_block_to_target * 0.01
|
| 77 |
+
xy_delta_to_nexttoblock = xy_nexttoblock - xy_ee
|
| 78 |
+
xy_delta_to_touchingblock = xy_touchingblock - xy_ee
|
| 79 |
+
|
| 80 |
+
xy_block_to_ee = xy_ee - xy_block
|
| 81 |
+
xy_dir_block_to_ee = xy_block_to_ee / np.linalg.norm(xy_block_to_ee)
|
| 82 |
+
|
| 83 |
+
theta_threshold_to_orient = 0.2
|
| 84 |
+
theta_threshold_flat_enough = 0.03
|
| 85 |
+
return pushing_info_module.PushingInfo(
|
| 86 |
+
xy_block=xy_block,
|
| 87 |
+
xy_ee=xy_ee,
|
| 88 |
+
xy_pre_block=xy_pre_block,
|
| 89 |
+
xy_delta_to_nexttoblock=xy_delta_to_nexttoblock,
|
| 90 |
+
xy_delta_to_touchingblock=xy_delta_to_touchingblock,
|
| 91 |
+
xy_dir_block_to_ee=xy_dir_block_to_ee,
|
| 92 |
+
theta_threshold_to_orient=theta_threshold_to_orient,
|
| 93 |
+
theta_threshold_flat_enough=theta_threshold_flat_enough,
|
| 94 |
+
theta_error=theta_error,
|
| 95 |
+
)
|
| 96 |
+
|
| 97 |
+
def _get_move_to_preblock(self, xy_pre_block, xy_ee):
|
| 98 |
+
max_step_velocity = 0.3
|
| 99 |
+
# Go 5 cm away from the block, on the line between the block and target.
|
| 100 |
+
xy_delta_to_preblock = xy_pre_block - xy_ee
|
| 101 |
+
diff = np.linalg.norm(xy_delta_to_preblock)
|
| 102 |
+
if diff < 0.001:
|
| 103 |
+
self.phase = "move_to_block"
|
| 104 |
+
xy_delta = xy_delta_to_preblock
|
| 105 |
+
return xy_delta, max_step_velocity
|
| 106 |
+
|
| 107 |
+
def _get_move_to_block(
|
| 108 |
+
self, xy_delta_to_nexttoblock, theta_threshold_to_orient, theta_error
|
| 109 |
+
):
|
| 110 |
+
diff = np.linalg.norm(xy_delta_to_nexttoblock)
|
| 111 |
+
if diff < 0.001:
|
| 112 |
+
self.phase = "push_block"
|
| 113 |
+
# If need to re-oorient, then re-orient.
|
| 114 |
+
if theta_error > theta_threshold_to_orient:
|
| 115 |
+
self.phase = "orient_block_left"
|
| 116 |
+
if theta_error < -theta_threshold_to_orient:
|
| 117 |
+
self.phase = "orient_block_right"
|
| 118 |
+
# Otherwise, push into the block.
|
| 119 |
+
xy_delta = xy_delta_to_nexttoblock
|
| 120 |
+
return xy_delta
|
| 121 |
+
|
| 122 |
+
def _get_push_block(
|
| 123 |
+
self, theta_error, theta_threshold_to_orient, xy_delta_to_touchingblock
|
| 124 |
+
):
|
| 125 |
+
# If need to reorient, go back to move_to_pre_block, move_to_block first.
|
| 126 |
+
if theta_error > theta_threshold_to_orient:
|
| 127 |
+
self.phase = "move_to_pre_block"
|
| 128 |
+
if theta_error < -theta_threshold_to_orient:
|
| 129 |
+
self.phase = "move_to_pre_block"
|
| 130 |
+
xy_delta = xy_delta_to_touchingblock
|
| 131 |
+
return xy_delta
|
| 132 |
+
|
| 133 |
+
def _get_orient_block_left(
|
| 134 |
+
self,
|
| 135 |
+
xy_dir_block_to_ee,
|
| 136 |
+
orient_circle_diameter,
|
| 137 |
+
xy_block,
|
| 138 |
+
xy_ee,
|
| 139 |
+
theta_error,
|
| 140 |
+
theta_threshold_flat_enough,
|
| 141 |
+
):
|
| 142 |
+
xy_dir_block_to_ee = self.rotate(0.2, xy_dir_block_to_ee)
|
| 143 |
+
xy_block_to_ee = xy_dir_block_to_ee * orient_circle_diameter
|
| 144 |
+
xy_push_left_spot = xy_block + xy_block_to_ee
|
| 145 |
+
xy_delta = xy_push_left_spot - xy_ee
|
| 146 |
+
if theta_error < theta_threshold_flat_enough:
|
| 147 |
+
self.phase = "move_to_pre_block"
|
| 148 |
+
return xy_delta
|
| 149 |
+
|
| 150 |
+
def _get_orient_block_right(
|
| 151 |
+
self,
|
| 152 |
+
xy_dir_block_to_ee,
|
| 153 |
+
orient_circle_diameter,
|
| 154 |
+
xy_block,
|
| 155 |
+
xy_ee,
|
| 156 |
+
theta_error,
|
| 157 |
+
theta_threshold_flat_enough,
|
| 158 |
+
):
|
| 159 |
+
xy_dir_block_to_ee = self.rotate(-0.2, xy_dir_block_to_ee)
|
| 160 |
+
xy_block_to_ee = xy_dir_block_to_ee * orient_circle_diameter
|
| 161 |
+
xy_push_left_spot = xy_block + xy_block_to_ee
|
| 162 |
+
xy_delta = xy_push_left_spot - xy_ee
|
| 163 |
+
if theta_error > -theta_threshold_flat_enough:
|
| 164 |
+
self.phase = "move_to_pre_block"
|
| 165 |
+
return xy_delta
|
| 166 |
+
|
| 167 |
+
def _get_action_for_block_target(self, time_step, block="block", target="target"):
|
| 168 |
+
# Specifying this as velocity makes it independent of control frequency.
|
| 169 |
+
max_step_velocity = 0.35
|
| 170 |
+
info = self._get_action_info(time_step, block, target)
|
| 171 |
+
|
| 172 |
+
if self.phase == "move_to_pre_block":
|
| 173 |
+
xy_delta, max_step_velocity = self._get_move_to_preblock(
|
| 174 |
+
info.xy_pre_block, info.xy_ee
|
| 175 |
+
)
|
| 176 |
+
|
| 177 |
+
if self.phase == "move_to_block":
|
| 178 |
+
xy_delta = self._get_move_to_block(
|
| 179 |
+
info.xy_delta_to_nexttoblock,
|
| 180 |
+
info.theta_threshold_to_orient,
|
| 181 |
+
info.theta_error,
|
| 182 |
+
)
|
| 183 |
+
|
| 184 |
+
if self.phase == "push_block":
|
| 185 |
+
xy_delta = self._get_push_block(
|
| 186 |
+
info.theta_error,
|
| 187 |
+
info.theta_threshold_to_orient,
|
| 188 |
+
info.xy_delta_to_touchingblock,
|
| 189 |
+
)
|
| 190 |
+
|
| 191 |
+
orient_circle_diameter = 0.025
|
| 192 |
+
|
| 193 |
+
if self.phase == "orient_block_left" or self.phase == "orient_block_right":
|
| 194 |
+
max_step_velocity = 0.15
|
| 195 |
+
|
| 196 |
+
if self.phase == "orient_block_left":
|
| 197 |
+
xy_delta = self._get_orient_block_left(
|
| 198 |
+
info.xy_dir_block_to_ee,
|
| 199 |
+
orient_circle_diameter,
|
| 200 |
+
info.xy_block,
|
| 201 |
+
info.xy_ee,
|
| 202 |
+
info.theta_error,
|
| 203 |
+
info.theta_threshold_flat_enough,
|
| 204 |
+
)
|
| 205 |
+
|
| 206 |
+
if self.phase == "orient_block_right":
|
| 207 |
+
xy_delta = self._get_orient_block_right(
|
| 208 |
+
info.xy_dir_block_to_ee,
|
| 209 |
+
orient_circle_diameter,
|
| 210 |
+
info.xy_block,
|
| 211 |
+
info.xy_ee,
|
| 212 |
+
info.theta_error,
|
| 213 |
+
info.theta_threshold_flat_enough,
|
| 214 |
+
)
|
| 215 |
+
|
| 216 |
+
if self._action_noise_std != 0.0:
|
| 217 |
+
xy_delta += self._np_random_state.randn(2) * self._action_noise_std
|
| 218 |
+
|
| 219 |
+
max_step_distance = max_step_velocity * (1 / self._env.get_control_frequency())
|
| 220 |
+
length = np.linalg.norm(xy_delta)
|
| 221 |
+
if length > max_step_distance:
|
| 222 |
+
xy_direction = xy_delta / length
|
| 223 |
+
xy_delta = xy_direction * max_step_distance
|
| 224 |
+
return xy_delta
|
| 225 |
+
|
| 226 |
+
def _action(self, time_step, policy_state):
|
| 227 |
+
if time_step.is_first():
|
| 228 |
+
self.reset()
|
| 229 |
+
xy_delta = self._get_action_for_block_target(
|
| 230 |
+
time_step, block="block", target="target"
|
| 231 |
+
)
|
| 232 |
+
return policy_step.PolicyStep(action=np.asarray(xy_delta, dtype=np.float32))
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
class OrientedPushNormalizedOracle(py_policy.PyPolicy):
|
| 236 |
+
"""Oracle for pushing task which orients the block then pushes it."""
|
| 237 |
+
|
| 238 |
+
def __init__(self, env):
|
| 239 |
+
super(OrientedPushNormalizedOracle, self).__init__(
|
| 240 |
+
env.time_step_spec(), env.action_spec()
|
| 241 |
+
)
|
| 242 |
+
self._oracle = OrientedPushOracle(env)
|
| 243 |
+
self._env = env
|
| 244 |
+
|
| 245 |
+
def reset(self):
|
| 246 |
+
self._oracle.reset()
|
| 247 |
+
|
| 248 |
+
def _action(self, time_step, policy_state):
|
| 249 |
+
time_step = time_step._asdict()
|
| 250 |
+
time_step["observation"] = self._env.calc_unnormalized_state(
|
| 251 |
+
time_step["observation"]
|
| 252 |
+
)
|
| 253 |
+
step = self._oracle._action(
|
| 254 |
+
ts.TimeStep(**time_step), policy_state
|
| 255 |
+
) # pylint: disable=protected-access
|
| 256 |
+
return policy_step.PolicyStep(
|
| 257 |
+
action=self._env.calc_normalized_action(step.action)
|
| 258 |
+
)
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/oracles/pushing_info.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 The Reach ML Authors.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
|
| 16 |
+
"""Dataclass holding info needed for pushing oracles."""
|
| 17 |
+
import dataclasses
|
| 18 |
+
from typing import Any
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
@dataclasses.dataclass
|
| 22 |
+
class PushingInfo:
|
| 23 |
+
"""Holds onto info necessary for pushing state machine."""
|
| 24 |
+
|
| 25 |
+
xy_block: Any = None
|
| 26 |
+
xy_ee: Any = None
|
| 27 |
+
xy_pre_block: Any = None
|
| 28 |
+
xy_delta_to_nexttoblock: Any = None
|
| 29 |
+
xy_delta_to_touchingblock: Any = None
|
| 30 |
+
xy_dir_block_to_ee: Any = None
|
| 31 |
+
theta_threshold_to_orient: Any = None
|
| 32 |
+
theta_threshold_flat_enough: Any = None
|
| 33 |
+
theta_error: Any = None
|
| 34 |
+
obstacle_poses: Any = None
|
| 35 |
+
distance_to_target: Any = None
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/oracles/reach_oracle.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 The Reach ML Authors.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
|
| 16 |
+
"""Reach oracle."""
|
| 17 |
+
import numpy as np
|
| 18 |
+
from tf_agents.policies import py_policy
|
| 19 |
+
from tf_agents.trajectories import policy_step
|
| 20 |
+
from tf_agents.trajectories import time_step as ts
|
| 21 |
+
from tf_agents.typing import types
|
| 22 |
+
|
| 23 |
+
# Only used for debug visualization.
|
| 24 |
+
import pybullet # pylint: disable=unused-import
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class ReachOracle(py_policy.PyPolicy):
|
| 28 |
+
"""Oracle for moving to a specific spot relative to the block and target."""
|
| 29 |
+
|
| 30 |
+
def __init__(self, env, block_pushing_oracles_action_std=0.0):
|
| 31 |
+
super(ReachOracle, self).__init__(env.time_step_spec(), env.action_spec())
|
| 32 |
+
self._env = env
|
| 33 |
+
self._np_random_state = np.random.RandomState(0)
|
| 34 |
+
self._block_pushing_oracles_action_std = block_pushing_oracles_action_std
|
| 35 |
+
|
| 36 |
+
def _action(self, time_step, policy_state):
|
| 37 |
+
|
| 38 |
+
# Specifying this as velocity makes it independent of control frequency.
|
| 39 |
+
max_step_velocity = 0.2
|
| 40 |
+
|
| 41 |
+
xy_ee = time_step.observation["effector_target_translation"]
|
| 42 |
+
|
| 43 |
+
# This should be observable from block and target translation,
|
| 44 |
+
# but re-using the computation from the env so that it's only done once, and
|
| 45 |
+
# used for reward / completion computation.
|
| 46 |
+
xy_pre_block = self._env.reach_target_translation
|
| 47 |
+
|
| 48 |
+
xy_delta = xy_pre_block - xy_ee
|
| 49 |
+
|
| 50 |
+
if self._block_pushing_oracles_action_std != 0.0:
|
| 51 |
+
xy_delta += (
|
| 52 |
+
self._np_random_state.randn(2) * self._block_pushing_oracles_action_std
|
| 53 |
+
)
|
| 54 |
+
|
| 55 |
+
max_step_distance = max_step_velocity * (1 / self._env.get_control_frequency())
|
| 56 |
+
length = np.linalg.norm(xy_delta)
|
| 57 |
+
if length > max_step_distance:
|
| 58 |
+
xy_direction = xy_delta / length
|
| 59 |
+
xy_delta = xy_direction * max_step_distance
|
| 60 |
+
|
| 61 |
+
return policy_step.PolicyStep(action=np.asarray(xy_delta, dtype=np.float32))
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/utils/pose3d.py
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 The Reach ML Authors.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
|
| 16 |
+
"""A simple 6DOF pose container.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
import dataclasses
|
| 20 |
+
import numpy as np
|
| 21 |
+
from scipy.spatial import transform
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class NoCopyAsDict(object):
|
| 25 |
+
"""Base class for dataclasses. Avoids a copy in the asdict() call."""
|
| 26 |
+
|
| 27 |
+
def asdict(self):
|
| 28 |
+
"""Replacement for dataclasses.asdict.
|
| 29 |
+
|
| 30 |
+
TF Dataset does not handle dataclasses.asdict, which uses copy.deepcopy when
|
| 31 |
+
setting values in the output dict. This causes issues with tf.Dataset.
|
| 32 |
+
Instead, shallow copy contents.
|
| 33 |
+
|
| 34 |
+
Returns:
|
| 35 |
+
dict containing contents of dataclass.
|
| 36 |
+
"""
|
| 37 |
+
return {k.name: getattr(self, k.name) for k in dataclasses.fields(self)}
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
@dataclasses.dataclass
|
| 41 |
+
class Pose3d(NoCopyAsDict):
|
| 42 |
+
"""Simple container for translation and rotation."""
|
| 43 |
+
|
| 44 |
+
rotation: transform.Rotation
|
| 45 |
+
translation: np.ndarray
|
| 46 |
+
|
| 47 |
+
@property
|
| 48 |
+
def vec7(self):
|
| 49 |
+
return np.concatenate([self.translation, self.rotation.as_quat()])
|
| 50 |
+
|
| 51 |
+
def serialize(self):
|
| 52 |
+
return {
|
| 53 |
+
"rotation": self.rotation.as_quat().tolist(),
|
| 54 |
+
"translation": self.translation.tolist(),
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
@staticmethod
|
| 58 |
+
def deserialize(data):
|
| 59 |
+
return Pose3d(
|
| 60 |
+
rotation=transform.Rotation.from_quat(data["rotation"]),
|
| 61 |
+
translation=np.array(data["translation"]),
|
| 62 |
+
)
|
| 63 |
+
|
| 64 |
+
def __eq__(self, other):
|
| 65 |
+
return np.array_equal(
|
| 66 |
+
self.rotation.as_quat(), other.rotation.as_quat()
|
| 67 |
+
) and np.array_equal(self.translation, other.translation)
|
| 68 |
+
|
| 69 |
+
def __ne__(self, other):
|
| 70 |
+
return not self.__eq__(other)
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/utils/utils_pybullet.py
ADDED
|
@@ -0,0 +1,451 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 The Reach ML Authors.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
|
| 16 |
+
"""Assortment of utilities to interact with bullet within g3."""
|
| 17 |
+
import dataclasses
|
| 18 |
+
import datetime
|
| 19 |
+
import getpass
|
| 20 |
+
import gzip
|
| 21 |
+
import json
|
| 22 |
+
import os
|
| 23 |
+
import time
|
| 24 |
+
from typing import Any, Dict, List, Optional, Tuple
|
| 25 |
+
|
| 26 |
+
from absl import logging
|
| 27 |
+
from diffusion_policy.env.block_pushing.utils.pose3d import Pose3d
|
| 28 |
+
import numpy as np
|
| 29 |
+
from scipy.spatial import transform
|
| 30 |
+
import six
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
import pybullet
|
| 34 |
+
import pybullet_data
|
| 35 |
+
import pybullet_utils.bullet_client as bullet_client
|
| 36 |
+
|
| 37 |
+
Vec3 = Tuple[float, float, float]
|
| 38 |
+
Vec4 = Tuple[float, float, float, float]
|
| 39 |
+
PYBULLET_STATE_VERSION = 2 # Basic versioning of serialized pybullet state.
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
# Note about rotation_to_matrix and matrix_to_rotation below:
|
| 43 |
+
# The abstractions below allow us to use older versions of scipy.
|
| 44 |
+
def rotation_to_matrix(rotation):
|
| 45 |
+
if hasattr(rotation, "as_dcm"):
|
| 46 |
+
return rotation.as_dcm()
|
| 47 |
+
else:
|
| 48 |
+
assert hasattr(rotation, "as_matrix")
|
| 49 |
+
return rotation.as_matrix()
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
def matrix_to_rotation(matrix):
|
| 53 |
+
if hasattr(transform.Rotation, "from_dcm"):
|
| 54 |
+
return transform.Rotation.from_dcm(matrix)
|
| 55 |
+
else:
|
| 56 |
+
assert hasattr(transform.Rotation, "from_matrix")
|
| 57 |
+
return transform.Rotation.from_matrix(matrix)
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def load_urdf(pybullet_client, file_path, *args, **kwargs):
|
| 61 |
+
"""Loads the given URDF filepath."""
|
| 62 |
+
|
| 63 |
+
# Handles most general file open case.
|
| 64 |
+
try:
|
| 65 |
+
if os.path.exists(file_path):
|
| 66 |
+
return pybullet_client.loadURDF(file_path, *args, **kwargs)
|
| 67 |
+
except pybullet_client.error:
|
| 68 |
+
pass
|
| 69 |
+
|
| 70 |
+
try:
|
| 71 |
+
import pathlib
|
| 72 |
+
asset_path = str(pathlib.Path(__file__).parent.parent.joinpath('assets'))
|
| 73 |
+
if file_path.startswith("third_party/py/envs/assets/"):
|
| 74 |
+
pybullet_client.setAdditionalSearchPath(asset_path)
|
| 75 |
+
file_path = file_path[len("third_party/py/envs/assets/") :]
|
| 76 |
+
if file_path.startswith(
|
| 77 |
+
"third_party/bullet/examples/pybullet/gym/pybullet_data/"
|
| 78 |
+
):
|
| 79 |
+
pybullet_client.setAdditionalSearchPath(pybullet_data.getDataPath())
|
| 80 |
+
file_path = file_path[55:]
|
| 81 |
+
# logging.info("Loading URDF %s", file_path)
|
| 82 |
+
return pybullet_client.loadURDF(file_path, *args, **kwargs)
|
| 83 |
+
except pybullet.error:
|
| 84 |
+
raise FileNotFoundError("Cannot load the URDF file {}".format(file_path))
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
def add_visual_sphere(client, center=(0, 0, 0), radius=0.1, rgba=(0.5, 0.5, 0.5, 0.5)):
|
| 88 |
+
"""Add a sphere to bullet scene (visual only, no physics).
|
| 89 |
+
|
| 90 |
+
Args:
|
| 91 |
+
client: pybullet client (or pybullet library handle).
|
| 92 |
+
center: Center of sphere.
|
| 93 |
+
radius: Sphere radius.
|
| 94 |
+
rgba: rgba color of sphere.
|
| 95 |
+
|
| 96 |
+
Returns:
|
| 97 |
+
Unique integer bullet id of constructed object.
|
| 98 |
+
"""
|
| 99 |
+
vis_obj_id = client.createVisualShape(
|
| 100 |
+
client.GEOM_SPHERE, radius=radius, rgbaColor=rgba
|
| 101 |
+
)
|
| 102 |
+
obj_id = client.createMultiBody(
|
| 103 |
+
baseCollisionShapeIndex=-1, baseVisualShapeIndex=vis_obj_id, basePosition=center
|
| 104 |
+
)
|
| 105 |
+
return obj_id
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
def pybullet_mat_to_numpy_4x4(pybullet_matrix):
|
| 109 |
+
assert len(pybullet_matrix) == 16, "pybullet matrix should be len 16"
|
| 110 |
+
return np.transpose(np.reshape(np.array(pybullet_matrix, dtype=np.float64), (4, 4)))
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
def decompose_view_matrix(pybullet_view_matrix):
|
| 114 |
+
"""Decompose view matrix into pos + quat format (assumes mat is rigid!)."""
|
| 115 |
+
# It would be MUCH better to use something from bullet, however pybullet does
|
| 116 |
+
# not expose all of the linear algebra library.
|
| 117 |
+
mat = pybullet_mat_to_numpy_4x4(pybullet_view_matrix)
|
| 118 |
+
|
| 119 |
+
# View matrix is now:
|
| 120 |
+
# | R_11 R_12 R_13 t_1 |
|
| 121 |
+
# | R_21 R_22 R_23 t_2 |
|
| 122 |
+
# | R_31 R_32 R_33 t_3 |
|
| 123 |
+
# | 0 0 0 1 |
|
| 124 |
+
|
| 125 |
+
# R is the inverse eye to target at orientation, and t is R * eye.
|
| 126 |
+
mat_view_to_world = np.linalg.inv(mat)
|
| 127 |
+
|
| 128 |
+
# mat_view_to_world is the view to world transform, therefore the translation
|
| 129 |
+
# component of this matrix is simply the world space position (since mat *
|
| 130 |
+
# (0, 0, 0, 1)) is just copying the right column.
|
| 131 |
+
world_xyz_view = np.copy(mat_view_to_world[0:3, 3])
|
| 132 |
+
|
| 133 |
+
mat_view_to_world[0:3, 3] = 0 # Zero out the position change.
|
| 134 |
+
world_quat_view = matrix_to_rotation(mat_view_to_world).as_quat()
|
| 135 |
+
|
| 136 |
+
return world_xyz_view, world_quat_view
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
def world_obj_to_view(world_xyz_obj, world_quat_obj, camera_view, client):
|
| 140 |
+
"""Transform object into view space."""
|
| 141 |
+
world_xyz_view, world_quat_view = decompose_view_matrix(camera_view)
|
| 142 |
+
view_xyz_world, view_quat_world = client.invertTransform(
|
| 143 |
+
world_xyz_view, world_quat_view
|
| 144 |
+
)
|
| 145 |
+
view_xyz_obj, view_quat_obj = client.multiplyTransforms(
|
| 146 |
+
view_xyz_world, view_quat_world, world_xyz_obj, world_quat_obj
|
| 147 |
+
)
|
| 148 |
+
|
| 149 |
+
return view_xyz_obj, view_quat_obj
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
def image_xy_to_view_ray(xy, cam_width, cam_height, proj_mat_inv):
|
| 153 |
+
"""Calculate view-space ray from pixel location."""
|
| 154 |
+
# Recall (from http://www.songho.ca/opengl/gl_projectionmatrix.html):
|
| 155 |
+
# xyzw_clip = M_proj * xyzw_eye, and
|
| 156 |
+
# xyz_ndc = xyzw_clip[0:3] / xwzw_clip[3].
|
| 157 |
+
xyz_ndc = np.array(
|
| 158 |
+
[2.0 * xy[0] / cam_width - 1.0, -(2.0 * xy[1] / cam_height - 1.0), 0]
|
| 159 |
+
) # in [-1, 1]
|
| 160 |
+
xyzw_clip = np.concatenate([xyz_ndc, [1]])
|
| 161 |
+
xyzw_eye = proj_mat_inv @ xyzw_clip
|
| 162 |
+
origin = np.zeros(3)
|
| 163 |
+
vec = xyzw_eye[:3] / max(np.linalg.norm(xyzw_eye[:3]), 1e-6)
|
| 164 |
+
return origin, vec
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
def view_ray_to_world_ray(origin, vec, view_mat_inv):
|
| 168 |
+
"""Transform view-space ray into world space."""
|
| 169 |
+
origin = view_mat_inv @ np.concatenate([origin, [1]])
|
| 170 |
+
vec = view_mat_inv @ np.concatenate([vec, [0]])
|
| 171 |
+
|
| 172 |
+
return origin[:3], vec[:3]
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
def ray_to_plane_test(ray_origin, ray_vec, plane_origin, plane_normal):
|
| 176 |
+
"""Perform a ray-plane intersection test."""
|
| 177 |
+
ln = np.dot(plane_normal, ray_vec)
|
| 178 |
+
if abs(ln) < np.finfo(np.float32).eps:
|
| 179 |
+
return None
|
| 180 |
+
|
| 181 |
+
# Solve for the intersection fraction t.
|
| 182 |
+
t = np.dot(plane_normal, plane_origin - ray_origin) / ln
|
| 183 |
+
if t >= 0:
|
| 184 |
+
return ray_origin + ray_vec * t
|
| 185 |
+
else:
|
| 186 |
+
return None
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
def get_workspace(env):
|
| 190 |
+
(
|
| 191 |
+
workspace_origin,
|
| 192 |
+
workspace_quat,
|
| 193 |
+
) = env.pybullet_client.getBasePositionAndOrientation(env.workspace_uid)
|
| 194 |
+
workspace_normal = rotation_to_matrix(transform.Rotation.from_quat(workspace_quat))[
|
| 195 |
+
2, 0:3
|
| 196 |
+
]
|
| 197 |
+
|
| 198 |
+
return workspace_origin, workspace_normal
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
def reset_camera_pose(env, view_type):
|
| 202 |
+
"""Reset camera pose to canonical frame."""
|
| 203 |
+
p = env.pybullet_client
|
| 204 |
+
|
| 205 |
+
if view_type == "POLICY":
|
| 206 |
+
camera_info = p.getDebugVisualizerCamera()
|
| 207 |
+
image_size = (camera_info[0], camera_info[1])
|
| 208 |
+
|
| 209 |
+
viewm, _, front_position, lookat, _ = env.calc_camera_params(image_size)
|
| 210 |
+
|
| 211 |
+
euler = matrix_to_rotation(pybullet_mat_to_numpy_4x4(viewm)[0:3, 0:3]).as_euler(
|
| 212 |
+
"xyz", degrees=False
|
| 213 |
+
)
|
| 214 |
+
pitch = euler[1]
|
| 215 |
+
yaw = -euler[2]
|
| 216 |
+
# The distance is a bit far away (the GL view has higher FOV).
|
| 217 |
+
distance = np.linalg.norm(front_position - lookat) * 0.6
|
| 218 |
+
elif view_type == "TOP_DOWN":
|
| 219 |
+
workspace_origin, _ = get_workspace(env)
|
| 220 |
+
distance = 0.5
|
| 221 |
+
lookat = workspace_origin
|
| 222 |
+
yaw = np.pi / 2
|
| 223 |
+
# Note: pi/2 pitch results in gimble lock and pybullet doesn't support it.
|
| 224 |
+
pitch = -(np.pi / 2 - 1e-5)
|
| 225 |
+
else:
|
| 226 |
+
raise ValueError("unsupported view_type %s" % view_type)
|
| 227 |
+
p.resetDebugVisualizerCamera(
|
| 228 |
+
cameraDistance=distance,
|
| 229 |
+
cameraYaw=360 * yaw / (2.0 * np.pi),
|
| 230 |
+
cameraPitch=360 * pitch / (2.0 * np.pi),
|
| 231 |
+
cameraTargetPosition=lookat,
|
| 232 |
+
)
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
def _lists_to_tuple(obj):
|
| 236 |
+
if isinstance(obj, list):
|
| 237 |
+
return tuple([_lists_to_tuple(v) for v in obj])
|
| 238 |
+
else:
|
| 239 |
+
return obj
|
| 240 |
+
|
| 241 |
+
|
| 242 |
+
@dataclasses.dataclass
|
| 243 |
+
class ObjState:
|
| 244 |
+
"""A container for storing pybullet object state."""
|
| 245 |
+
|
| 246 |
+
obj_id: int
|
| 247 |
+
|
| 248 |
+
# base_pose: (xyz, quat).
|
| 249 |
+
base_pose: Tuple[Vec3, Vec4]
|
| 250 |
+
# base_vel: (vel, ang_vel).
|
| 251 |
+
base_vel: Tuple[Vec3, Vec3]
|
| 252 |
+
joint_info: Any
|
| 253 |
+
joint_state: Any
|
| 254 |
+
|
| 255 |
+
@staticmethod
|
| 256 |
+
def get_bullet_state(client, obj_id):
|
| 257 |
+
"""Read Pybullet internal state."""
|
| 258 |
+
base_pose = client.getBasePositionAndOrientation(obj_id)
|
| 259 |
+
base_vel = client.getBaseVelocity(obj_id)
|
| 260 |
+
|
| 261 |
+
joint_info = []
|
| 262 |
+
joint_state = []
|
| 263 |
+
for i in range(client.getNumJoints(obj_id)):
|
| 264 |
+
joint_state.append(client.getJointState(obj_id, i))
|
| 265 |
+
joint_info.append(ObjState._get_joint_info(client, obj_id, i))
|
| 266 |
+
|
| 267 |
+
return ObjState(
|
| 268 |
+
obj_id=obj_id,
|
| 269 |
+
base_pose=base_pose,
|
| 270 |
+
base_vel=base_vel,
|
| 271 |
+
joint_info=tuple(joint_info),
|
| 272 |
+
joint_state=tuple(joint_state),
|
| 273 |
+
)
|
| 274 |
+
|
| 275 |
+
@staticmethod
|
| 276 |
+
def _get_joint_info(client, obj_id, joint_index):
|
| 277 |
+
ji = client.getJointInfo(obj_id, joint_index)
|
| 278 |
+
return tuple([v if not isinstance(v, bytes) else v.decode("utf-8") for v in ji])
|
| 279 |
+
|
| 280 |
+
def set_bullet_state(self, client, obj_id):
|
| 281 |
+
"""Hard set the current bullet state."""
|
| 282 |
+
xyz, quat = self.base_pose
|
| 283 |
+
client.resetBasePositionAndOrientation(obj_id, xyz, quat)
|
| 284 |
+
vel, ang_vel = self.base_vel
|
| 285 |
+
client.resetBaseVelocity(obj_id, vel, ang_vel)
|
| 286 |
+
|
| 287 |
+
njoints = client.getNumJoints(obj_id)
|
| 288 |
+
if njoints != len(self.joint_info) or njoints != len(self.joint_state):
|
| 289 |
+
raise ValueError("Incorrect number of joint info state pairs.")
|
| 290 |
+
|
| 291 |
+
for i, (joint_info, joint_state) in enumerate(
|
| 292 |
+
zip(self.joint_info, self.joint_state)
|
| 293 |
+
):
|
| 294 |
+
joint_index = joint_info[0]
|
| 295 |
+
if joint_index != i:
|
| 296 |
+
raise ValueError("Joint index mismatch.")
|
| 297 |
+
|
| 298 |
+
# Check that the current joint we're trying to restore state for has the
|
| 299 |
+
# same info as the state joint.
|
| 300 |
+
cur_joint_info = ObjState._get_joint_info(client, obj_id, joint_index)
|
| 301 |
+
if cur_joint_info != joint_info:
|
| 302 |
+
raise ValueError(
|
| 303 |
+
"joint_info mismatch %s vs %s (expected)"
|
| 304 |
+
% (str(cur_joint_info), str(joint_info))
|
| 305 |
+
)
|
| 306 |
+
joint_position = joint_state[0]
|
| 307 |
+
joint_velocity = joint_state[1]
|
| 308 |
+
client.resetJointState(
|
| 309 |
+
obj_id, i, targetValue=joint_position, targetVelocity=joint_velocity
|
| 310 |
+
)
|
| 311 |
+
|
| 312 |
+
def serialize(self):
|
| 313 |
+
return {
|
| 314 |
+
"obj_id": self.obj_id,
|
| 315 |
+
"base_pose": self.base_pose,
|
| 316 |
+
"base_vel": self.base_vel,
|
| 317 |
+
"joint_info": self.joint_info,
|
| 318 |
+
"joint_state": self.joint_state,
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
@staticmethod
|
| 322 |
+
def deserialize(data):
|
| 323 |
+
return ObjState(
|
| 324 |
+
obj_id=_lists_to_tuple(data["obj_id"]),
|
| 325 |
+
base_pose=_lists_to_tuple(data["base_pose"]),
|
| 326 |
+
base_vel=_lists_to_tuple(data["base_vel"]),
|
| 327 |
+
joint_info=_lists_to_tuple(data["joint_info"]),
|
| 328 |
+
joint_state=_lists_to_tuple(data["joint_state"]),
|
| 329 |
+
)
|
| 330 |
+
|
| 331 |
+
|
| 332 |
+
@dataclasses.dataclass
|
| 333 |
+
class XarmState(ObjState):
|
| 334 |
+
"""A container for storing pybullet robot state."""
|
| 335 |
+
|
| 336 |
+
# The set point of the robot's controller.
|
| 337 |
+
target_effector_pose: Pose3d
|
| 338 |
+
goal_translation: Optional[Vec3]
|
| 339 |
+
|
| 340 |
+
@staticmethod
|
| 341 |
+
def get_bullet_state(client, obj_id, target_effector_pose, goal_translation):
|
| 342 |
+
if goal_translation is not None:
|
| 343 |
+
goal_translation = tuple(goal_translation.tolist())
|
| 344 |
+
return XarmState(
|
| 345 |
+
**dataclasses.asdict(ObjState.get_bullet_state(client, obj_id)),
|
| 346 |
+
target_effector_pose=target_effector_pose,
|
| 347 |
+
goal_translation=goal_translation
|
| 348 |
+
)
|
| 349 |
+
|
| 350 |
+
def serialize(self):
|
| 351 |
+
data = ObjState.serialize(self)
|
| 352 |
+
data["target_effector_pose"] = self.target_effector_pose.serialize()
|
| 353 |
+
if self.goal_translation is not None:
|
| 354 |
+
data["goal_translation"] = self.goal_translation
|
| 355 |
+
else:
|
| 356 |
+
data["goal_translation"] = []
|
| 357 |
+
return data
|
| 358 |
+
|
| 359 |
+
@staticmethod
|
| 360 |
+
def deserialize(data):
|
| 361 |
+
goal_translation = (
|
| 362 |
+
None
|
| 363 |
+
if not data["goal_translation"]
|
| 364 |
+
else _lists_to_tuple(data["goal_translation"])
|
| 365 |
+
)
|
| 366 |
+
return XarmState(
|
| 367 |
+
obj_id=data["obj_id"],
|
| 368 |
+
base_pose=_lists_to_tuple(data["base_pose"]),
|
| 369 |
+
base_vel=_lists_to_tuple(data["base_vel"]),
|
| 370 |
+
joint_info=_lists_to_tuple(data["joint_info"]),
|
| 371 |
+
joint_state=_lists_to_tuple(data["joint_state"]),
|
| 372 |
+
goal_translation=goal_translation,
|
| 373 |
+
target_effector_pose=Pose3d.deserialize(data["target_effector_pose"]),
|
| 374 |
+
)
|
| 375 |
+
|
| 376 |
+
|
| 377 |
+
def _serialize_pybullet_state(pybullet_state):
|
| 378 |
+
"""Convert data to POD types."""
|
| 379 |
+
if isinstance(pybullet_state, list):
|
| 380 |
+
return [_serialize_pybullet_state(entry) for entry in pybullet_state]
|
| 381 |
+
elif isinstance(pybullet_state, dict):
|
| 382 |
+
assert "_serialized_obj_name" not in pybullet_state
|
| 383 |
+
return {
|
| 384 |
+
key: _serialize_pybullet_state(value)
|
| 385 |
+
for key, value in pybullet_state.items()
|
| 386 |
+
}
|
| 387 |
+
elif isinstance(pybullet_state, (XarmState, ObjState)):
|
| 388 |
+
return {
|
| 389 |
+
"_serialized_obj_name": type(pybullet_state).__name__,
|
| 390 |
+
"_serialized_data": pybullet_state.serialize(),
|
| 391 |
+
}
|
| 392 |
+
elif isinstance(pybullet_state, int):
|
| 393 |
+
return pybullet_state
|
| 394 |
+
else:
|
| 395 |
+
raise ValueError(
|
| 396 |
+
"Unhandled type for object %s, type %s"
|
| 397 |
+
% (str(pybullet_state), type(pybullet_state))
|
| 398 |
+
)
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
def _deserialize_pybullet_state(state):
|
| 402 |
+
"""Parse data from POD types."""
|
| 403 |
+
if isinstance(state, list):
|
| 404 |
+
return [_deserialize_pybullet_state(item) for item in state]
|
| 405 |
+
elif isinstance(state, dict):
|
| 406 |
+
if "_serialized_obj_name" in state:
|
| 407 |
+
if state["_serialized_obj_name"] == XarmState.__name__:
|
| 408 |
+
return XarmState.deserialize(state["_serialized_data"])
|
| 409 |
+
elif state["_serialized_obj_name"] == ObjState.__name__:
|
| 410 |
+
return ObjState.deserialize(state["_serialized_data"])
|
| 411 |
+
else:
|
| 412 |
+
raise ValueError("Unsupported: %s" % state["_serialized_obj_name"])
|
| 413 |
+
else:
|
| 414 |
+
return {
|
| 415 |
+
key: _deserialize_pybullet_state(value) for key, value in state.items()
|
| 416 |
+
}
|
| 417 |
+
elif isinstance(state, int):
|
| 418 |
+
return state
|
| 419 |
+
else:
|
| 420 |
+
raise ValueError("Unhandled type for object %s" % str(state))
|
| 421 |
+
|
| 422 |
+
|
| 423 |
+
def write_pybullet_state(filename, pybullet_state, task, actions=None):
|
| 424 |
+
"""Serialize pybullet state to json file."""
|
| 425 |
+
import torch
|
| 426 |
+
data = {
|
| 427 |
+
"pybullet_state": _serialize_pybullet_state(pybullet_state),
|
| 428 |
+
"state_version": PYBULLET_STATE_VERSION,
|
| 429 |
+
"ts_ms": int(time.mktime(datetime.datetime.now().timetuple())) * 1000,
|
| 430 |
+
"user": getpass.getuser(),
|
| 431 |
+
"task": task,
|
| 432 |
+
"actions": actions if actions is not None else [],
|
| 433 |
+
}
|
| 434 |
+
torch.save(data, filename)
|
| 435 |
+
|
| 436 |
+
|
| 437 |
+
def read_pybullet_state(filename):
|
| 438 |
+
"""Deserialize pybullet state from json file."""
|
| 439 |
+
import torch
|
| 440 |
+
data = torch.load(filename)
|
| 441 |
+
|
| 442 |
+
assert isinstance(data, dict)
|
| 443 |
+
|
| 444 |
+
if data["state_version"] != PYBULLET_STATE_VERSION:
|
| 445 |
+
raise ValueError(
|
| 446 |
+
"incompatible state data (version %d, expected %d)"
|
| 447 |
+
% (data["state_version"], PYBULLET_STATE_VERSION)
|
| 448 |
+
)
|
| 449 |
+
|
| 450 |
+
data["pybullet_state"] = _deserialize_pybullet_state(data["pybullet_state"])
|
| 451 |
+
return data
|
third_party/diffusion_policy/diffusion_policy/env/block_pushing/utils/xarm_sim_robot.py
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 The Reach ML Authors.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
|
| 16 |
+
"""XArm Robot Kinematics."""
|
| 17 |
+
from diffusion_policy.env.block_pushing.utils import utils_pybullet
|
| 18 |
+
from diffusion_policy.env.block_pushing.utils.pose3d import Pose3d
|
| 19 |
+
import numpy as np
|
| 20 |
+
from scipy.spatial import transform
|
| 21 |
+
import pybullet
|
| 22 |
+
|
| 23 |
+
XARM_URDF_PATH = (
|
| 24 |
+
"third_party/bullet/examples/pybullet/gym/pybullet_data/" "xarm/xarm6_robot.urdf"
|
| 25 |
+
)
|
| 26 |
+
SUCTION_URDF_PATH = "third_party/py/envs/assets/suction/" "suction-head-long.urdf"
|
| 27 |
+
CYLINDER_URDF_PATH = "third_party/py/envs/assets/suction/" "cylinder.urdf"
|
| 28 |
+
CYLINDER_REAL_URDF_PATH = "third_party/py/envs/assets/suction/" "cylinder_real.urdf"
|
| 29 |
+
HOME_JOINT_POSITIONS = np.deg2rad([0, -20, -80, 0, 100, -30])
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
class XArmSimRobot:
|
| 33 |
+
"""A simulated PyBullet XArm robot, mostly for forward/inverse kinematics."""
|
| 34 |
+
|
| 35 |
+
def __init__(
|
| 36 |
+
self,
|
| 37 |
+
pybullet_client,
|
| 38 |
+
initial_joint_positions=HOME_JOINT_POSITIONS,
|
| 39 |
+
end_effector="none",
|
| 40 |
+
color="default",
|
| 41 |
+
):
|
| 42 |
+
self._pybullet_client = pybullet_client
|
| 43 |
+
self.initial_joint_positions = initial_joint_positions
|
| 44 |
+
|
| 45 |
+
if color == "default":
|
| 46 |
+
self.xarm = utils_pybullet.load_urdf(
|
| 47 |
+
pybullet_client, XARM_URDF_PATH, [0, 0, 0]
|
| 48 |
+
)
|
| 49 |
+
else:
|
| 50 |
+
raise ValueError("Unrecognized xarm color %s" % color)
|
| 51 |
+
|
| 52 |
+
# Get revolute joints of robot (skip fixed joints).
|
| 53 |
+
joints = []
|
| 54 |
+
joint_indices = []
|
| 55 |
+
for i in range(self._pybullet_client.getNumJoints(self.xarm)):
|
| 56 |
+
joint_info = self._pybullet_client.getJointInfo(self.xarm, i)
|
| 57 |
+
if joint_info[2] == pybullet.JOINT_REVOLUTE:
|
| 58 |
+
joints.append(joint_info[0])
|
| 59 |
+
joint_indices.append(i)
|
| 60 |
+
# Note examples in pybullet do this, but it is not clear what the
|
| 61 |
+
# benefits are.
|
| 62 |
+
self._pybullet_client.changeDynamics(
|
| 63 |
+
self.xarm, i, linearDamping=0, angularDamping=0
|
| 64 |
+
)
|
| 65 |
+
|
| 66 |
+
self._n_joints = len(joints)
|
| 67 |
+
self._joints = tuple(joints)
|
| 68 |
+
self._joint_indices = tuple(joint_indices)
|
| 69 |
+
|
| 70 |
+
# Move robot to home joint configuration
|
| 71 |
+
self.reset_joints(self.initial_joint_positions)
|
| 72 |
+
self.effector_link = 6
|
| 73 |
+
|
| 74 |
+
if (
|
| 75 |
+
end_effector == "suction"
|
| 76 |
+
or end_effector == "cylinder"
|
| 77 |
+
or end_effector == "cylinder_real"
|
| 78 |
+
):
|
| 79 |
+
self.end_effector = self._setup_end_effector(end_effector)
|
| 80 |
+
else:
|
| 81 |
+
if end_effector != "none":
|
| 82 |
+
raise ValueError('end_effector "%s" is not supported.' % end_effector)
|
| 83 |
+
self.end_effector = None
|
| 84 |
+
|
| 85 |
+
def _setup_end_effector(self, end_effector):
|
| 86 |
+
"""Adds a suction or cylinder end effector."""
|
| 87 |
+
pose = self.forward_kinematics()
|
| 88 |
+
if end_effector == "suction":
|
| 89 |
+
body = utils_pybullet.load_urdf(
|
| 90 |
+
self._pybullet_client,
|
| 91 |
+
SUCTION_URDF_PATH,
|
| 92 |
+
pose.translation,
|
| 93 |
+
pose.rotation.as_quat(),
|
| 94 |
+
)
|
| 95 |
+
elif end_effector == "cylinder":
|
| 96 |
+
body = utils_pybullet.load_urdf(
|
| 97 |
+
self._pybullet_client,
|
| 98 |
+
CYLINDER_URDF_PATH,
|
| 99 |
+
pose.translation,
|
| 100 |
+
pose.rotation.as_quat(),
|
| 101 |
+
)
|
| 102 |
+
elif end_effector == "cylinder_real":
|
| 103 |
+
body = utils_pybullet.load_urdf(
|
| 104 |
+
self._pybullet_client,
|
| 105 |
+
CYLINDER_REAL_URDF_PATH,
|
| 106 |
+
pose.translation,
|
| 107 |
+
pose.rotation.as_quat(),
|
| 108 |
+
)
|
| 109 |
+
else:
|
| 110 |
+
raise ValueError('end_effector "%s" is not supported.' % end_effector)
|
| 111 |
+
|
| 112 |
+
constraint_id = self._pybullet_client.createConstraint(
|
| 113 |
+
parentBodyUniqueId=self.xarm,
|
| 114 |
+
parentLinkIndex=6,
|
| 115 |
+
childBodyUniqueId=body,
|
| 116 |
+
childLinkIndex=-1,
|
| 117 |
+
jointType=pybullet.JOINT_FIXED,
|
| 118 |
+
jointAxis=(0, 0, 0),
|
| 119 |
+
parentFramePosition=(0, 0, 0),
|
| 120 |
+
childFramePosition=(0, 0, 0),
|
| 121 |
+
)
|
| 122 |
+
self._pybullet_client.changeConstraint(constraint_id, maxForce=50)
|
| 123 |
+
|
| 124 |
+
return body
|
| 125 |
+
|
| 126 |
+
def reset_joints(self, joint_values):
|
| 127 |
+
"""Sets the position of the Robot's joints.
|
| 128 |
+
|
| 129 |
+
*Note*: This should only be used at the start while not running the
|
| 130 |
+
simulation resetJointState overrides all physics simulation.
|
| 131 |
+
|
| 132 |
+
Args:
|
| 133 |
+
joint_values: Iterable with desired joint positions.
|
| 134 |
+
"""
|
| 135 |
+
for i in range(self._n_joints):
|
| 136 |
+
self._pybullet_client.resetJointState(
|
| 137 |
+
self.xarm, self._joints[i], joint_values[i]
|
| 138 |
+
)
|
| 139 |
+
|
| 140 |
+
def get_joints_measured(self):
|
| 141 |
+
joint_states = self._pybullet_client.getJointStates(
|
| 142 |
+
self.xarm, self._joint_indices
|
| 143 |
+
)
|
| 144 |
+
joint_positions = np.array([state[0] for state in joint_states])
|
| 145 |
+
joint_velocities = np.array([state[1] for state in joint_states])
|
| 146 |
+
joint_torques = np.array([state[3] for state in joint_states])
|
| 147 |
+
return joint_positions, joint_velocities, joint_torques
|
| 148 |
+
|
| 149 |
+
def get_joint_positions(self):
|
| 150 |
+
joint_states = self._pybullet_client.getJointStates(
|
| 151 |
+
self.xarm, self._joint_indices
|
| 152 |
+
)
|
| 153 |
+
joint_positions = np.array([state[0] for state in joint_states])
|
| 154 |
+
return joint_positions
|
| 155 |
+
|
| 156 |
+
def forward_kinematics(self):
|
| 157 |
+
"""Forward kinematics."""
|
| 158 |
+
effector_state = self._pybullet_client.getLinkState(
|
| 159 |
+
self.xarm, self.effector_link
|
| 160 |
+
)
|
| 161 |
+
return Pose3d(
|
| 162 |
+
translation=np.array(effector_state[0]),
|
| 163 |
+
rotation=transform.Rotation.from_quat(effector_state[1]),
|
| 164 |
+
)
|
| 165 |
+
|
| 166 |
+
def inverse_kinematics(
|
| 167 |
+
self, world_effector_pose, max_iterations=100, residual_threshold=1e-10
|
| 168 |
+
):
|
| 169 |
+
"""Inverse kinematics.
|
| 170 |
+
|
| 171 |
+
Args:
|
| 172 |
+
world_effector_pose: Target Pose3d for the robot's end effector.
|
| 173 |
+
max_iterations: Refine the IK solution until the distance between target
|
| 174 |
+
and actual end effector position is below this threshold, or the
|
| 175 |
+
maxNumIterations is reached. Default is 20 iterations.
|
| 176 |
+
residual_threshold: Refine the IK solution until the distance between
|
| 177 |
+
target and actual end effector position is below this threshold, or the
|
| 178 |
+
maxNumIterations is reached.
|
| 179 |
+
|
| 180 |
+
Returns:
|
| 181 |
+
Numpy array with required joint angles to reach the requested pose.
|
| 182 |
+
"""
|
| 183 |
+
return np.array(
|
| 184 |
+
self._pybullet_client.calculateInverseKinematics(
|
| 185 |
+
self.xarm,
|
| 186 |
+
self.effector_link,
|
| 187 |
+
world_effector_pose.translation,
|
| 188 |
+
world_effector_pose.rotation.as_quat(), # as_quat returns xyzw.
|
| 189 |
+
lowerLimits=[-17] * 6,
|
| 190 |
+
upperLimits=[17] * 6,
|
| 191 |
+
jointRanges=[17] * 6,
|
| 192 |
+
restPoses=[0, 0] + self.get_joint_positions()[2:].tolist(),
|
| 193 |
+
maxNumIterations=max_iterations,
|
| 194 |
+
residualThreshold=residual_threshold,
|
| 195 |
+
)
|
| 196 |
+
)
|
| 197 |
+
|
| 198 |
+
def set_target_effector_pose(self, world_effector_pose):
|
| 199 |
+
target_joint_positions = self.inverse_kinematics(world_effector_pose)
|
| 200 |
+
self.set_target_joint_positions(target_joint_positions)
|
| 201 |
+
|
| 202 |
+
def set_target_joint_velocities(self, target_joint_velocities):
|
| 203 |
+
self._pybullet_client.setJointMotorControlArray(
|
| 204 |
+
self.xarm,
|
| 205 |
+
self._joint_indices,
|
| 206 |
+
pybullet.VELOCITY_CONTROL,
|
| 207 |
+
targetVelocities=target_joint_velocities,
|
| 208 |
+
forces=[5 * 240.0] * 6,
|
| 209 |
+
)
|
| 210 |
+
|
| 211 |
+
def set_target_joint_positions(self, target_joint_positions):
|
| 212 |
+
self._pybullet_client.setJointMotorControlArray(
|
| 213 |
+
self.xarm,
|
| 214 |
+
self._joint_indices,
|
| 215 |
+
pybullet.POSITION_CONTROL,
|
| 216 |
+
targetPositions=target_joint_positions,
|
| 217 |
+
forces=[5 * 240.0] * 6,
|
| 218 |
+
)
|
| 219 |
+
|
| 220 |
+
def set_alpha_transparency(self, alpha):
|
| 221 |
+
visual_shape_data = self._pybullet_client.getVisualShapeData(self.xarm)
|
| 222 |
+
|
| 223 |
+
for i in range(self._pybullet_client.getNumJoints(self.xarm)):
|
| 224 |
+
object_id, link_index, _, _, _, _, _, rgba_color = visual_shape_data[i]
|
| 225 |
+
assert object_id == self.xarm, "xarm id mismatch."
|
| 226 |
+
assert link_index == i, "Link visual data was returned out of order."
|
| 227 |
+
rgba_color = list(rgba_color[0:3]) + [alpha]
|
| 228 |
+
self._pybullet_client.changeVisualShape(
|
| 229 |
+
self.xarm, linkIndex=i, rgbaColor=rgba_color
|
| 230 |
+
)
|
third_party/diffusion_policy/diffusion_policy/env/kitchen/relay_policy_learning/adept_envs/.pylintrc
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[MASTER]
|
| 2 |
+
|
| 3 |
+
# A comma-separated list of package or module names from where C extensions may
|
| 4 |
+
# be loaded. Extensions are loading into the active Python interpreter and may
|
| 5 |
+
# run arbitrary code.
|
| 6 |
+
extension-pkg-whitelist=
|
| 7 |
+
|
| 8 |
+
# Add files or directories to the blacklist. They should be base names, not
|
| 9 |
+
# paths.
|
| 10 |
+
ignore=CVS
|
| 11 |
+
|
| 12 |
+
# Add files or directories matching the regex patterns to the blacklist. The
|
| 13 |
+
# regex matches against base names, not paths.
|
| 14 |
+
ignore-patterns=
|
| 15 |
+
|
| 16 |
+
# Python code to execute, usually for sys.path manipulation such as
|
| 17 |
+
# pygtk.require().
|
| 18 |
+
#init-hook=
|
| 19 |
+
|
| 20 |
+
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
|
| 21 |
+
# number of processors available to use.
|
| 22 |
+
jobs=1
|
| 23 |
+
|
| 24 |
+
# Control the amount of potential inferred values when inferring a single
|
| 25 |
+
# object. This can help the performance when dealing with large functions or
|
| 26 |
+
# complex, nested conditions.
|
| 27 |
+
limit-inference-results=100
|
| 28 |
+
|
| 29 |
+
# List of plugins (as comma separated values of python modules names) to load,
|
| 30 |
+
# usually to register additional checkers.
|
| 31 |
+
load-plugins=
|
| 32 |
+
|
| 33 |
+
# Pickle collected data for later comparisons.
|
| 34 |
+
persistent=yes
|
| 35 |
+
|
| 36 |
+
# Specify a configuration file.
|
| 37 |
+
#rcfile=
|
| 38 |
+
|
| 39 |
+
# When enabled, pylint would attempt to guess common misconfiguration and emit
|
| 40 |
+
# user-friendly hints instead of false-positive error messages.
|
| 41 |
+
suggestion-mode=yes
|
| 42 |
+
|
| 43 |
+
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
| 44 |
+
# active Python interpreter and may run arbitrary code.
|
| 45 |
+
unsafe-load-any-extension=no
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
[MESSAGES CONTROL]
|
| 49 |
+
|
| 50 |
+
# Only show warnings with the listed confidence levels. Leave empty to show
|
| 51 |
+
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
|
| 52 |
+
confidence=
|
| 53 |
+
|
| 54 |
+
# Disable the message, report, category or checker with the given id(s). You
|
| 55 |
+
# can either give multiple identifiers separated by comma (,) or put this
|
| 56 |
+
# option multiple times (only on the command line, not in the configuration
|
| 57 |
+
# file where it should appear only once). You can also use "--disable=all" to
|
| 58 |
+
# disable everything first and then reenable specific checks. For example, if
|
| 59 |
+
# you want to run only the similarities checker, you can use "--disable=all
|
| 60 |
+
# --enable=similarities". If you want to run only the classes checker, but have
|
| 61 |
+
# no Warning level messages displayed, use "--disable=all --enable=classes
|
| 62 |
+
# --disable=W".
|
| 63 |
+
disable=relative-beyond-top-level
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
[REPORTS]
|
| 67 |
+
|
| 68 |
+
# Python expression which should return a note less than 10 (10 is the highest
|
| 69 |
+
# note). You have access to the variables errors warning, statement which
|
| 70 |
+
# respectively contain the number of errors / warnings messages and the total
|
| 71 |
+
# number of statements analyzed. This is used by the global evaluation report
|
| 72 |
+
# (RP0004).
|
| 73 |
+
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
| 74 |
+
|
| 75 |
+
# Template used to display messages. This is a python new-style format string
|
| 76 |
+
# used to format the message information. See doc for all details.
|
| 77 |
+
#msg-template=
|
| 78 |
+
|
| 79 |
+
# Set the output format. Available formats are text, parseable, colorized, json
|
| 80 |
+
# and msvs (visual studio). You can also give a reporter class, e.g.
|
| 81 |
+
# mypackage.mymodule.MyReporterClass.
|
| 82 |
+
output-format=text
|
| 83 |
+
|
| 84 |
+
# Tells whether to display a full report or only the messages.
|
| 85 |
+
reports=no
|
| 86 |
+
|
| 87 |
+
# Activate the evaluation score.
|
| 88 |
+
score=yes
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
[REFACTORING]
|
| 92 |
+
|
| 93 |
+
# Maximum number of nested blocks for function / method body
|
| 94 |
+
max-nested-blocks=5
|
| 95 |
+
|
| 96 |
+
# Complete name of functions that never returns. When checking for
|
| 97 |
+
# inconsistent-return-statements if a never returning function is called then
|
| 98 |
+
# it will be considered as an explicit return statement and no message will be
|
| 99 |
+
# printed.
|
| 100 |
+
never-returning-functions=sys.exit
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
[LOGGING]
|
| 104 |
+
|
| 105 |
+
# Format style used to check logging format string. `old` means using %
|
| 106 |
+
# formatting, while `new` is for `{}` formatting.
|
| 107 |
+
logging-format-style=old
|
| 108 |
+
|
| 109 |
+
# Logging modules to check that the string format arguments are in logging
|
| 110 |
+
# function parameter format.
|
| 111 |
+
logging-modules=logging
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
[VARIABLES]
|
| 115 |
+
|
| 116 |
+
# List of additional names supposed to be defined in builtins. Remember that
|
| 117 |
+
# you should avoid defining new builtins when possible.
|
| 118 |
+
additional-builtins=
|
| 119 |
+
|
| 120 |
+
# Tells whether unused global variables should be treated as a violation.
|
| 121 |
+
allow-global-unused-variables=yes
|
| 122 |
+
|
| 123 |
+
# List of strings which can identify a callback function by name. A callback
|
| 124 |
+
# name must start or end with one of those strings.
|
| 125 |
+
callbacks=cb_,
|
| 126 |
+
_cb
|
| 127 |
+
|
| 128 |
+
# A regular expression matching the name of dummy variables (i.e. expected to
|
| 129 |
+
# not be used).
|
| 130 |
+
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
|
| 131 |
+
|
| 132 |
+
# Argument names that match this expression will be ignored. Default to name
|
| 133 |
+
# with leading underscore.
|
| 134 |
+
ignored-argument-names=_.*|^ignored_|^unused_
|
| 135 |
+
|
| 136 |
+
# Tells whether we should check for unused import in __init__ files.
|
| 137 |
+
init-import=no
|
| 138 |
+
|
| 139 |
+
# List of qualified module names which can have objects that can redefine
|
| 140 |
+
# builtins.
|
| 141 |
+
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
[FORMAT]
|
| 145 |
+
|
| 146 |
+
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
|
| 147 |
+
expected-line-ending-format=
|
| 148 |
+
|
| 149 |
+
# Regexp for a line that is allowed to be longer than the limit.
|
| 150 |
+
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
| 151 |
+
|
| 152 |
+
# Number of spaces of indent required inside a hanging or continued line.
|
| 153 |
+
indent-after-paren=4
|
| 154 |
+
|
| 155 |
+
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
| 156 |
+
# tab).
|
| 157 |
+
indent-string=' '
|
| 158 |
+
|
| 159 |
+
# Maximum number of characters on a single line.
|
| 160 |
+
max-line-length=80
|
| 161 |
+
|
| 162 |
+
# Maximum number of lines in a module
|
| 163 |
+
max-module-lines=99999
|
| 164 |
+
|
| 165 |
+
# List of optional constructs for which whitespace checking is disabled. `dict-
|
| 166 |
+
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
|
| 167 |
+
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
|
| 168 |
+
# `empty-line` allows space-only lines.
|
| 169 |
+
no-space-check=trailing-comma,
|
| 170 |
+
dict-separator
|
| 171 |
+
|
| 172 |
+
# Allow the body of a class to be on the same line as the declaration if body
|
| 173 |
+
# contains single statement.
|
| 174 |
+
single-line-class-stmt=no
|
| 175 |
+
|
| 176 |
+
# Allow the body of an if to be on the same line as the test if there is no
|
| 177 |
+
# else.
|
| 178 |
+
single-line-if-stmt=no
|
| 179 |
+
|
| 180 |
+
|
| 181 |
+
[TYPECHECK]
|
| 182 |
+
|
| 183 |
+
# List of decorators that produce context managers, such as
|
| 184 |
+
# contextlib.contextmanager. Add to this list to register other decorators that
|
| 185 |
+
# produce valid context managers.
|
| 186 |
+
contextmanager-decorators=contextlib.contextmanager
|
| 187 |
+
|
| 188 |
+
# List of members which are set dynamically and missed by pylint inference
|
| 189 |
+
# system, and so shouldn't trigger E1101 when accessed. Python regular
|
| 190 |
+
# expressions are accepted.
|
| 191 |
+
generated-members=
|
| 192 |
+
|
| 193 |
+
# Tells whether missing members accessed in mixin class should be ignored. A
|
| 194 |
+
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
| 195 |
+
ignore-mixin-members=yes
|
| 196 |
+
|
| 197 |
+
# Tells whether to warn about missing members when the owner of the attribute
|
| 198 |
+
# is inferred to be None.
|
| 199 |
+
ignore-none=yes
|
| 200 |
+
|
| 201 |
+
# This flag controls whether pylint should warn about no-member and similar
|
| 202 |
+
# checks whenever an opaque object is returned when inferring. The inference
|
| 203 |
+
# can return multiple potential results while evaluating a Python object, but
|
| 204 |
+
# some branches might not be evaluated, which results in partial inference. In
|
| 205 |
+
# that case, it might be useful to still emit no-member and other checks for
|
| 206 |
+
# the rest of the inferred objects.
|
| 207 |
+
ignore-on-opaque-inference=yes
|
| 208 |
+
|
| 209 |
+
# List of class names for which member attributes should not be checked (useful
|
| 210 |
+
# for classes with dynamically set attributes). This supports the use of
|
| 211 |
+
# qualified names.
|
| 212 |
+
ignored-classes=optparse.Values,thread._local,_thread._local
|
| 213 |
+
|
| 214 |
+
# List of module names for which member attributes should not be checked
|
| 215 |
+
# (useful for modules/projects where namespaces are manipulated during runtime
|
| 216 |
+
# and thus existing member attributes cannot be deduced by static analysis. It
|
| 217 |
+
# supports qualified module names, as well as Unix pattern matching.
|
| 218 |
+
ignored-modules=
|
| 219 |
+
|
| 220 |
+
# Show a hint with possible names when a member name was not found. The aspect
|
| 221 |
+
# of finding the hint is based on edit distance.
|
| 222 |
+
missing-member-hint=yes
|
| 223 |
+
|
| 224 |
+
# The minimum edit distance a name should have in order to be considered a
|
| 225 |
+
# similar match for a missing member name.
|
| 226 |
+
missing-member-hint-distance=1
|
| 227 |
+
|
| 228 |
+
# The total number of similar names that should be taken in consideration when
|
| 229 |
+
# showing a hint for a missing member.
|
| 230 |
+
missing-member-max-choices=1
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
[SIMILARITIES]
|
| 234 |
+
|
| 235 |
+
# Ignore comments when computing similarities.
|
| 236 |
+
ignore-comments=yes
|
| 237 |
+
|
| 238 |
+
# Ignore docstrings when computing similarities.
|
| 239 |
+
ignore-docstrings=yes
|
| 240 |
+
|
| 241 |
+
# Ignore imports when computing similarities.
|
| 242 |
+
ignore-imports=no
|
| 243 |
+
|
| 244 |
+
# Minimum lines number of a similarity.
|
| 245 |
+
min-similarity-lines=4
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
[BASIC]
|
| 249 |
+
|
| 250 |
+
# Naming style matching correct argument names
|
| 251 |
+
argument-naming-style=snake_case
|
| 252 |
+
|
| 253 |
+
# Regular expression matching correct argument names. Overrides argument-
|
| 254 |
+
# naming-style
|
| 255 |
+
argument-rgx=^[a-z][a-z0-9_]*$
|
| 256 |
+
|
| 257 |
+
# Naming style matching correct attribute names
|
| 258 |
+
attr-naming-style=snake_case
|
| 259 |
+
|
| 260 |
+
# Regular expression matching correct attribute names. Overrides attr-naming-
|
| 261 |
+
# style
|
| 262 |
+
attr-rgx=^_{0,2}[a-z][a-z0-9_]*$
|
| 263 |
+
|
| 264 |
+
# Bad variable names which should always be refused, separated by a comma
|
| 265 |
+
bad-names=
|
| 266 |
+
|
| 267 |
+
# Naming style matching correct class attribute names
|
| 268 |
+
class-attribute-naming-style=any
|
| 269 |
+
|
| 270 |
+
# Regular expression matching correct class attribute names. Overrides class-
|
| 271 |
+
# attribute-naming-style
|
| 272 |
+
class-attribute-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
|
| 273 |
+
|
| 274 |
+
# Naming style matching correct class names
|
| 275 |
+
class-naming-style=PascalCase
|
| 276 |
+
|
| 277 |
+
# Regular expression matching correct class names. Overrides class-naming-style
|
| 278 |
+
class-rgx=^_?[A-Z][a-zA-Z0-9]*$
|
| 279 |
+
|
| 280 |
+
# Naming style matching correct constant names
|
| 281 |
+
const-naming-style=UPPER_CASE
|
| 282 |
+
|
| 283 |
+
# Regular expression matching correct constant names. Overrides const-naming-
|
| 284 |
+
# style
|
| 285 |
+
const-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
|
| 286 |
+
|
| 287 |
+
# Minimum line length for functions/classes that require docstrings, shorter
|
| 288 |
+
# ones are exempt.
|
| 289 |
+
docstring-min-length=10
|
| 290 |
+
|
| 291 |
+
# Naming style matching correct function names
|
| 292 |
+
function-naming-style=snake_case
|
| 293 |
+
|
| 294 |
+
# Regular expression matching correct function names. Overrides function-
|
| 295 |
+
# naming-style
|
| 296 |
+
function-rgx=^(?:(?P<exempt>setUp|tearDown|setUpModule|tearDownModule)|(?P<camel_case>_?[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_?[a-z][a-z0-9_]*))$
|
| 297 |
+
|
| 298 |
+
# Good variable names which should always be accepted, separated by a comma
|
| 299 |
+
good-names=main,
|
| 300 |
+
_
|
| 301 |
+
|
| 302 |
+
# Include a hint for the correct naming format with invalid-name
|
| 303 |
+
include-naming-hint=no
|
| 304 |
+
|
| 305 |
+
# Naming style matching correct inline iteration names
|
| 306 |
+
inlinevar-naming-style=any
|
| 307 |
+
|
| 308 |
+
# Regular expression matching correct inline iteration names. Overrides
|
| 309 |
+
# inlinevar-naming-style
|
| 310 |
+
inlinevar-rgx=^[a-z][a-z0-9_]*$
|
| 311 |
+
|
| 312 |
+
# Naming style matching correct method names
|
| 313 |
+
method-naming-style=snake_case
|
| 314 |
+
|
| 315 |
+
# Regular expression matching correct method names. Overrides method-naming-
|
| 316 |
+
# style
|
| 317 |
+
method-rgx=(?x)^(?:(?P<exempt>_[a-z0-9_]+__|runTest|setUp|tearDown|setUpTestCase|tearDownTestCase|setupSelf|tearDownClass|setUpClass|(test|assert)_*[A-Z0-9][a-zA-Z0-9_]*|next)|(?P<camel_case>_{0,2}[A-Z][a-zA-Z0-9_]*)|(?P<snake_case>_{0,2}[a-z][a-z0-9_]*))$
|
| 318 |
+
|
| 319 |
+
# Naming style matching correct module names
|
| 320 |
+
module-naming-style=snake_case
|
| 321 |
+
|
| 322 |
+
# Regular expression matching correct module names. Overrides module-naming-
|
| 323 |
+
# style
|
| 324 |
+
module-rgx=^(_?[a-z][a-z0-9_]*)|__init__|PRESUBMIT|PRESUBMIT_unittest$
|
| 325 |
+
|
| 326 |
+
# Colon-delimited sets of names that determine each other's naming style when
|
| 327 |
+
# the name regexes allow several styles.
|
| 328 |
+
name-group=function:method
|
| 329 |
+
|
| 330 |
+
# Regular expression which should only match function or class names that do
|
| 331 |
+
# not require a docstring.
|
| 332 |
+
no-docstring-rgx=(__.*__|main)
|
| 333 |
+
|
| 334 |
+
# List of decorators that produce properties, such as abc.abstractproperty. Add
|
| 335 |
+
# to this list to register other decorators that produce valid properties.
|
| 336 |
+
property-classes=abc.abstractproperty,google3.pyglib.function_utils.cached.property
|
| 337 |
+
|
| 338 |
+
# Naming style matching correct variable names
|
| 339 |
+
variable-naming-style=snake_case
|
| 340 |
+
|
| 341 |
+
# Regular expression matching correct variable names. Overrides variable-
|
| 342 |
+
# naming-style
|
| 343 |
+
variable-rgx=^[a-z][a-z0-9_]*$
|
| 344 |
+
|
| 345 |
+
|
| 346 |
+
[SPELLING]
|
| 347 |
+
|
| 348 |
+
# Limits count of emitted suggestions for spelling mistakes.
|
| 349 |
+
max-spelling-suggestions=4
|
| 350 |
+
|
| 351 |
+
# Spelling dictionary name. Available dictionaries: none. To make it working
|
| 352 |
+
# install python-enchant package..
|
| 353 |
+
spelling-dict=
|
| 354 |
+
|
| 355 |
+
# List of comma separated words that should not be checked.
|
| 356 |
+
spelling-ignore-words=
|
| 357 |
+
|
| 358 |
+
# A path to a file that contains private dictionary; one word per line.
|
| 359 |
+
spelling-private-dict-file=
|
| 360 |
+
|
| 361 |
+
# Tells whether to store unknown words to indicated private dictionary in
|
| 362 |
+
# --spelling-private-dict-file option instead of raising a message.
|
| 363 |
+
spelling-store-unknown-words=no
|
| 364 |
+
|
| 365 |
+
|
| 366 |
+
[MISCELLANEOUS]
|
| 367 |
+
|
| 368 |
+
# List of note tags to take in consideration, separated by a comma.
|
| 369 |
+
notes=FIXME,
|
| 370 |
+
XXX,
|
| 371 |
+
TODO
|
| 372 |
+
|
| 373 |
+
|
| 374 |
+
[IMPORTS]
|
| 375 |
+
|
| 376 |
+
# Allow wildcard imports from modules that define __all__.
|
| 377 |
+
allow-wildcard-with-all=no
|
| 378 |
+
|
| 379 |
+
# Analyse import fallback blocks. This can be used to support both Python 2 and
|
| 380 |
+
# 3 compatible code, which means that the block might have code that exists
|
| 381 |
+
# only in one or another interpreter, leading to false positives when analysed.
|
| 382 |
+
analyse-fallback-blocks=no
|
| 383 |
+
|
| 384 |
+
# Deprecated modules which should not be used, separated by a comma.
|
| 385 |
+
deprecated-modules=optparse,tkinter.tix
|
| 386 |
+
|
| 387 |
+
# Create a graph of external dependencies in the given file (report RP0402 must
|
| 388 |
+
# not be disabled).
|
| 389 |
+
ext-import-graph=
|
| 390 |
+
|
| 391 |
+
# Create a graph of every (i.e. internal and external) dependencies in the
|
| 392 |
+
# given file (report RP0402 must not be disabled).
|
| 393 |
+
import-graph=
|
| 394 |
+
|
| 395 |
+
# Create a graph of internal dependencies in the given file (report RP0402 must
|
| 396 |
+
# not be disabled).
|
| 397 |
+
int-import-graph=
|
| 398 |
+
|
| 399 |
+
# Force import order to recognize a module as part of the standard
|
| 400 |
+
# compatibility libraries.
|
| 401 |
+
known-standard-library=
|
| 402 |
+
|
| 403 |
+
# Force import order to recognize a module as part of a third party library.
|
| 404 |
+
known-third-party=enchant
|
| 405 |
+
|
| 406 |
+
|
| 407 |
+
[CLASSES]
|
| 408 |
+
|
| 409 |
+
# List of method names used to declare (i.e. assign) instance attributes.
|
| 410 |
+
defining-attr-methods=__init__,
|
| 411 |
+
__new__,
|
| 412 |
+
setUp
|
| 413 |
+
|
| 414 |
+
# List of member names, which should be excluded from the protected access
|
| 415 |
+
# warning.
|
| 416 |
+
exclude-protected=_asdict,
|
| 417 |
+
_fields,
|
| 418 |
+
_replace,
|
| 419 |
+
_source,
|
| 420 |
+
_make
|
| 421 |
+
|
| 422 |
+
# List of valid names for the first argument in a class method.
|
| 423 |
+
valid-classmethod-first-arg=cls
|
| 424 |
+
|
| 425 |
+
# List of valid names for the first argument in a metaclass class method.
|
| 426 |
+
valid-metaclass-classmethod-first-arg=cls
|
| 427 |
+
|
| 428 |
+
|
| 429 |
+
[EXCEPTIONS]
|
| 430 |
+
|
| 431 |
+
# Exceptions that will emit a warning when being caught. Defaults to
|
| 432 |
+
# "Exception".
|
| 433 |
+
overgeneral-exceptions=Exception
|
third_party/diffusion_policy/diffusion_policy/env/kitchen/relay_policy_learning/adept_envs/.style.yapf
ADDED
|
@@ -0,0 +1,323 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[style]
|
| 2 |
+
# Align closing bracket with visual indentation.
|
| 3 |
+
align_closing_bracket_with_visual_indent=False
|
| 4 |
+
|
| 5 |
+
# Allow dictionary keys to exist on multiple lines. For example:
|
| 6 |
+
#
|
| 7 |
+
# x = {
|
| 8 |
+
# ('this is the first element of a tuple',
|
| 9 |
+
# 'this is the second element of a tuple'):
|
| 10 |
+
# value,
|
| 11 |
+
# }
|
| 12 |
+
allow_multiline_dictionary_keys=False
|
| 13 |
+
|
| 14 |
+
# Allow lambdas to be formatted on more than one line.
|
| 15 |
+
allow_multiline_lambdas=False
|
| 16 |
+
|
| 17 |
+
# Allow splitting before a default / named assignment in an argument list.
|
| 18 |
+
allow_split_before_default_or_named_assigns=True
|
| 19 |
+
|
| 20 |
+
# Allow splits before the dictionary value.
|
| 21 |
+
allow_split_before_dict_value=True
|
| 22 |
+
|
| 23 |
+
# Let spacing indicate operator precedence. For example:
|
| 24 |
+
#
|
| 25 |
+
# a = 1 * 2 + 3 / 4
|
| 26 |
+
# b = 1 / 2 - 3 * 4
|
| 27 |
+
# c = (1 + 2) * (3 - 4)
|
| 28 |
+
# d = (1 - 2) / (3 + 4)
|
| 29 |
+
# e = 1 * 2 - 3
|
| 30 |
+
# f = 1 + 2 + 3 + 4
|
| 31 |
+
#
|
| 32 |
+
# will be formatted as follows to indicate precedence:
|
| 33 |
+
#
|
| 34 |
+
# a = 1*2 + 3/4
|
| 35 |
+
# b = 1/2 - 3*4
|
| 36 |
+
# c = (1+2) * (3-4)
|
| 37 |
+
# d = (1-2) / (3+4)
|
| 38 |
+
# e = 1*2 - 3
|
| 39 |
+
# f = 1 + 2 + 3 + 4
|
| 40 |
+
#
|
| 41 |
+
arithmetic_precedence_indication=False
|
| 42 |
+
|
| 43 |
+
# Number of blank lines surrounding top-level function and class
|
| 44 |
+
# definitions.
|
| 45 |
+
blank_lines_around_top_level_definition=2
|
| 46 |
+
|
| 47 |
+
# Insert a blank line before a class-level docstring.
|
| 48 |
+
blank_line_before_class_docstring=False
|
| 49 |
+
|
| 50 |
+
# Insert a blank line before a module docstring.
|
| 51 |
+
blank_line_before_module_docstring=False
|
| 52 |
+
|
| 53 |
+
# Insert a blank line before a 'def' or 'class' immediately nested
|
| 54 |
+
# within another 'def' or 'class'. For example:
|
| 55 |
+
#
|
| 56 |
+
# class Foo:
|
| 57 |
+
# # <------ this blank line
|
| 58 |
+
# def method():
|
| 59 |
+
# ...
|
| 60 |
+
blank_line_before_nested_class_or_def=True
|
| 61 |
+
|
| 62 |
+
# Do not split consecutive brackets. Only relevant when
|
| 63 |
+
# dedent_closing_brackets is set. For example:
|
| 64 |
+
#
|
| 65 |
+
# call_func_that_takes_a_dict(
|
| 66 |
+
# {
|
| 67 |
+
# 'key1': 'value1',
|
| 68 |
+
# 'key2': 'value2',
|
| 69 |
+
# }
|
| 70 |
+
# )
|
| 71 |
+
#
|
| 72 |
+
# would reformat to:
|
| 73 |
+
#
|
| 74 |
+
# call_func_that_takes_a_dict({
|
| 75 |
+
# 'key1': 'value1',
|
| 76 |
+
# 'key2': 'value2',
|
| 77 |
+
# })
|
| 78 |
+
coalesce_brackets=False
|
| 79 |
+
|
| 80 |
+
# The column limit.
|
| 81 |
+
column_limit=80
|
| 82 |
+
|
| 83 |
+
# The style for continuation alignment. Possible values are:
|
| 84 |
+
#
|
| 85 |
+
# - SPACE: Use spaces for continuation alignment. This is default behavior.
|
| 86 |
+
# - FIXED: Use fixed number (CONTINUATION_INDENT_WIDTH) of columns
|
| 87 |
+
# (ie: CONTINUATION_INDENT_WIDTH/INDENT_WIDTH tabs) for continuation
|
| 88 |
+
# alignment.
|
| 89 |
+
# - LESS: Slightly left if cannot vertically align continuation lines with
|
| 90 |
+
# indent characters.
|
| 91 |
+
# - VALIGN-RIGHT: Vertically align continuation lines with indent
|
| 92 |
+
# characters. Slightly right (one more indent character) if cannot
|
| 93 |
+
# vertically align continuation lines with indent characters.
|
| 94 |
+
#
|
| 95 |
+
# For options FIXED, and VALIGN-RIGHT are only available when USE_TABS is
|
| 96 |
+
# enabled.
|
| 97 |
+
continuation_align_style=SPACE
|
| 98 |
+
|
| 99 |
+
# Indent width used for line continuations.
|
| 100 |
+
continuation_indent_width=4
|
| 101 |
+
|
| 102 |
+
# Put closing brackets on a separate line, dedented, if the bracketed
|
| 103 |
+
# expression can't fit in a single line. Applies to all kinds of brackets,
|
| 104 |
+
# including function definitions and calls. For example:
|
| 105 |
+
#
|
| 106 |
+
# config = {
|
| 107 |
+
# 'key1': 'value1',
|
| 108 |
+
# 'key2': 'value2',
|
| 109 |
+
# } # <--- this bracket is dedented and on a separate line
|
| 110 |
+
#
|
| 111 |
+
# time_series = self.remote_client.query_entity_counters(
|
| 112 |
+
# entity='dev3246.region1',
|
| 113 |
+
# key='dns.query_latency_tcp',
|
| 114 |
+
# transform=Transformation.AVERAGE(window=timedelta(seconds=60)),
|
| 115 |
+
# start_ts=now()-timedelta(days=3),
|
| 116 |
+
# end_ts=now(),
|
| 117 |
+
# ) # <--- this bracket is dedented and on a separate line
|
| 118 |
+
dedent_closing_brackets=False
|
| 119 |
+
|
| 120 |
+
# Disable the heuristic which places each list element on a separate line
|
| 121 |
+
# if the list is comma-terminated.
|
| 122 |
+
disable_ending_comma_heuristic=False
|
| 123 |
+
|
| 124 |
+
# Place each dictionary entry onto its own line.
|
| 125 |
+
each_dict_entry_on_separate_line=True
|
| 126 |
+
|
| 127 |
+
# The regex for an i18n comment. The presence of this comment stops
|
| 128 |
+
# reformatting of that line, because the comments are required to be
|
| 129 |
+
# next to the string they translate.
|
| 130 |
+
i18n_comment=#\..*
|
| 131 |
+
|
| 132 |
+
# The i18n function call names. The presence of this function stops
|
| 133 |
+
# reformattting on that line, because the string it has cannot be moved
|
| 134 |
+
# away from the i18n comment.
|
| 135 |
+
i18n_function_call=N_, _
|
| 136 |
+
|
| 137 |
+
# Indent blank lines.
|
| 138 |
+
indent_blank_lines=False
|
| 139 |
+
|
| 140 |
+
# Indent the dictionary value if it cannot fit on the same line as the
|
| 141 |
+
# dictionary key. For example:
|
| 142 |
+
#
|
| 143 |
+
# config = {
|
| 144 |
+
# 'key1':
|
| 145 |
+
# 'value1',
|
| 146 |
+
# 'key2': value1 +
|
| 147 |
+
# value2,
|
| 148 |
+
# }
|
| 149 |
+
indent_dictionary_value=False
|
| 150 |
+
|
| 151 |
+
# The number of columns to use for indentation.
|
| 152 |
+
indent_width=4
|
| 153 |
+
|
| 154 |
+
# Join short lines into one line. E.g., single line 'if' statements.
|
| 155 |
+
join_multiple_lines=True
|
| 156 |
+
|
| 157 |
+
# Do not include spaces around selected binary operators. For example:
|
| 158 |
+
#
|
| 159 |
+
# 1 + 2 * 3 - 4 / 5
|
| 160 |
+
#
|
| 161 |
+
# will be formatted as follows when configured with "*,/":
|
| 162 |
+
#
|
| 163 |
+
# 1 + 2*3 - 4/5
|
| 164 |
+
#
|
| 165 |
+
no_spaces_around_selected_binary_operators=
|
| 166 |
+
|
| 167 |
+
# Use spaces around default or named assigns.
|
| 168 |
+
spaces_around_default_or_named_assign=False
|
| 169 |
+
|
| 170 |
+
# Use spaces around the power operator.
|
| 171 |
+
spaces_around_power_operator=False
|
| 172 |
+
|
| 173 |
+
# The number of spaces required before a trailing comment.
|
| 174 |
+
# This can be a single value (representing the number of spaces
|
| 175 |
+
# before each trailing comment) or list of values (representing
|
| 176 |
+
# alignment column values; trailing comments within a block will
|
| 177 |
+
# be aligned to the first column value that is greater than the maximum
|
| 178 |
+
# line length within the block). For example:
|
| 179 |
+
#
|
| 180 |
+
# With spaces_before_comment=5:
|
| 181 |
+
#
|
| 182 |
+
# 1 + 1 # Adding values
|
| 183 |
+
#
|
| 184 |
+
# will be formatted as:
|
| 185 |
+
#
|
| 186 |
+
# 1 + 1 # Adding values <-- 5 spaces between the end of the statement and comment
|
| 187 |
+
#
|
| 188 |
+
# With spaces_before_comment=15, 20:
|
| 189 |
+
#
|
| 190 |
+
# 1 + 1 # Adding values
|
| 191 |
+
# two + two # More adding
|
| 192 |
+
#
|
| 193 |
+
# longer_statement # This is a longer statement
|
| 194 |
+
# short # This is a shorter statement
|
| 195 |
+
#
|
| 196 |
+
# a_very_long_statement_that_extends_beyond_the_final_column # Comment
|
| 197 |
+
# short # This is a shorter statement
|
| 198 |
+
#
|
| 199 |
+
# will be formatted as:
|
| 200 |
+
#
|
| 201 |
+
# 1 + 1 # Adding values <-- end of line comments in block aligned to col 15
|
| 202 |
+
# two + two # More adding
|
| 203 |
+
#
|
| 204 |
+
# longer_statement # This is a longer statement <-- end of line comments in block aligned to col 20
|
| 205 |
+
# short # This is a shorter statement
|
| 206 |
+
#
|
| 207 |
+
# a_very_long_statement_that_extends_beyond_the_final_column # Comment <-- the end of line comments are aligned based on the line length
|
| 208 |
+
# short # This is a shorter statement
|
| 209 |
+
#
|
| 210 |
+
spaces_before_comment=2
|
| 211 |
+
|
| 212 |
+
# Insert a space between the ending comma and closing bracket of a list,
|
| 213 |
+
# etc.
|
| 214 |
+
space_between_ending_comma_and_closing_bracket=False
|
| 215 |
+
|
| 216 |
+
# Split before arguments
|
| 217 |
+
split_all_comma_separated_values=False
|
| 218 |
+
|
| 219 |
+
# Split before arguments if the argument list is terminated by a
|
| 220 |
+
# comma.
|
| 221 |
+
split_arguments_when_comma_terminated=False
|
| 222 |
+
|
| 223 |
+
# Set to True to prefer splitting before '&', '|' or '^' rather than
|
| 224 |
+
# after.
|
| 225 |
+
split_before_bitwise_operator=False
|
| 226 |
+
|
| 227 |
+
# Split before the closing bracket if a list or dict literal doesn't fit on
|
| 228 |
+
# a single line.
|
| 229 |
+
split_before_closing_bracket=True
|
| 230 |
+
|
| 231 |
+
# Split before a dictionary or set generator (comp_for). For example, note
|
| 232 |
+
# the split before the 'for':
|
| 233 |
+
#
|
| 234 |
+
# foo = {
|
| 235 |
+
# variable: 'Hello world, have a nice day!'
|
| 236 |
+
# for variable in bar if variable != 42
|
| 237 |
+
# }
|
| 238 |
+
split_before_dict_set_generator=False
|
| 239 |
+
|
| 240 |
+
# Split before the '.' if we need to split a longer expression:
|
| 241 |
+
#
|
| 242 |
+
# foo = ('This is a really long string: {}, {}, {}, {}'.format(a, b, c, d))
|
| 243 |
+
#
|
| 244 |
+
# would reformat to something like:
|
| 245 |
+
#
|
| 246 |
+
# foo = ('This is a really long string: {}, {}, {}, {}'
|
| 247 |
+
# .format(a, b, c, d))
|
| 248 |
+
split_before_dot=False
|
| 249 |
+
|
| 250 |
+
# Split after the opening paren which surrounds an expression if it doesn't
|
| 251 |
+
# fit on a single line.
|
| 252 |
+
split_before_expression_after_opening_paren=False
|
| 253 |
+
|
| 254 |
+
# If an argument / parameter list is going to be split, then split before
|
| 255 |
+
# the first argument.
|
| 256 |
+
split_before_first_argument=False
|
| 257 |
+
|
| 258 |
+
# Set to True to prefer splitting before 'and' or 'or' rather than
|
| 259 |
+
# after.
|
| 260 |
+
split_before_logical_operator=False
|
| 261 |
+
|
| 262 |
+
# Split named assignments onto individual lines.
|
| 263 |
+
split_before_named_assigns=True
|
| 264 |
+
|
| 265 |
+
# Set to True to split list comprehensions and generators that have
|
| 266 |
+
# non-trivial expressions and multiple clauses before each of these
|
| 267 |
+
# clauses. For example:
|
| 268 |
+
#
|
| 269 |
+
# result = [
|
| 270 |
+
# a_long_var + 100 for a_long_var in xrange(1000)
|
| 271 |
+
# if a_long_var % 10]
|
| 272 |
+
#
|
| 273 |
+
# would reformat to something like:
|
| 274 |
+
#
|
| 275 |
+
# result = [
|
| 276 |
+
# a_long_var + 100
|
| 277 |
+
# for a_long_var in xrange(1000)
|
| 278 |
+
# if a_long_var % 10]
|
| 279 |
+
split_complex_comprehension=True
|
| 280 |
+
|
| 281 |
+
# The penalty for splitting right after the opening bracket.
|
| 282 |
+
split_penalty_after_opening_bracket=30
|
| 283 |
+
|
| 284 |
+
# The penalty for splitting the line after a unary operator.
|
| 285 |
+
split_penalty_after_unary_operator=10000
|
| 286 |
+
|
| 287 |
+
# The penalty for splitting right before an if expression.
|
| 288 |
+
split_penalty_before_if_expr=0
|
| 289 |
+
|
| 290 |
+
# The penalty of splitting the line around the '&', '|', and '^'
|
| 291 |
+
# operators.
|
| 292 |
+
split_penalty_bitwise_operator=300
|
| 293 |
+
|
| 294 |
+
# The penalty for splitting a list comprehension or generator
|
| 295 |
+
# expression.
|
| 296 |
+
split_penalty_comprehension=2100
|
| 297 |
+
|
| 298 |
+
# The penalty for characters over the column limit.
|
| 299 |
+
split_penalty_excess_character=7000
|
| 300 |
+
|
| 301 |
+
# The penalty incurred by adding a line split to the unwrapped line. The
|
| 302 |
+
# more line splits added the higher the penalty.
|
| 303 |
+
split_penalty_for_added_line_split=30
|
| 304 |
+
|
| 305 |
+
# The penalty of splitting a list of "import as" names. For example:
|
| 306 |
+
#
|
| 307 |
+
# from a_very_long_or_indented_module_name_yada_yad import (long_argument_1,
|
| 308 |
+
# long_argument_2,
|
| 309 |
+
# long_argument_3)
|
| 310 |
+
#
|
| 311 |
+
# would reformat to something like:
|
| 312 |
+
#
|
| 313 |
+
# from a_very_long_or_indented_module_name_yada_yad import (
|
| 314 |
+
# long_argument_1, long_argument_2, long_argument_3)
|
| 315 |
+
split_penalty_import_names=0
|
| 316 |
+
|
| 317 |
+
# The penalty of splitting the line around the 'and' and 'or'
|
| 318 |
+
# operators.
|
| 319 |
+
split_penalty_logical_operator=300
|
| 320 |
+
|
| 321 |
+
# Use the Tab character for indentation.
|
| 322 |
+
use_tabs=False
|
| 323 |
+
|
third_party/diffusion_policy/diffusion_policy/env/kitchen/relay_policy_learning/adept_envs/adept_envs/__init__.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/python
|
| 2 |
+
#
|
| 3 |
+
# Copyright 2020 Google LLC
|
| 4 |
+
#
|
| 5 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 6 |
+
# you may not use this file except in compliance with the License.
|
| 7 |
+
# You may obtain a copy of the License at
|
| 8 |
+
#
|
| 9 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
#
|
| 11 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
# See the License for the specific language governing permissions and
|
| 15 |
+
# limitations under the License.
|
| 16 |
+
|
| 17 |
+
import adept_envs.franka
|
| 18 |
+
|
| 19 |
+
from adept_envs.utils.configurable import global_config
|
third_party/diffusion_policy/diffusion_policy/env/kitchen/relay_policy_learning/adept_envs/adept_envs/base_robot.py
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/python
|
| 2 |
+
#
|
| 3 |
+
# Copyright 2020 Google LLC
|
| 4 |
+
#
|
| 5 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 6 |
+
# you may not use this file except in compliance with the License.
|
| 7 |
+
# You may obtain a copy of the License at
|
| 8 |
+
#
|
| 9 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
#
|
| 11 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
# See the License for the specific language governing permissions and
|
| 15 |
+
# limitations under the License.
|
| 16 |
+
|
| 17 |
+
import numpy as np
|
| 18 |
+
from collections import deque
|
| 19 |
+
|
| 20 |
+
class BaseRobot(object):
|
| 21 |
+
"""Base class for all robot classes."""
|
| 22 |
+
|
| 23 |
+
def __init__(self,
|
| 24 |
+
n_jnt,
|
| 25 |
+
n_obj,
|
| 26 |
+
pos_bounds=None,
|
| 27 |
+
vel_bounds=None,
|
| 28 |
+
calibration_path=None,
|
| 29 |
+
is_hardware=False,
|
| 30 |
+
device_name=None,
|
| 31 |
+
overlay=False,
|
| 32 |
+
calibration_mode=False,
|
| 33 |
+
observation_cache_maxsize=5):
|
| 34 |
+
"""Create a new robot.
|
| 35 |
+
Args:
|
| 36 |
+
n_jnt: The number of dofs in the robot.
|
| 37 |
+
n_obj: The number of dofs in the object.
|
| 38 |
+
pos_bounds: (n_jnt, 2)-shape matrix denoting the min and max joint
|
| 39 |
+
position for each joint.
|
| 40 |
+
vel_bounds: (n_jnt, 2)-shape matrix denoting the min and max joint
|
| 41 |
+
velocity for each joint.
|
| 42 |
+
calibration_path: File path to the calibration configuration file to
|
| 43 |
+
use.
|
| 44 |
+
is_hardware: Whether to run on hardware or not.
|
| 45 |
+
device_name: The device path for the robot hardware. Only required
|
| 46 |
+
in legacy mode.
|
| 47 |
+
overlay: Whether to show a simulation overlay of the hardware.
|
| 48 |
+
calibration_mode: Start with motors disengaged.
|
| 49 |
+
"""
|
| 50 |
+
|
| 51 |
+
assert n_jnt > 0
|
| 52 |
+
assert n_obj >= 0
|
| 53 |
+
|
| 54 |
+
self._n_jnt = n_jnt
|
| 55 |
+
self._n_obj = n_obj
|
| 56 |
+
self._n_dofs = n_jnt + n_obj
|
| 57 |
+
|
| 58 |
+
self._pos_bounds = None
|
| 59 |
+
if pos_bounds is not None:
|
| 60 |
+
pos_bounds = np.array(pos_bounds, dtype=np.float32)
|
| 61 |
+
assert pos_bounds.shape == (self._n_dofs, 2)
|
| 62 |
+
for low, high in pos_bounds:
|
| 63 |
+
assert low < high
|
| 64 |
+
self._pos_bounds = pos_bounds
|
| 65 |
+
self._vel_bounds = None
|
| 66 |
+
if vel_bounds is not None:
|
| 67 |
+
vel_bounds = np.array(vel_bounds, dtype=np.float32)
|
| 68 |
+
assert vel_bounds.shape == (self._n_dofs, 2)
|
| 69 |
+
for low, high in vel_bounds:
|
| 70 |
+
assert low < high
|
| 71 |
+
self._vel_bounds = vel_bounds
|
| 72 |
+
|
| 73 |
+
self._is_hardware = is_hardware
|
| 74 |
+
self._device_name = device_name
|
| 75 |
+
self._calibration_path = calibration_path
|
| 76 |
+
self._overlay = overlay
|
| 77 |
+
self._calibration_mode = calibration_mode
|
| 78 |
+
self._observation_cache_maxsize = observation_cache_maxsize
|
| 79 |
+
|
| 80 |
+
# Gets updated
|
| 81 |
+
self._observation_cache = deque([], maxlen=self._observation_cache_maxsize)
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
@property
|
| 85 |
+
def n_jnt(self):
|
| 86 |
+
return self._n_jnt
|
| 87 |
+
|
| 88 |
+
@property
|
| 89 |
+
def n_obj(self):
|
| 90 |
+
return self._n_obj
|
| 91 |
+
|
| 92 |
+
@property
|
| 93 |
+
def n_dofs(self):
|
| 94 |
+
return self._n_dofs
|
| 95 |
+
|
| 96 |
+
@property
|
| 97 |
+
def pos_bounds(self):
|
| 98 |
+
return self._pos_bounds
|
| 99 |
+
|
| 100 |
+
@property
|
| 101 |
+
def vel_bounds(self):
|
| 102 |
+
return self._vel_bounds
|
| 103 |
+
|
| 104 |
+
@property
|
| 105 |
+
def is_hardware(self):
|
| 106 |
+
return self._is_hardware
|
| 107 |
+
|
| 108 |
+
@property
|
| 109 |
+
def device_name(self):
|
| 110 |
+
return self._device_name
|
| 111 |
+
|
| 112 |
+
@property
|
| 113 |
+
def calibration_path(self):
|
| 114 |
+
return self._calibration_path
|
| 115 |
+
|
| 116 |
+
@property
|
| 117 |
+
def overlay(self):
|
| 118 |
+
return self._overlay
|
| 119 |
+
|
| 120 |
+
@property
|
| 121 |
+
def has_obj(self):
|
| 122 |
+
return self._n_obj > 0
|
| 123 |
+
|
| 124 |
+
@property
|
| 125 |
+
def calibration_mode(self):
|
| 126 |
+
return self._calibration_mode
|
| 127 |
+
|
| 128 |
+
@property
|
| 129 |
+
def observation_cache_maxsize(self):
|
| 130 |
+
return self._observation_cache_maxsize
|
| 131 |
+
|
| 132 |
+
@property
|
| 133 |
+
def observation_cache(self):
|
| 134 |
+
return self._observation_cache
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
def clip_positions(self, positions):
|
| 138 |
+
"""Clips the given joint positions to the position bounds.
|
| 139 |
+
|
| 140 |
+
Args:
|
| 141 |
+
positions: The joint positions.
|
| 142 |
+
|
| 143 |
+
Returns:
|
| 144 |
+
The bounded joint positions.
|
| 145 |
+
"""
|
| 146 |
+
if self.pos_bounds is None:
|
| 147 |
+
return positions
|
| 148 |
+
assert len(positions) == self.n_jnt or len(positions) == self.n_dofs
|
| 149 |
+
pos_bounds = self.pos_bounds[:len(positions)]
|
| 150 |
+
return np.clip(positions, pos_bounds[:, 0], pos_bounds[:, 1])
|
| 151 |
+
|
third_party/diffusion_policy/diffusion_policy/env/kitchen/relay_policy_learning/adept_envs/adept_envs/franka/__init__.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/python
|
| 2 |
+
#
|
| 3 |
+
# Copyright 2020 Google LLC
|
| 4 |
+
#
|
| 5 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 6 |
+
# you may not use this file except in compliance with the License.
|
| 7 |
+
# You may obtain a copy of the License at
|
| 8 |
+
#
|
| 9 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
#
|
| 11 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
# See the License for the specific language governing permissions and
|
| 15 |
+
# limitations under the License.
|
| 16 |
+
|
| 17 |
+
from gym.envs.registration import register
|
| 18 |
+
|
| 19 |
+
# Relax the robot
|
| 20 |
+
register(
|
| 21 |
+
id='kitchen_relax-v1',
|
| 22 |
+
entry_point='adept_envs.franka.kitchen_multitask_v0:KitchenTaskRelaxV1',
|
| 23 |
+
max_episode_steps=280,
|
| 24 |
+
)
|
third_party/diffusion_policy/diffusion_policy/env/kitchen/relay_policy_learning/adept_envs/adept_envs/franka/assets/franka_kitchen_jntpos_act_ab.xml
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!--Copyright 2020 Google LLC-->
|
| 2 |
+
|
| 3 |
+
<!--Licensed under the Apache License, Version 2.0 (the "License");-->
|
| 4 |
+
<!--you may not use this file except in compliance with the License.-->
|
| 5 |
+
<!--You may obtain a copy of the License at-->
|
| 6 |
+
|
| 7 |
+
<!--https://www.apache.org/licenses/LICENSE-2.0-->
|
| 8 |
+
|
| 9 |
+
<!--Unless required by applicable law or agreed to in writing, software-->
|
| 10 |
+
<!--distributed under the License is distributed on an "AS IS" BASIS,-->
|
| 11 |
+
<!--WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-->
|
| 12 |
+
<!--See the License for the specific language governing permissions and-->
|
| 13 |
+
<!--limitations under the License.-->
|
| 14 |
+
|
| 15 |
+
<mujoco model="franka_mocap_studyTable_buttons">
|
| 16 |
+
|
| 17 |
+
<size njmax='1000' nconmax='1000'/>
|
| 18 |
+
|
| 19 |
+
<include file="../../../../adept_models/scenes/basic_scene.xml"/>
|
| 20 |
+
<include file="../../../../third_party/franka/assets/assets.xml"/>
|
| 21 |
+
<include file="../../../../third_party/franka/assets/actuator0.xml"/>
|
| 22 |
+
<include file="../../../../adept_models/kitchen/assets/oven_asset.xml"/>
|
| 23 |
+
<include file="../../../../adept_models/kitchen/assets/counters_asset.xml"/>
|
| 24 |
+
<include file="../../../../adept_models/kitchen/assets/backwall_asset.xml"/>
|
| 25 |
+
<include file="../../../../adept_models/kitchen/assets/slidecabinet_asset.xml"/>
|
| 26 |
+
<include file="../../../../adept_models/kitchen/assets/hingecabinet_asset.xml"/>
|
| 27 |
+
<include file="../../../../adept_models/kitchen/assets/microwave_asset.xml"/>
|
| 28 |
+
<include file="../../../../adept_models/kitchen/assets/kettle_asset.xml"/>
|
| 29 |
+
|
| 30 |
+
<visual>
|
| 31 |
+
<global offwidth="2560" offheight="1920" />
|
| 32 |
+
<quality shadowsize="4096" offsamples="8" />
|
| 33 |
+
<map force="0.1" fogend="5" />
|
| 34 |
+
</visual>
|
| 35 |
+
|
| 36 |
+
<compiler inertiafromgeom='auto' inertiagrouprange='3 5' angle="radian"
|
| 37 |
+
meshdir="../../../../adept_models/kitchen"
|
| 38 |
+
texturedir="../../../../adept_models/kitchen"/>
|
| 39 |
+
|
| 40 |
+
<equality>
|
| 41 |
+
<weld body1="vive_controller" body2="world" solref="0.02 1" solimp=".7 .95 0.050"/>
|
| 42 |
+
</equality>
|
| 43 |
+
|
| 44 |
+
<worldbody>
|
| 45 |
+
|
| 46 |
+
<!-- Mocap -->
|
| 47 |
+
<body name="vive_controller" mocap="true" pos="-0.440 -0.092 2.026" euler="-1.57 0 -.785">
|
| 48 |
+
<geom type="box" group="2" pos='0 0 .142' size="0.02 0.10 0.03" contype="0" conaffinity="0" rgba=".9 .7 .95 0" euler="0 0 -.785"/>
|
| 49 |
+
</body>
|
| 50 |
+
|
| 51 |
+
<site name='target' pos='0 0 0' size='0.1' rgba='0 2 0 .2'/>
|
| 52 |
+
<camera name='left_cap' pos='-1.2 -0.5 1.8' quat='0.78 0.49 -0.22 -0.32' />
|
| 53 |
+
<camera name='right_cap' pos='1.2 -0.5 1.8' quat='0.76 0.5 0.21 0.35'/>
|
| 54 |
+
|
| 55 |
+
<!-- Robot -->
|
| 56 |
+
<body pos='0. 0 1.8' euler='0 0 1.57'>
|
| 57 |
+
<geom type='cylinder' size='.120 .90' pos='-.04 0 -0.90' class='panda_viz'/>
|
| 58 |
+
<include file="../../../../third_party/franka/assets/chain0.xml"/>
|
| 59 |
+
</body>
|
| 60 |
+
|
| 61 |
+
<body name='desk' pos='-0.1 0.75 0'>
|
| 62 |
+
|
| 63 |
+
<body name="counters1" pos="0 0 0" >
|
| 64 |
+
<include file="../../../../adept_models/kitchen/assets/counters_chain.xml"/>
|
| 65 |
+
</body>
|
| 66 |
+
<body name="oven" pos="0 0 0" >
|
| 67 |
+
<include file="../../../../adept_models/kitchen/assets/oven_chain.xml"/>
|
| 68 |
+
</body>
|
| 69 |
+
<body name="backwall" pos="0 0 0" >
|
| 70 |
+
<include file="../../../../adept_models/kitchen/assets/backwall_chain.xml"/>
|
| 71 |
+
</body>
|
| 72 |
+
<body name="slidecabinet" pos="0.4 0.3 2.6" >
|
| 73 |
+
<include file="../../../../adept_models/kitchen/assets/slidecabinet_chain.xml"/>
|
| 74 |
+
</body>
|
| 75 |
+
<body name="hingecabinet" pos="-0.504 0.28 2.6" >
|
| 76 |
+
<include file="../../../../adept_models/kitchen/assets/hingecabinet_chain.xml"/>
|
| 77 |
+
</body>
|
| 78 |
+
<body name="microwave" pos="-0.750 -0.025 1.6" euler="0 0 0.3">
|
| 79 |
+
<include file="../../../../adept_models/kitchen/assets/microwave_chain.xml"/>
|
| 80 |
+
</body>
|
| 81 |
+
</body>
|
| 82 |
+
<body name="kettle" pos="-0.269 0.35 1.626">
|
| 83 |
+
<freejoint/>
|
| 84 |
+
<include file="../../../../adept_models/kitchen/assets/kettle_chain.xml"/>
|
| 85 |
+
</body>
|
| 86 |
+
|
| 87 |
+
</worldbody>
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
<keyframe>
|
| 91 |
+
<key qpos='0.16 -1.76 1.84 -2.51 0.36 0.79 1.55 0.00 0.0 1.25561e-05 1.57437e-07 1.25561e-05 1.57437e-07 1.25561e-05 1.57437e-07 1.25561e-05 1.57437e-07 8.24417e-05 9.48283e-05 0 0 0 0 -0.269 0.35 1.61523 1 1.34939e-19 -3.51612e-05 -7.50168e-19'/>
|
| 92 |
+
</keyframe>
|
| 93 |
+
|
| 94 |
+
</mujoco>
|