Problem with tutorial "optimization"

Dear community,
when plotting the solution of the ego vehicle in the “optimization” tutorial, the ego (green) is plotted on the initial position all the time.
Btw. is there another simple option to plot the result of the trajectory, such as an animation or a video?
Best regards,
Rudolf

Dear Rudolf,

thank you for notifying.
There is a bug in the visualization parameter configuration.
Please add ego_params.time_begin = i inside the for loop:

for i in range(0, 40):
    plt.figure(figsize=(25, 10))
    rnd = MPRenderer()
    rnd.draw_params.time_begin = i
    scenario.draw(rnd)
    ego_params.time_begin = i
    ego_vehicle.draw(rnd, draw_params=ego_params)
    planning_problem_set.draw(rnd)
    rnd.render()

We will fix the tutorial on the website and repository as soon as possible.

There exists a function for creating videos: create_video()

Best,
Sebastian

1 Like