When I use Coppeliasim and MATLAB together, how do I set the simulation step size?
Posted: 19 Jun 2024, 10:27
When I use Coppeliasim and MATLAB together, how do I set the simulation step size?I used the following command in MATLAB:
id=vrep.simxStart('127.0.0.1',19999,true,true,5000,5);
dt = 5e-3;
vrep.simxSetFloatingParameter(id,vrep.sim_floatparam_simulation_time_step,dt,vrep.simx_opmode_oneshot_wait); vrep.simxSynchronous(id,true);
vrep.simxStartSimulation(id,vrep.simx_opmode_oneshot_wait);
vrep.simxSynchronousTrigger(id);
I used the following step sizes in Coppeliasim:dt=5.0ms(coustom).
However, the actual simulation step size is 130ms.
id=vrep.simxStart('127.0.0.1',19999,true,true,5000,5);
dt = 5e-3;
vrep.simxSetFloatingParameter(id,vrep.sim_floatparam_simulation_time_step,dt,vrep.simx_opmode_oneshot_wait); vrep.simxSynchronous(id,true);
vrep.simxStartSimulation(id,vrep.simx_opmode_oneshot_wait);
vrep.simxSynchronousTrigger(id);
I used the following step sizes in Coppeliasim:dt=5.0ms(coustom).
However, the actual simulation step size is 130ms.