Michael,

You may find it useful to consult the paper “Chrono::Vehicle – Template-based 
Ground Vehicle Modeling and Simulation” (you can get the PDF 
here<https://projectchrono.org/whitepapers/>) and look over the Chrono::Vehicle 
module description at https://api.projectchrono.org/manual_vehicle.html.  That 
will help you understand the philosophy and design of the vehicle module in 
Chrono.

Vehicle models in Chrono::Vehicle are constructed from parameterized templates 
of the various subsystems (chassis, suspension, steering, etc) and that can be 
done either by providing a set of concrete classes or else through a hierarchy 
of specification files in JSON format.  For example, the classes for the 
CityBus modeled the first way are in: 
https://github.com/projectchrono/chrono/tree/main/src/chrono_models/vehicle/citybus,
 while the corresponding JSON files (for the same vehicle modeled the second 
way) are in: 
https://github.com/projectchrono/chrono/tree/main/data/vehicle/citybus.  The 
concrete vehicle models distributed with Chrono (first method above) are all 
implemented in C++ and they can only be used as they are from PyChrono.  A 
vehicle specified through JSON files can also be created in Python (see 
demo_VEH_WheeledJSON.py<https://github.com/projectchrono/chrono/blob/main/src/demos/python/vehicle/demo_VEH_WheeledJSON.py>).

Having said that, some of the modifications to the vehicle model you want to 
make on the fly do not make much sense. Data for a vehicle model (at the level 
of fidelity of the Chrono::Vehicle models) must be consistent. For example, one 
doesn’t just change the track width – that is a result of how various 
hardpoints used to specify the suspension are provided.  Others (such as the 
COG of the chassis subsystem) are meaningful to change during a simulation 
(unfortunately, that is currently not exposed for easy modification through a 
user-callable function – I’ll look into providing some of this functionality).

To make a long story short, vehicle models are assumed to be more or less 
“constant” and representing a meaningful vehicle system, specified through a 
consistent data set.  Most of the parameters cannot be arbitrarily changed, 
else you end up with an incorrect model.  But if you still want to try some of 
these things, one approach is to use a vehicle model specified through JSON 
files, modify one or more of these files, and then recreate the vehicle model 
with the new JSON specification.  Look in 
https://github.com/projectchrono/chrono/tree/main/src/demos/vehicle/visualization
 for examples of reloading a vehicle model from (potentially modified) JSON 
files at run-time.  There are two versions of that demo program there, one 
using the Chrono::OpenGL run-time visualization module, the other using the 
Chrono::VSG module.  Note however, that neither Chrono::OpenGL nor Chrono::VSG 
are currently exposed to Python.

Regarding your question about tire models:  you do not have to create a “tire 
model”, but you may have to specify the parameters in an existing Chrono tire 
model to represent the tire on the particular vehicle you are interested in. 
There are several tire models available in Chrono::Vehicle (see the links above 
and look in the source tree).  Some of the Chrono models encoded in concrete 
C++ classes come with a few concrete tire implementations which you can select 
during construction.  Look through the various demos in Chrono.

--Radu

From: [email protected] <[email protected]> On Behalf 
Of Michael
Sent: Thursday, April 20, 2023 3:52 AM
To: ProjectChrono <[email protected]>
Subject: [chrono] Creating Easy Iteration Vehicle Model

Hello,

I am looking to create a lap time simulator for a vehicle model and was 
wondering where the actual vehicle models for the city bus is. I see this code: 
 my_bus = veh.CityBus() which calls the city bus model into the simulation,  
but I was wondering where the actual file for the creation of the geometry of 
the city bus is stored. I would like to be able to create a vehicle with an 
easily iterable wheel base, track width, COG, etc. so that the effects of these 
values can be shown across different lap time simulations.

I am I on the right path in trying to create a specific vehicle model that can 
be easily iterated on and then call this vehicle model into the lap simulation 
to see the effects or should I be creating the vehicle model within the actual 
lap simulation?

Also, are there specific tire models within pychrono that can be used for 
modeling the slip limit and such of the car or will I have to create a model of 
this as well?

Thank you,
Michael
--
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/a6a946d1-b823-4fea-bcd4-0b2098c807efn%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/a6a946d1-b823-4fea-bcd4-0b2098c807efn%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/PH0PR06MB82377D0A219EE75F9111CDD5A7639%40PH0PR06MB8237.namprd06.prod.outlook.com.

Reply via email to