get more accurate

This commit is contained in:
2024-09-07 16:47:14 +08:00
parent 4c409ace18
commit 095f63d154
7 changed files with 15 additions and 15 deletions

View File

@@ -9,7 +9,7 @@ import threading
import numba
import multiprocessing
mp.dps = 15 # 设置精度为15位小数
mp.dps = 50 # 设置精度为50位小数
kSegLength1 = mp.mpf('2.86')
kSegLength2 = mp.mpf('1.65')
@@ -35,7 +35,7 @@ def GenerateFollowNodeTheta(cur_node_theta, expected_distance):
test_node_dot = Theta2Dot(theta)
actual_distance = mp.sqrt((cur_node_dot[0]-test_node_dot[0])**2 + (cur_node_dot[1]-test_node_dot[1])**2)
return actual_distance - expected_distance
return mp.findroot(f, cur_node_theta + 0.1, solver='secant',tol=1e-20)
return mp.findroot(f, cur_node_theta + 0.1, solver='secant')
kPointsConsidered=50
def CalcMoveList(time_point):