HybridRobotics / CBF-CLF-Helper

Matlab Interface for Control Barrier Function (CBF) and Control Lyapunov Function (CLF) based control methods.
257 stars 64 forks source link

Desired target point in run_cbf_clf_simulation_dubins_car.m #4

Closed Ramune6110 closed 3 years ago

Ramune6110 commented 3 years ago

Regarding run_cbf_clf_simulation_dubins_car.m, there is no change even if I change the Desired target point params.xd and params.yd. Is there a bug in the program that does not take the Desired target point into account?

Ramune6110 commented 3 years ago

I misunderstood, you are applying a function that takes the target value and deviation on the CLF side, and you are considering the constraints you want to protect on the CBF side.

ChoiJangho commented 3 years ago
Screen Shot 2021-08-03 at 1 32 31 AM

Correct, so the left plot is with params.xd = 12, params.yd = 0, and the right plot is with params.xd=14, params.yd = 6, and they are giving different results. Note that for the Dubins car system, because of its nonholonomic dynamics, it does not always converge to the exact target point. You can also play around with different clf and cbf rates.

Ramune6110 commented 3 years ago

Thanks for the thoughtful response!