File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ function ant(;
76
76
return env
77
77
end
78
78
79
- function step (env:: Environment{Ant} , x, u;
79
+ function Base . step (env:: Environment{Ant} , x, u;
80
80
gradients= false ,
81
81
attitude_decompress= false )
82
82
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ function get_observation(env::Environment{Pendulum})
99
99
end
100
100
end
101
101
102
- function step (env:: Environment{Pendulum} , x, u;
102
+ function Base . step (env:: Environment{Pendulum} , x, u;
103
103
gradients= false ,
104
104
attitude_decompress= false )
105
105
mechanism = env. mechanism
Original file line number Diff line number Diff line change 4
4
env = Dojo. get_environment (" pendulum" ,
5
5
timestep= timestep,
6
6
gravity= - 10.0 );
7
- Dojo . reset (env);
7
+ reset (env);
8
8
Dojo. initialize_pendulum! (env. mechanism,
9
9
angle= 0.25 * π)
10
10
u1 = rand (Dojo. input_dimension (env. mechanism))
33
33
env = Dojo. get_environment (" halfcheetah" ,
34
34
timestep= timestep,
35
35
gravity= - 10.0 );
36
- Dojo . reset (env);
36
+ reset (env);
37
37
38
38
# get body
39
39
@test Dojo. get_body (env. mechanism, :origin ). name == :origin
50
50
env2 = Dojo. get_environment (:halfcheetah ,
51
51
timestep= timestep,
52
52
gravity= - 10.0 );
53
- Dojo . reset (env);
53
+ reset (env);
54
54
Dojo. set_maximal_state! (env2. mechanism, zeros (Dojo. maximal_dimension (env2. mechanism)))
55
55
z2 = Dojo. get_maximal_state (env2. mechanism)
56
56
@test norm (z2) < 1.0e-8
Original file line number Diff line number Diff line change 3
3
env = Dojo. get_environment (" pendulum" ,
4
4
timestep= 0.1 ,
5
5
gravity= 0.0 );
6
- Dojo . reset (env);
6
+ reset (env);
7
7
8
8
# step (no control)
9
9
z1 = Dojo. get_maximal_state (env. mechanism)
22
22
# get environment and simulate
23
23
env = Dojo. get_environment (" pendulum" ,
24
24
timestep= 0.1 );
25
- Dojo . reset (env);
25
+ reset (env);
26
26
Dojo. initialize_pendulum! (env. mechanism,
27
27
angle= 0.25 * π)
28
28
storage = Dojo. simulate! (env. mechanism, 1.0 ,
37
37
s = Dojo. generate_storage (env. mechanism, z)
38
38
@test typeof (s) <: Dojo.Storage
39
39
@test Dojo. length (s) == 10
40
- end
40
+ end
Original file line number Diff line number Diff line change 29
29
# get environment and simulate
30
30
env = Dojo. get_environment (" halfcheetah" ,
31
31
timestep= 0.1 )
32
- Dojo . reset (env)
32
+ reset (env)
33
33
storage = Dojo. simulate! (env. mechanism, 0.25 ,
34
34
record= true ,
35
35
verbose= true );
43
43
vis = Dojo. Visualizer ();
44
44
# get environment and simulate
45
45
env = Dojo. get_environment (" quadruped" , timestep= 0.1 )
46
- Dojo . reset (env)
46
+ reset (env)
47
47
storage = Dojo. simulate! (env. mechanism, 0.25 ,
48
48
record= true ,
49
49
verbose= false )
You can’t perform that action at this time.
0 commit comments