HybridRobotics / cbf

An open source repository for control, planning and navigation about control barrier functions.
Apache License 2.0
141 stars 26 forks source link

Bug for def safe_dist(x, timestep, amin, amax, dist_margin): #31

Open owenliu-rdc opened 9 months ago

owenliu-rdc commented 9 months ago

I have a question about the code inside the function safe_dist(x, timestep, amin, amax, dist_margin) in kinematic_car.py. Should the code:

brake_min_dist = (abs(x[2]) + amax * timestep) * 2 / (2 amax) + dist_margin

be changed to:

brake_min_dist = (abs(x[2]) + amax * timestep) * 2 / (2 abs(amin)) + dist_margin

even though in the current code amax = abs(amin)

am i right?

junzengx14 commented 6 months ago

@AkshayThiru Could you have a quick look on this? Thanks!