default deploy with c=0.19 calibration, add postprocess_base_action to utils.py for shrinked angular vel
这个提交包含在:
@ -14,7 +14,7 @@ from constants import DT
|
|||||||
from constants import PUPPET_GRIPPER_JOINT_OPEN
|
from constants import PUPPET_GRIPPER_JOINT_OPEN
|
||||||
from utils import load_data # data functions
|
from utils import load_data # data functions
|
||||||
from utils import sample_box_pose, sample_insertion_pose # robot 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 policy import ACTPolicy, CNNMLPPolicy
|
||||||
from visualize_episodes import save_videos
|
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)
|
action = post_process(raw_action)
|
||||||
target_qpos = action[:-2]
|
target_qpos = action[:-2]
|
||||||
base_action = 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
|
### step the environment
|
||||||
if real_robot:
|
if real_robot:
|
||||||
|
|||||||
5
utils.py
5
utils.py
@ -208,6 +208,11 @@ def preprocess_base_action(base_action):
|
|||||||
|
|
||||||
return 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
|
### env utils
|
||||||
|
|
||||||
def sample_box_pose():
|
def sample_box_pose():
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户