Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0311f22be9 | |||
| e3152ceebb | |||
| 20c819346c | |||
| 3226ef99c1 |
@@ -256,7 +256,7 @@ class Kick_3M(gym.Env):
|
|||||||
waiting_steps += 1
|
waiting_steps += 1
|
||||||
dis = np.linalg.norm(self.ball_pos - w.ball_cheat_abs_pos)
|
dis = np.linalg.norm(self.ball_pos - w.ball_cheat_abs_pos)
|
||||||
|
|
||||||
reward = 10 - abs(3 - dis) - abs(w.ball_cheat_abs_pos[1] - self.ball_pos[1])
|
reward = 3 - abs(3 - dis) - abs(w.ball_cheat_abs_pos[1] - self.ball_pos[1])
|
||||||
if self.isfallen or w.ball_cheat_abs_pos[0] < self.ball_pos[0]:
|
if self.isfallen or w.ball_cheat_abs_pos[0] < self.ball_pos[0]:
|
||||||
reward = 0
|
reward = 0
|
||||||
# print(reward)
|
# print(reward)
|
||||||
@@ -282,7 +282,7 @@ class Train(Train_Base):
|
|||||||
minibatch_size = 64 # should be a factor of (n_steps_per_env * n_envs)
|
minibatch_size = 64 # should be a factor of (n_steps_per_env * n_envs)
|
||||||
total_steps = 30000000
|
total_steps = 30000000
|
||||||
learning_rate = 3e-5
|
learning_rate = 3e-5
|
||||||
folder_name = f'kick_moving_ball_R{self.robot_type}'
|
folder_name = f'Kick_3M_R{self.robot_type}'
|
||||||
model_path = f'./scripts/gyms/logs/{folder_name}/'
|
model_path = f'./scripts/gyms/logs/{folder_name}/'
|
||||||
|
|
||||||
# print("Model path:", model_path)
|
# print("Model path:", model_path)
|
||||||
|
|||||||
14
train.sh
Executable file
14
train.sh
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source /home/apollo/下载/Anaconda/etc/profile.d/conda.sh
|
||||||
|
conda activate gym
|
||||||
|
|
||||||
|
export MKL_SERVICE_FORCE_INTEL=1
|
||||||
|
export MKL_THREADING_LAYER=GNU
|
||||||
|
export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
|
||||||
|
|
||||||
|
pkill -f rcssserver3d 2>/dev/null || true
|
||||||
|
pkill -f simspark 2>/dev/null || true
|
||||||
|
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
python Run_Utils.py
|
||||||
Reference in New Issue
Block a user