Skip to content

Commit a737062

Browse files
authored
Merge pull request AtsushiSakai#246 from goktug97/fix_dwa_rot
DWA Fix wrong rotation direction
2 parents 5b2f86d + 97570de commit a737062

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PathPlanning/DynamicWindowApproach/dynamic_window_approach.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
Mobile robot motion planning sample with Dynamic Window Approach
44
5-
author: Atsushi Sakai (@Atsushi_twi), Goktug Karakasli
5+
author: Atsushi Sakai (@Atsushi_twi), Göktuğ Karakaşlı
66
77
"""
88

@@ -172,7 +172,7 @@ def calc_obstacle_cost(trajectory, ob, config):
172172
rot = np.transpose(rot, [2, 0, 1])
173173
local_ob = ob[:, None] - trajectory[:, 0:2]
174174
local_ob = local_ob.reshape(-1, local_ob.shape[-1])
175-
local_ob = np.array([local_ob @ -x for x in rot])
175+
local_ob = np.array([local_ob @ x for x in rot])
176176
local_ob = local_ob.reshape(-1, local_ob.shape[-1])
177177
upper_check = local_ob[:, 0] <= config.robot_length / 2
178178
right_check = local_ob[:, 1] <= config.robot_width / 2

0 commit comments

Comments
 (0)