As the message indicates, files in the Chrono data/ directory cannot be found
(you can verify that there is no directory data/ at that location relative to
where your executable is).
This is because you moved the demo away from its place in the Chrono file
hierarchy.
To address this issue, you must specify a new location of where the code should
be looking for data files. If you look at the source of my_example.cpp in the
template_project, you will see that this is done on the very first line in the
main() function:
// Set path to Chrono data directory
SetChronoDataPath(CHRONO_DATA_DIR);
Simply add this to your relocated demo_VEH_RigidTerrain code.
The manner in which the problem of locating Chrono data files is addressed in
the sample template_project is one possibility (study carefully how the
CMakeLists file is set up there to understand what is being done). There are
other ways in which you could address the problem, but at the end of the day,
you must make a call to SetChronoDataPath() to properly locate any Chrono data
files your program uses.
--Radu
From: [email protected] <[email protected]> On Behalf
Of yaoyiyao
Sent: Friday, 25 November 2022 03:22
To: ProjectChrono <[email protected]>
Subject: [chrono] Error loading OBJ file
Hi,I run template_project successfully.Then I copy demo_VEH_RigidTerrain's
code in template_project and modify cmakelist file ,but run failed.
[cid:[email protected]]
what's wrong with it?
Many thanks in advance.
--
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
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/projectchrono/91958766-b73d-4974-83bf-7e2e906c50b2n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/91958766-b73d-4974-83bf-7e2e906c50b2n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/projectchrono/PH0PR06MB8237D996B8649CE5F8501B23A70E9%40PH0PR06MB8237.namprd06.prod.outlook.com.