Realtime control

Typically: "How do I... ", "How can I... " questions
Post Reply
amrtaha
Posts: 11
Joined: 23 Mar 2015, 18:53

Realtime control

Post by amrtaha »

Hello guys,

Thanks to your help, I am currently in a process of writing the code that will control my real robot according to the shape i created in V-REP until i found about about the problem of "time step" and that it is hard to synchronize the simulation time with real time.

Are there any suggestions to overcome this problem? i tried to modify the "Time step" to be 1ms assuming that (1ms * 10^3) would result in a real time control, but i think it did not go as i thought!!

Thanks.

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: Realtime control

Post by coppelia »

Hello,

there is a real-time simulation mode. Simply click the appropriate toolbar button. What will happen is that V-REP will run a simulation step, then wait until the real-time is as advanced as the simulation time, then run another simulation step, etc. If the simulation content is too heavy (e.g. because of too many calculations, sensors, etc.), then you won't be able to run in real time.

If you control a simulation from an external application (e.g. via the remote API), then you can run in synchronous mode, where your remote API client triggers a new simulation step on command. This is not real-time, but will be perfectly synchronized with your remote controller.

Cheers

amrtaha
Posts: 11
Joined: 23 Mar 2015, 18:53

Re: Realtime control

Post by amrtaha »

Thanks alot for your reply.

I already knew about the real time mode, but i also read that it does not always do things in a perfect way, so i asked for a definite way to over come the lag or the delay.

I will do as u advised and try the remote API solution.

Thanks again!

Post Reply