diff --git a/alr_envs/mujoco/ball_in_a_cup/utils.py b/alr_envs/mujoco/ball_in_a_cup/utils.py index a9a7098..39c8a8f 100644 --- a/alr_envs/mujoco/ball_in_a_cup/utils.py +++ b/alr_envs/mujoco/ball_in_a_cup/utils.py @@ -88,13 +88,13 @@ def make_simple_env(rank, seed=0): env = DetPMPEnvWrapper(env, num_dof=3, num_basis=5, - width=0.005, + width=0.02, policy_type="motor", start_pos=env.start_pos[1::2], duration=3.5, post_traj_time=4.5, dt=env.dt, - weights_scale=0.5, + weights_scale=0.2, zero_start=True, zero_goal=True ) diff --git a/dmp_pd_control_example.py b/dmp_pd_control_example.py index 9cb8798..67c09b4 100644 --- a/dmp_pd_control_example.py +++ b/dmp_pd_control_example.py @@ -1,11 +1,11 @@ -from alr_envs.mujoco.ball_in_a_cup.utils import make_env +from alr_envs.mujoco.ball_in_a_cup.utils import make_env, make_simple_env from alr_envs.utils.dmp_async_vec_env import DmpAsyncVectorEnv import numpy as np if __name__ == "__main__": - dim = 35 + dim = 15 n_cpus = 4 # n_samples = 10 @@ -18,9 +18,12 @@ if __name__ == "__main__": # rewards, infos = vec_env(params) # print(rewards) # - non_vec_env = make_env(0, 0)() + non_vec_env = make_simple_env(0, 0)() - params = 0.5 * np.random.randn(dim) + # params = 0.5 * np.random.randn(dim) + params = np.array([[11.90777345, 4.47656072, -2.49030537, 2.29386444, -3.5645336 , + 2.97729181, 4.65224072, 3.72020235, 4.3658366 , -5.8489886 , + 9.8045112 , 2.95405854, 4.56178261, 4.70669295, 4.55522522]]) out2 = non_vec_env.rollout(params, render=True)