Json File

149 views
Skip to first unread message

Jay Sun

unread,
Mar 7, 2024, 6:51:26 AM3/7/24
to ProjectChrono
Hi everyone,

I configured this car using a json file, and found that it kept jittering after importing instead of stopping when it hit the ground. Could you please tell me the reason?

Regard,
Jay

dr.ratz...@gmail.com

unread,
Mar 7, 2024, 2:09:59 PM3/7/24
to ProjectChrono
Hi Jay,

can you give us some mor information:
  • which chrono version do you use
  • which tire model ?
  • tire mass and inertia?
  • tire format
  • wheel load
Best

Rainer

Jay Sun

unread,
Mar 7, 2024, 9:53:40 PM3/7/24
to ProjectChrono
Rainer,
        Thank you very much for your reply!
Jay
MAN_5t_RigidTire.json
MAN_7t_Vehicle_6WD.json
MAN_5t_Wheel.json

Jay Sun

unread,
Mar 8, 2024, 12:49:20 AM3/8/24
to ProjectChrono
Rainer,

Maybe I found the reason for this problem, I changed the size of step_time, different sizes of step_time have different stability of the car (see the video link: https://youtu.be/g3iQKZTntdM). But I am running the algorithm of deep reinforcement learning, I need to improve the training speed to reduce the training time, is there any other way to shorten the simulation time? Looking forward to your reply! Thank you very much

Jay

dr.ratz...@gmail.com

unread,
Mar 8, 2024, 1:58:00 AM3/8/24
to ProjectChrono
Jay,

you are on the right way with reducing the step width. You should also use a newer version of chrono, version 8.0 is quite out of date, better build your own one from the actual repository. If you must use rigid tires, a step width of 0.002 secs can be to big. For vehicle simulation it is generally better to use handling tire models (PacejkaXX, TMeasy or TMsimple). Using TMeasy or TMsimple you can let chrono 'guess' consistant tire parameters. Be sure to supply realistic values for mass and inertia. With a known tire mass the inertias can be estimated. Try this website https://bndtechsource.wixsite.com/home/rotational-inertia-calculator
Generally the time step for vehicle simulations should not increase 0.001 secs.

Rainer

Radu Serban

unread,
Mar 8, 2024, 2:26:54 AM3/8/24
to ProjectChrono

Hi Rainer – please keep in mind that Jay is using the SCM terrain. Handling tire models, which carry no collision geometry, will not work with that terrain.

 

Jay – you cannot simply increase the step size to whatever you want from purely performance reasons.  You must use a step size small enough to ensure a stable. You may want to experiment with other integration and solver types in Chrono.

 

--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/1840354e-b305-4339-bbb5-8c2807bb2072n%40googlegroups.com.

Radu Serban

unread,
Mar 8, 2024, 2:37:41 AM3/8/24
to ProjectChrono

One other low hanging fruit: since you are interested in using these simulations for ML training, you do not need to have run-time visualization enabled, certainly not for the SCM grid mesh (whose update adds some overhead as this is a deformable mesh).

When you evaluate performance of an SCM simulation, you should always do that with the visualization mesh disabled (see the SCMTerrain constructor). In fact, you may want to disable *all* run-time visualization.

Of course, you can use a toggle in your code so that you can enable/disable visualization (and so be able to check that things work as expected).

 

--Radu

Jay Sun

unread,
Mar 8, 2024, 7:03:08 AM3/8/24
to ProjectChrono
Thank you very much for your advice. Also, I am using SoilParametersCallback, I want to set different terrain parameters at different positions of a terrain, but when I run, the terminal reports the following error, and sometimes it closes the render window without reporting an error.

Traceback (most recent call last):
File "d:\sjq\MAN_DRL\train.py", line 345, in <module>
main()
File "d:\sjq\MAN_DRL\train.py", line 209, in main
next_state, reward, done = env.action_step(act=real_act)
File "d:\sjq\MAN_DRL\Hmmwwv_terraincopy.py", line 665, in action_step
self.vehicle.Advance(self.timestep)
File "C:\ProgramData\Anaconda3\envs\chrono2copy\lib\site-packages\pychrono\vehicle.py", line 14904, in Advance
return _vehicle.ChWheeledVehicle_Advance(self, step)
RuntimeError: SWIG director method error. Error detected when calling 'SoilParametersCallback.Set'
CleanShot 2024-03-08 at 19.25.32@2x.png
CleanShot 2024-03-08 at 19.21.20@2x.png
Reply all
Reply to author
Forward
0 new messages