Unable to find precomputed numpy trajectory in tutorial

I have been following the introductory Getting Started tutorial on Drivability Checker (link here)

And one line in the tutorial code is the following:

# load precomputed numpy trajectory and get positions and velocities
traj = np.load('ZAM_Tutorial-1_2_T-1_ExampleTrajectory.npz')

However, I cannot locate the file ZAM_Tutorial-1_2_T-1_ExampleTrajectory.npz, at least not in the scenario library (scenario library link).

So my question is, where to find this file? Or how do I come up with an alternative to proceed without error? Thanks!

Ok, I found myself a solution (not the perfect probably): In the tutorial of commonroad-io, there was a place where ego vehicle trajectory was generated, and the variable names were s_ego and v_ego (here is the link to that tutorial). So my solution is to add the following line

npy.savez('ZAM_Tutorial-1_2_T-1_ExampleTrajectory.npz',s_ego=s_ego,v_ego=v_ego)

below the lines

x_result = x.value
s_ego = x_result[0,:].flatten()
v_ego = x_result[1,:].flatten()

What this does is that it saves the s_ego and v_ego variables in a .npz format required by the drivability checker tutorial. Then I just need to copy and paste the generated npz file to the directory where the drivability checker tutorial is.

Well, as the original drivability checker tutorial in the documentation website (link) has pointed out, the readers should refer to the commonroad-io tutorials as a prerequisite. I guess what the tutorial didn’t mention was that you need to create such a file yourself… It would be more friendly if such a file was created in the commonroad-io tutorial in the first place for consistency, though; just a tiny suggestion.

Edit on Aug 8: actually, I was wrong; the data files described in the documentation tutorials can be found in the Gitlab repo. I wish there were a friendly note on the documentation website pointing to the Gitlab repo for the mentioned files.

1 Like