Radu,

Thank you for the response!

After making these changes, I realized that the issue relied with 
chrono.SetDataPath, as commenting this out immediately removed the access 
violations albeit without generating any of the mesh terrain. I think the 
script had a data path already set, however using that method caused some 
sort of access violation which generated issues in trying to access vehicle 
information earlier on in the initialization process. 

I think the issue is in my JSON, then? When I loaded the sample 
RigidHeighMap JSON instead, it was able to run the simulation at ease and 
with everything loaded correctly, however I think this issue is seperate 
from what I've been encountering with actually getting the simulation to 
work.

Thanks again!
-Jack 

On Monday, August 5, 2024 at 7:51:35 AM UTC-4 Radu Serban wrote:

> Jack,
>
>  
>
> You misunderstand the meaning of the Chrono and Chrono::Vehicle data 
> paths.  What you are supposed to provide through the functions 
> chrono.SetChronoDataPath and veh.SetDataPath are the locations of *
> *directories** containing data file.  With what you have, the terrain 
> file is probably found fine, but the incorrect setting for the vehicle data 
> path may mess up something else (difficult to tell without seeing your 
> code, but one possibility is if you are using some visualization mesh for 
> the HMMWV vehicle).
>
>  
>
> Try something like this:
>
>
> chrono.SetChronoDataPath('Users/wagne/anaconda3/envs/pychrono/Library/data/)
>
> veh. SetDataPath(chrono.GetChronoDataPath() + ‘vehicle/')
>
> …
>
> terrain = veh.RigidTerrain(hmmwv.GetSystem(), 
> veh.GetDataFile(‘terrain/WaveFrontTest.json’)
>
> …
>
>  
>
> (Of course, this also assumes that your JSON terrain specification file is 
> correct)
>
>  
>
> --Radu
>
>  
>
> *From:* [email protected] <[email protected]> *On 
> Behalf Of *Jack Wagner
> *Sent:* Sunday, August 4, 2024 10:35 PM
> *To:* ProjectChrono <[email protected]>
> *Subject:* [chrono] Re: Issues With Importing JSON for RigidTerrain 
> (PyChrono)
>
>  
>
> Additionally, I am using the win-64_pychrono-9.0.0-py39_4852 package 
> downloaded through Anaconda.
>
> On Sunday, August 4, 2024 at 2:53:11 PM UTC-4 Jack Wagner wrote:
>
> I have been trying to import the example RigidTerrain JSON with the 
> example Wavefront OBJ to examine vehicle behavior on variable landforms and 
> learn more about the wavefront terrain structure, however just trying to 
> implement it into the simulation is causing me issues. I have the following 
> code block to signify the directory for the JSON file:
>
>
> chrono.SetChronoDataPath('Users/wagne/anaconda3/envs/pychrono/Library/data/vehicle/terrain/')
> veh.SetDataPath(chrono.GetChronoDataPath() + 'WaveFrontTest.json')
> terrain_file = veh.GetDataPath()
>
>  
>
> Then simply implement and initialize the terrain with the terrain file:
>
>     terrain = veh.RigidTerrain(hmmwv.GetSystem(), terrain_file)
>     terrain.Initialize()
>
>  
>
> However, every time I try to run this, I receive a fatal access violation 
> and am unsure of what i am doing wrong. I keep thinking it's a simple 
> syntax issue, however everything I try moving around (making terrain_file 
> equal to the exact data path, switching around using Set/GetDataPath, etc.) 
> has been ineffective. 
>
>  
>
> Assistance would be very helpful. Below is a copy of my terminal's output 
> and the JSON file I am using for reference, although the JSON is nearly 
> identical to the example specified in the PyChrono documentation.
>
> -- 
> 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/9f78401a-09bf-4608-af53-0a7428159dcen%40googlegroups.com
>  
> <https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/9f78401a-09bf-4608-af53-0a7428159dcen*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!Lnk1xcDYC3MkRaSq-70_bWbzrFHgZmMr0rjmMAkaYYWRlWuSAul8_5glWkH4bMe0Rg2D94x4BkVIMnQ8$>
> .
>

-- 
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/71b01c8b-f860-4893-bfab-3148db5d9b15n%40googlegroups.com.

Reply via email to