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

Add obstacle filter functionality #8

Closed AkshayThiru closed 2 years ago

AkshayThiru commented 2 years ago

1) Add obstacle filter radius method to DubinCarDyn 2) Remove non-interfering obstacles from optimization in calc_input()

AkshayThiru commented 2 years ago

I used the following logic for calculating the radius: At time k the minimum braking distance can be calculated using the maximum deceleration. If the obstacle is outside this radius at time k, then the car will not collide using the maximum deceleration. So, to ignore an obstacle at time k, it must be outside the worst possible braking distance at time k+1. min_brake_dist_next in DubinCarDyn.obstacle_filter_radius() is the worst possible braking distance at time k+1. By time k+1 the distance to the obstacle would also have reduced, which is added to the radius.