continuousTrainer.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:AgileTrainer 作者: diyjac 项目源码 文件源码
def calc_lookahead_offset(v_ego, angle_steers, d_lookahead, angle_offset=0):
    #*** this function returns the lateral offset given the steering angle, speed and the lookahead distance
    curvature = calc_curvature(v_ego, angle_steers, angle_offset)

    # clip is to avoid arcsin NaNs due to too sharp turns
    y_actual = d_lookahead * np.tan(np.arcsin(np.clip(d_lookahead * curvature, -0.999, 0.999))/2.)
    return y_actual, curvature
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号