## Simulation happening in synchronous mode even without manually stepping

Typically: "How do I... ", "How can I... " questions
johnrowlay
Posts: 25
Joined: 09 Aug 2017, 18:52

### Simulation happening in synchronous mode even without manually stepping

I am controlling V-Rep through the Python remote API, with synchronous operation. But I am finding that the scene in the V-Rep GUI seems to be simulated even if I don't manually trigger a step.

So to set up the remote control, I establish a connection to V-Rep with simxStart(host, port, True, True, 5000, 5), and then indicate synchronous operation using simxSynchronous(client_id, True). I then start the simulation with simxStartSimulation(client_id, vrep.simx_opmode_blocking), and then start stepping using simxSynchronousTrigger(client_id).

But what I am finding, is that even before I trigger a step, there appears to be some simulation happening in the scene in the V-Rep GUI. For example, if I start the simulation with simxStartSimulation(), and then immediately create a cube and set its position to being above a table, then even before triggering the first step, the cube will fall onto the table in the V-Rep GUI. In fact, if I just create the cube, and then have an infinite while loop immediately afterwards, without every triggering a step, the cube will still fall to the table.

Why is the simulation occurring in the V-Rep GUI even though I have declared that I want to use synchronous mode?

harrisonmg
Posts: 6
Joined: 16 Feb 2018, 17:53

### Re: Simulation happening in synchronous mode even without manually stepping

Hello

Are you using the remote server started by V-Rep at startup? If so, make sure that the file remoteApiConnections.txt in your V-Rep directory includes the line

Code: Select all

portIndex1_syncSimTrigger   = true
assuming you're only starting and using the one server with portIndex1.

If you're starting the remote server from an embedded script, are you setting the preEnableTrigger argument to true?

Good Luck,
Harrison