Skip to content

Commit 8741354

Browse files
committed
working phase 2 with low collision rate
1 parent 7af52b3 commit 8741354

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

robot_nav/sim2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def get_reward(goal, collision, action, closest_robots, distance):
286286
r_dist = 1.5 / distance
287287
cl_pen = 0
288288
for rob in closest_robots:
289-
add = 2.5 - rob if rob < 2.5 else 0
289+
add = (3 - rob)**2 if rob < 3 else 0
290290
cl_pen += add
291291

292292
return -0.5 * abs(action[1]) - cl_pen

0 commit comments

Comments
 (0)