Marcel is correct. When running a Chrono-based program from a location other than where the distribution demos are, you must point to the correct path for the various data files.
Assuming you use the CMake Chrono project configuration script to link to the Chrono libraries either in a build directory or an install directory, you have access to a CMake variable (CHRONO_DATA_DIR) which contains the relevant information. You must ensure this variable can be used from within your C++ code and then make a call such as
SetChronoDataPath(CHRONO_DATA_DIR);
At the top of your main function.
See the example in the template_project and look at how (1) the CMake variable is used in CMakeLists.txt to define a C++ macro and (2) how that is used in the call to SetChronoDataPath in my_example.cpp.
--Radu
--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
projectchron...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/projectchrono/679fcb35-b782-4e3b-b787-f81c2b1665b6n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/PH0PR06MB82372459EFA5EC0F889C540DA7BA9%40PH0PR06MB8237.namprd06.prod.outlook.com.
You also need to properly set the data path to Chrono::Vehicle data file.
Look at the https://github.com/projectchrono/chrono-projects repository. I just added an example of building the CityBus demo as an external project in https://github.com/projectchrono/chrono-projects/tree/develop/configuration_tests/vehicle. This should be exactly what you are trying to do.
--Radu
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/CALUh_%2B2A82LHTdj_1dek%3DmktMcrEizMLg9Fp14XZO5kyctbhRw%40mail.gmail.com.
I am confused as to what you are doing / trying to do.
Also, these snapshots do not help at all. If anything, they make things even more confusing. Please explain what you are doing and, if needed, attach relevant files or else copy text output to your messages.
Were you able to clone, configure, and build chrono-projects? If yes, can you successfully run demo_VEF_CityBus from *within* chrono-projects?
If you were able to do the above, then look in the directory https://github.com/projectchrono/chrono-projects/tree/develop/configuration_tests/vehicle to see how the CMakeLists.txt is written and how demo_VEH_CityBus is modified and reproduce that in your own test.
--Radu
From: Freya the Goddess <zaqhie...@gmail.com>
Sent: Saturday, July 2, 2022 11:43 AM
To: Radu Serban <ser...@wisc.edu>
Subject: Re: [chrono] Re: CityBus Demo : path to CityBus_Vis.obj
I try the external project:
There is this error when I run make after I run cmake (see the screenshots)
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/PH0PR06MB8237C4FE89CF180A2A1696DFA7BC9%40PH0PR06MB8237.namprd06.prod.outlook.com.