default deploy with c=0.19 calibration, add postprocess_base_action to utils.py for shrinked angular vel

这个提交包含在:
Zipeng Fu
2023-11-02 23:46:29 -07:00
父节点 5ab307d5c4
当前提交 4cec62314b
共有 2 个文件被更改,包括 8 次插入 和 2 次删除

查看文件

@ -14,7 +14,7 @@ from constants import DT
from constants import PUPPET_GRIPPER_JOINT_OPEN
from utils import load_data # data functions
from utils import sample_box_pose, sample_insertion_pose # robot functions
from utils import compute_dict_mean, set_seed, detach_dict, calibrate_linear_vel # helper functions
from utils import compute_dict_mean, set_seed, detach_dict, calibrate_linear_vel, postprocess_base_action # helper functions
from policy import ACTPolicy, CNNMLPPolicy
from visualize_episodes import save_videos
@ -316,7 +316,8 @@ def eval_bc(config, ckpt_name, save_episode=True, num_rollouts=50):
action = post_process(raw_action)
target_qpos = action[:-2]
base_action = action[-2:]
base_action = calibrate_linear_vel(base_action, c=0)
base_action = calibrate_linear_vel(base_action, c=0.19)
# base_action = postprocess_base_action(base_action)
### step the environment
if real_robot:

查看文件

@ -208,6 +208,11 @@ def preprocess_base_action(base_action):
return base_action
def postprocess_base_action(self, base_action):
linear_vel, angular_vel = base_action
angular_vel *= 0.9
return np.array([linear_vel, angular_vel])
### env utils
def sample_box_pose():