Hi Stefan,

No need to apologize.  I don’t have anything against games per-se (in fact, a 
long time ago I worked for a gaming company).  I just wanted to clarify that 
Chrono & Chrono::Vehicle only provide the physics for whatever you want to 
model and simulate.  Everything else is the user/caller code building on top of 
it.

As such, for what you are after, you should implement a mechanism for receiving 
(from user input or programmatically) a pause/run flag and then simply modify 
your simulation loop so that the state of the Chrono system is advanced only 
when that flag is set to “run”.  You may want to keep always make the rendering 
calls.

If you use the Irrlicht run-time visualization system, there is a callback 
mechanism that allows you to add your own event receiver (for keyboard and 
mouse) which you can use for this purpose; see for example demo_MBS_suspension 
or demo_MBS_forklift which use such a custom event receiver.

Hope that this helps,
--Radu

P.S. Thank you for pointing out the potential issue in the Pac02 tire model! 
We’ll look at it and fix if needed.


From: [email protected] <[email protected]> On Behalf 
Of stefan
Sent: Friday, 28 October 2022 13:05
To: ProjectChrono <[email protected]>
Subject: Re: [chrono] Stop and start vehicle simulation by specified signal

Hi Radu

I am very sorry for my inappropriate description and I just try to make my 
question easier to be understood.
To be precise, I want to implement the debugging function during the access 
process of the control algorithm, so I hope the program can be paused according 
to my demand.
By the way, I am doing some research in the tire model in chrono, and I found 
there may be a mistake in Chpac02Tire.cpp in line 616. The rhx1 should be 
replaced by rhy1.

Stefan
在2022年10月28日星期五 UTC+8 16:21:45<Radu Serban> 写道:
Stefan,

First of all, Chrono::Vehicle simulations are not “games”.  What this library 
provides is a mechanism to model and simulate vehicles at a certain level of 
fidelity (arguably more than many game physics engines). What you choose to do 
with Chrono::Vehicle is a different story; yes, you could build a game-like 
simulation around it.  All Chrono modules provide middleware libraries.  
Functionality like the one you describe belongs in user code, not in the 
libraries.

--Radu

From: [email protected] <[email protected]> On Behalf Of 
stefan
Sent: Friday, 28 October 2022 08:36
To: ProjectChrono <[email protected]>
Subject: [chrono] Stop and start vehicle simulation by specified signal

Hello everyone,

Vehicle simulation in Chrono can be described as a game. A game can stop by 
specified signal,  is there some kind of API that can realize the function in 
Chrono


--
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/1500e48e-1d67-4c58-97a1-735ea2750cf2n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/1500e48e-1d67-4c58-97a1-735ea2750cf2n%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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/1dffa7ab-3167-400a-802e-1b4100fa80cfn%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/1dffa7ab-3167-400a-802e-1b4100fa80cfn%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/PH0PR06MB82373E62112EE0FF9A5FFCB1A7329%40PH0PR06MB8237.namprd06.prod.outlook.com.

Reply via email to