Closed eiyooooo closed 1 year ago
应在Follow函数中判断速度差和距离是否在范围内,再执行fuzzy_compute函数
@eiyooooo 感谢,我会在后面解决这个问题
@Yutong-gannis 我判断了速度差和距离再执行模糊控制,但是距离在142的时候也会出错,按道理来说142也在范围内吧
@Yutong-gannis 我判断了速度差和距离再执行模糊控制,但是距离在142的时候也会出错,按道理来说142也在范围内吧
应该是速度差小于0出的问题
Crisp output cannot be calculated, likely because the system is too sparse. Check to make sure this set of input values will activate at least one connected Term in each Antecedent via the current set of Rules. AssertionError: Total area is zero in defuzzification!
During handling of the above exception, another exception occurred:
File "xxx\Self-driving-Truck-in-Euro-Truck-Simulator2\Control\controllers\fuzzy_controller.py", line 108, in fuzzy_compute fuzzy_system.compute() File "xxx\Self-driving-Truck-in-Euro-Truck-Simulator2\Planning\Follow.py", line 17, in Follow acc = fuzzy_compute(vertical_fuzzy, dspeed, distance) File "xxx\Self-driving-Truck-in-Euro-Truck-Simulator2\script\main.py", line 182, in
acc, ang = Follow(cipv, vertical_fuzzy, horizontal_pid, nav_line)
ValueError: Crisp output cannot be calculated, likely because the system is too sparse. Check to make sure this set of input values will activate at least one connected Term in each Antecedent via the current set of Rules.