Hi Joshua,

As you understood, interaction of a vehicle with deformable terrain will always 
be more computationally expensive than with rigid terrain. Having said that, 
the SCM option for deformable terrain is the fastest among those offered in 
Chrono; a 4-wheel vehicle can run in real time on a commodity computer. You can 
see more details about the latest incarnation of SCM in Chrono, including 
performance measurements, in this 
paper<https://www.researchgate.net/publication/368353573_Real-time_Simulation_of_Ground_Vehicles_On_Deformable_Terrain>.

The SCM implementation in the latest Chrono code was not modified significantly 
from what was in release 8.0.  Having said that, I strongly encourage you to 
use a newer Chrono version (9.0.1 or even the current development branch) as 
there were other changes, fixes, and new features implemented. Furthermore, it 
is much easier for any of us to provide support for the latest Chrono version.

Finally, you indicate that you are planning on running multiple parallel, 
independent runs. That is certainly what you should be doing for ML training. 
However, your comment about concerns as you try to do more parallel simulations 
suggests that you are running all of them on the same node (processor). If that 
is correct, it is not surprising that overall run times are going down – all 
these processes will fight over the same hardware resources. The proper way to 
do scalable high throughput computing is to distribute these parallel runs over 
the nodes in a cluster. On a single node, you will always see continuously 
degraded performance as you run more an more processes, regardless of the 
computational efficiency of any individual simulation.

--Radu

From: projectchrono@googlegroups.com <projectchrono@googlegroups.com> On Behalf 
Of Joshua Philip Martin
Sent: Thursday, November 21, 2024 3:45 PM
To: ProjectChrono <projectchrono@googlegroups.com>
Subject: [chrono] Tips for Speeding Up SCM Calculation?

I'm looking at using Chrono for reinforcement learning, specifically because of 
the availability of its SCM contact model which is unique among simulator 
options. Understandably, the SCM model is going to be slower than the rigid 
contact model and will increase in complexity as the resolution of the SCM 
terrain increases. However, for RL applications, I'd like/need the system to 
run several environments in parallel, ideally at very fast speeds to increase 
the amount of data I can get in a given time.

Long story short, does anyone have any recommendations for increasing the 
speed/reducing the load for SCM calculation? Since using something like 
gym_chrono<https://urldefense.com/v3/__https:/github.com/projectchrono/gym-chrono__;!!Mak6IKo!N_GgbHAd6ox8zXoYgK3avQSZxLoS7cAkw0skO2C8dvwkovvjpUZ8IEoCs_C-eA_HoIvvZqLIS509P6NU$>
 requires a single CPU thread for each sim done in parallel, I'm definitely 
concerned about compute times increasing as I try to load more parallel 
simulators or more complex SCM geometries. I'm already creating moving patches 
at the agents' wheels as is done in the demos, though I'm not sure what I can 
do beyond that.

I've only seen one paper published that uses SCM at the training 
stage<https://urldefense.com/v3/__https:/arxiv.org/pdf/2408.09253__;!!Mak6IKo!N_GgbHAd6ox8zXoYgK3avQSZxLoS7cAkw0skO2C8dvwkovvjpUZ8IEoCs_C-eA_HoIvvZqLISzI5Wfww$>,
 but that means it is possible to do what I'm looking to do (though potentially 
slowly).

In case it matters, I'm also still using Chrono 8.0.0 for this setup, as was 
recommended by the gym_chrono repository. I'm not sure how much their custom 
Chrono branch matters, though, since I'm making my own robot objects; if Chrono 
9.0.0 offers dramatic speed increases in SCM calculation, maybe I can switch 
over?
--
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 
projectchrono+unsubscr...@googlegroups.com<mailto:projectchrono+unsubscr...@googlegroups.com>.
To view this discussion visit 
https://groups.google.com/d/msgid/projectchrono/6e67eda0-e591-4ae0-9546-dea5454c2377n%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/6e67eda0-e591-4ae0-9546-dea5454c2377n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!N_GgbHAd6ox8zXoYgK3avQSZxLoS7cAkw0skO2C8dvwkovvjpUZ8IEoCs_C-eA_HoIvvZqLIS0FAr5O6$>.

-- 
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 projectchrono+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/projectchrono/CH3PPF46CDC218522F472479DE717D57680A72A2%40CH3PPF46CDC2185.namprd06.prod.outlook.com.

Reply via email to