bugfix:two arm octopus target object initializatio
This commit fixes a bug in random target object initialization for
different episodes
@@ -129,6 +129,9 @@ def main():
# Set simulation final time
final_time = 10.0
+ # Do multiple simulations for learning, or control
+ for i_episodes in range(1):
+
# Initialize the environment
# Make RANDOM_TARGET_POSITION=True for randomly initialize cylinder for task 6
RANDOM_TARGET_POSITION = False
@@ -136,13 +139,13 @@ def main():
alpha = 2 * np.pi * np.random.sample()
target_position = np.array([1.0 * np.sin(alpha), 1.0 * np.cos(alpha), 0.0])
else:
- target_position = np.array([0.8, -0.8, 0.0]) # target object initial position
-
- env = Environment(final_time, target_position, COLLECT_DATA_FOR_POSTPROCESSING=True)
- total_steps, systems = env.reset()
+ target_position = np.array(
+ [0.8, -0.6, 0.0]
+ ) # target object initial position
- # Do multiple simulations for learning, or control
- for i_episodes in range(1):
+ env = Environment(
+ final_time, target_position, COLLECT_DATA_FOR_POSTPROCESSING=True
+ )
# Reset the environment before the new episode and get total number of simulation steps
total_steps, systems = env.reset()
