Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad cast #43

Open
TylerPaquette opened this issue Mar 16, 2023 · 0 comments
Open

Bad cast #43

TylerPaquette opened this issue Mar 16, 2023 · 0 comments

Comments

@TylerPaquette
Copy link

Hi,

I am using v0.5 on Ubuntu 22, built and installed from source. I am running this through matlab and all is well but I am getting a segfault following the quickstart example. The only error I can see is this in terminal, and it seems to happen on calling optimal_laptime function.

[C++ exception] -> std::bad_cast
terminate called after throwing an instance of 'std::exception'
  what():  std::exception
Aborted (core dumped)

The whole program I am running is just this (quickstart code):

import sys,os,inspect
sys.path.append("/home/tyler/fastest-lap/src/main/python/")
import fastest_lap

vehicle_name = "car"
fastest_lap.create_vehicle_from_xml(vehicle_name, "/home/tyler/fastest-lap/database/vehicles/f1/mercedes-2020-catalunya.xml");
track_name = "catalunya"
fastest_lap.create_track_from_xml(track_name, "/home/tyler/fastest-lap/database/tracks/catalunya/catalunya_adapted.xml");
s = fastest_lap.track_download_data(track_name,"arclength");

options  = "<options>"
options += "<output_variables>"
options += "<prefix>run/</prefix>"
options += "</output_variables>"
options += "<print_level> 5 </print_level>"
options += "</options>"

#print(vehicle)
#print(track)
#print(s)
#print(options)

run = fastest_lap.download_variables(*fastest_lap.optimal_laptime(vehicle_name, track_name, s, options));

Should note this terminal output is from simply running this using python (3.10) and not the matlab api.

Have you seen this or know what might cause this?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant