update on biac simple pmp width
This commit is contained in:
parent
bafa28edca
commit
4e72f10ee3
@ -88,13 +88,13 @@ def make_simple_env(rank, seed=0):
|
|||||||
env = DetPMPEnvWrapper(env,
|
env = DetPMPEnvWrapper(env,
|
||||||
num_dof=3,
|
num_dof=3,
|
||||||
num_basis=5,
|
num_basis=5,
|
||||||
width=0.005,
|
width=0.02,
|
||||||
policy_type="motor",
|
policy_type="motor",
|
||||||
start_pos=env.start_pos[1::2],
|
start_pos=env.start_pos[1::2],
|
||||||
duration=3.5,
|
duration=3.5,
|
||||||
post_traj_time=4.5,
|
post_traj_time=4.5,
|
||||||
dt=env.dt,
|
dt=env.dt,
|
||||||
weights_scale=0.5,
|
weights_scale=0.2,
|
||||||
zero_start=True,
|
zero_start=True,
|
||||||
zero_goal=True
|
zero_goal=True
|
||||||
)
|
)
|
||||||
|
@ -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
|
from alr_envs.utils.dmp_async_vec_env import DmpAsyncVectorEnv
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
dim = 35
|
dim = 15
|
||||||
n_cpus = 4
|
n_cpus = 4
|
||||||
|
|
||||||
# n_samples = 10
|
# n_samples = 10
|
||||||
@ -18,9 +18,12 @@ if __name__ == "__main__":
|
|||||||
# rewards, infos = vec_env(params)
|
# rewards, infos = vec_env(params)
|
||||||
# print(rewards)
|
# 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)
|
out2 = non_vec_env.rollout(params, render=True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user