On the vehicle tutorials page [1] you see a reference to a demo called
"demo_VEH_WheeledJSON" which is a good starting point to learn about how
to read a vehicle from JSON files. The demo itself you can see here [2]
and around line 50 there is a list of available models that you can try.
Note that this demo does need to be changed (C++ source) and recompiled
if you want it to load a different vehicle. I'm not aware of a demo that
will allow you to simply point to a main vehicle JSON file that will
automatically load all other JSON files without any modifications and/or
recompiling. That said, if that is the direction you want to go in, that
is certainly possible with some changes.
Greetings, Marcel
[1]
https://api.projectchrono.org/development/tutorial_table_of_content_chrono_vehicle.html
[2]
https://github.com/projectchrono/chrono/blob/main/src/demos/vehicle/wheeled_models/demo_VEH_WheeledJSON.cpp
On 05-Sep-23 7:40, '马浩楠' via ProjectChrono wrote:
"I'm reading the code for the 'chrono' vehicle library, and I've
understood some of the inheritance relationships between the header
files. Specifically, the vehicle CPP files are responsible for reading
JSON data. I want to know in which header file or method the JSON data
is imported into the vehicle. In other words, if I've defined a new
vehicle in the form of a JSON file, how do I import my defined vehicle
file for simulation or import a demo to see how it behaves? I'm using
translation software, so there may be some syntax errors.
--
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/a235ae7a-2c8a-4a40-9a84-260ca54f965fn%40googlegroups.com
<https://groups.google.com/d/msgid/projectchrono/a235ae7a-2c8a-4a40-9a84-260ca54f965fn%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/537527c8-4bd9-5b9b-6ff1-0343f10ef725%40gmail.com.