Replaced custom value of max_vel with max_velocity()
Functionality works with reverse and max vehicle speed