Skip to content

Commit 06115c5

Browse files
committed
fix test use of reset
1 parent d582161 commit 06115c5

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

test/mechanism.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
env = Dojo.get_environment("pendulum",
55
timestep=timestep,
66
gravity=-10.0);
7-
Dojo.reset(env);
7+
reset(env);
88
Dojo.initialize_pendulum!(env.mechanism,
99
angle=0.25 * π)
1010
u1 = rand(Dojo.input_dimension(env.mechanism))
@@ -33,7 +33,7 @@
3333
env = Dojo.get_environment("halfcheetah",
3434
timestep=timestep,
3535
gravity=-10.0);
36-
Dojo.reset(env);
36+
reset(env);
3737

3838
# get body
3939
@test Dojo.get_body(env.mechanism, :origin).name == :origin
@@ -50,7 +50,7 @@
5050
env2 = Dojo.get_environment(:halfcheetah,
5151
timestep=timestep,
5252
gravity=-10.0);
53-
Dojo.reset(env);
53+
reset(env);
5454
Dojo.set_maximal_state!(env2.mechanism, zeros(Dojo.maximal_dimension(env2.mechanism)))
5555
z2 = Dojo.get_maximal_state(env2.mechanism)
5656
@test norm(z2) < 1.0e-8

test/simulate.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
env = Dojo.get_environment("pendulum",
44
timestep=0.1,
55
gravity=0.0);
6-
Dojo.reset(env);
6+
reset(env);
77

88
# step (no control)
99
z1 = Dojo.get_maximal_state(env.mechanism)
@@ -22,7 +22,7 @@ end
2222
# get environment and simulate
2323
env = Dojo.get_environment("pendulum",
2424
timestep=0.1);
25-
Dojo.reset(env);
25+
reset(env);
2626
Dojo.initialize_pendulum!(env.mechanism,
2727
angle=0.25 * π)
2828
storage = Dojo.simulate!(env.mechanism, 1.0,
@@ -37,4 +37,4 @@ end
3737
s = Dojo.generate_storage(env.mechanism, z)
3838
@test typeof(s) <: Dojo.Storage
3939
@test Dojo.length(s) == 10
40-
end
40+
end

test/visuals.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ end
2929
# get environment and simulate
3030
env = Dojo.get_environment("halfcheetah",
3131
timestep=0.1)
32-
Dojo.reset(env)
32+
reset(env)
3333
storage = Dojo.simulate!(env.mechanism, 0.25,
3434
record=true,
3535
verbose=true);
@@ -43,7 +43,7 @@ end
4343
vis = Dojo.Visualizer();
4444
# get environment and simulate
4545
env = Dojo.get_environment("quadruped", timestep=0.1)
46-
Dojo.reset(env)
46+
reset(env)
4747
storage = Dojo.simulate!(env.mechanism, 0.25,
4848
record=true,
4949
verbose=false)

0 commit comments

Comments
 (0)