Hi,I add SetChronoDataPath(CHRONO_DATA_DIR); to my relocated demo_VEH_RigidTerrain code,I think my data files location is right. I debug my codes,I found it read jpg file normally,but it read obj file abnormally. [image: U6}LUS[I7[5D$@3UBEJ6$AR.png] Many thanks in anvance.
On Friday, November 25, 2022 at 3:10:38 PM UTC+8 Radu Serban wrote: > 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. > > > 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]. > 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/5d6bbcab-e4af-4524-b6bc-3a3ea12c32a1n%40googlegroups.com.
