johbrust / simulink_gym

Gym Interface Wrapper for Simulink Models
https://quire.io/w/Simulink_Gym
MIT License
14 stars 0 forks source link

How to set the smapling time interval? #4

Closed lk1983823 closed 1 year ago

lk1983823 commented 1 year ago

I can successfully run the cartpole_simulink.ipynb. However, I find the sampling interval is 0.02s by checking info['simulation time [s]']. Does the interval depend on the tcp/ip sending frequency or be possible to set manually ? How can set another interval, like 1s. Thank you.

johbrust commented 1 year ago

Since you already closed the issue I conclude that you solved it yourself. But just in case and for any future user with this issue:

For the cart pole example, the step size is an attribute of the object initialization.