How to set the simulation time dt through script of client?
How to set the simulation time dt through script of client?
The simulation velocity of dt can be changed in the 'simulation setup' dialog box, it's there any function like 'sim.startsimulation' that allow me to change the simulation velocity through script in the python client
Re: How to set the simulation time dt through script of client?
Hello,
try with sim.setFloatProperty(sim.handle_scene, "timeStep", 0.01)
Just make sure simulation is not yet running.
Cheers
try with sim.setFloatProperty(sim.handle_scene, "timeStep", 0.01)
Just make sure simulation is not yet running.
Cheers
Re: How to set the simulation time dt through script of client?
Encounter an error when I try to use :
Code: Select all
sim.setFloatProperty(sim.handle_scene, "timeStep", 0.01)Exception: 347: in sim.setFloatProperty: unknown property.
Re: How to set the simulation time dt through script of client?
What CoppeliaSim version are you running? What does it print when you type:
Cheers
Code: Select all
sim.getProperties(sim.handle_scene)Re: How to set the simulation time dt through script of client?
The version I am using is 4.7.0, I encounter error:
AttributeError: type object 'sim' has no attribute 'getProperties'
AttributeError: type object 'sim' has no attribute 'getProperties'
Re: How to set the simulation time dt through script of client?
If you want to change the timestep with versions prior to V4.9, use:
Cheers
Code: Select all
sim.setFloatParam(sim.floatparam_simulation_time_step, 0.01)