fix ellisoid calculation

This commit is contained in:
Yu Okamoto
2019-02-21 22:50:50 +09:00
parent 754256d15e
commit 46aae2401f

View File

@@ -172,10 +172,10 @@ class BITStar(object):
cBest = self.g_scores[self.goalId]
# Computing the sampling space
cMin = math.sqrt(pow(self.start[0] - self.goal[1], 2)
+ pow(self.start[0] - self.goal[1], 2)) / 1.5
cMin = math.sqrt(pow(self.start[0] - self.goal[0], 2)
+ pow(self.start[1] - self.goal[1], 2)) / 1.5
xCenter = np.array([[(self.start[0] + self.goal[0]) / 2.0],
[(self.goal[1] - self.start[1]) / 2.0], [0]])
[(self.start[1] + self.goal[1]) / 2.0], [0]])
a1 = np.array([[(self.goal[0] - self.start[0]) / cMin],
[(self.goal[1] - self.start[1]) / cMin], [0]])
etheta = math.atan2(a1[1], a1[0])