demo_car.py 文件源码

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

项目:lqRRT 作者: jnez71 项目源码 文件源码
def ani_update(arg, ii=[0]):

    i = ii[0]  # don't ask...

    if np.isclose(t_arr[i], np.around(t_arr[i], 1)):
        fig2.suptitle('Evolution (Time: {})'.format(t_arr[i]), fontsize=24)

    graphic_robot_1.center = ((x_history[i, 0]+td*np.cos(x_history[i, 2]), x_history[i, 1]+td*np.sin(x_history[i, 2])))
    graphic_robot_2.center = ((x_history[i, 0], x_history[i, 1]))
    graphic_robot_3.center = ((x_history[i, 0]-td*np.cos(x_history[i, 2]), x_history[i, 1]-td*np.sin(x_history[i, 2])))

    ii[0] += int(1 / (dt * framerate))
    if ii[0] >= len(t_arr):
        print("Resetting animation!")
        ii[0] = 0

    return None

# Run animation
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号