Import Articulated Vehicle with JSON file in PyChrono

34 views
Skip to first unread message

ttt feng

unread,
Dec 8, 2022, 7:12:03 AM12/8/22
to ProjectChrono
Hi,
Under the reference of  demo_VEH_TrailerJSON.py , I tried to import articulated vehicle using json files in pychrono. I have the following questions to ask for help.

1)In demo_VEH_TrailerJSON.py,  Some contents about the json files of Sedan and Trailer are as follows,

  "Name": "Sedan",
  "Type": "Vehicle",
  "Template": "WheeledVehicle",

    "Name": "Ultra Tow 40x48",
    "Type": "Trailer",
    "Template": "WheeledTrailer",

Is the beginning of the json file of the front body and rear body of the articulated vehicle the same?

2)How to write JSON files to enable four-wheel drive of articulated vehicles?

The powerful function of Chrono cannot be separated from the efforts of everyone in the team, and I am very interested in Chrono. But according to the demo_ VEH_ TrailerJSON. Py is still struggling to write json files for articulated vehicle, so do I have any better references? Or does the team intend to write a json file demo for articulated vehicles in the later stage. 


Radu Serban

unread,
Dec 9, 2022, 10:42:57 AM12/9/22
to ProjectChrono

I created and pushed to the main branch of the Chrono repository a set of JSON files which define the same toy vehicle as in demo_VEH_ArticulatedVehicle.
You can see these new files here.  This JSON—specified vehicle model can be used from the C++ demo_VEH_WheeledJSON or from the Python demo_VEH_WheeledJSON (by uncommenting the appropriate lines).

Like the C++ example model, this JSON-based ACV model uses a 2WD driveline connected to the front axle.  To use a 4WD driveline, simply create an appropriate JSON specification file (such as this one) and modify accordingly the vehicle specification JSON file (like done here).

 

--Radu

--
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 projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/0b8bb848-f71f-45c1-95eb-76b93498d9edn%40googlegroups.com.

ttt feng

unread,
Dec 10, 2022, 12:40:01 AM12/10/22
to ProjectChrono
Hi, Radu

Thank you so much for your great patience and huge help!

best regards!

Reply all
Reply to author
Forward
0 new messages