Teleoperation Time Delay

Typically: "How do I... ", "How can I... " questions
Post Reply
Tobias
Posts: 21
Joined: 08 Jan 2016, 14:35

Teleoperation Time Delay

Post by Tobias » 11 Oct 2016, 15:41

Hi everyone,

I am again not sure how to solve a problem.

I want to generate constant time delay (range from real time to about 3 sec) that should simulate communication delay in teleoperation. I am thinking about using the simulation time steps. I do not need the most accurate simulation as my model is pretty simple but I want to test different UI and want to see how the user performs navigation tasks with the delays.

Would using time steps e.g. of 1sec for 1 sec delay be appropriate or would you recommend something else?

Thanks so much,
Tobi

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

Re: Teleoperation Time Delay

Post by coppelia » 12 Oct 2016, 13:00

Hello Tobi,

I am not sure I understand your question correctly:

1. Do you want the simulation to pause for a certain delay?
2. Do you want a script to wait for a certain delay? Inside of a threaded child script you could use simWait.
3. Do you want to delay a signal? Here you have various solutions depending on the script type (threaded/non-threaded) and/or the type of signal/connection.

Cheers

Tobias
Posts: 21
Joined: 08 Jan 2016, 14:35

Re: Teleoperation Time Delay

Post by Tobias » 13 Oct 2016, 08:57

HI,

it should simulate the communication delay of teleoperation. This would mean the robot is actually moving but the sensor data as well as the video etc. is only be refreshed after the delay. So the simulation would run further is only refreshed after the delay. In my understanding this matches the time steps.

Eg. I have time steps of 50ms and 1sec. If I stop the simulation after 2 sec (real time) I have the same output (of course the input keeps the same) for both simulations. The difference is that for dt = 1sec I only see my robot in two different states (after 1sec and the finale state after 2sec) In dt = 50ms I "see" 40 states of the robot.

I hope this makes it a bit clearer. The teleoperation case the robot moves on but the operator only sees the delayed feedback and also the input (e.g. steering) is executed by the robot after the communication delay. I think that video (especially at the end with 500ms delay) makes it clearer:
https://www.youtube.com/watch?v=bCcy2SFDAuY

This delay should be simulated.

Cheers, Tobi

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

Re: Teleoperation Time Delay

Post by coppelia » 13 Oct 2016, 16:06

Ok, I understand now.

I wouldn't play with the time step, since you are influencing many things with that. I would simply just buffer the user commands in a FIFO table or array: all the data that the user produces is first sent to that buffer: each state is associated with a time. At the same time, you could have a child script that continuously reads states out from that array, but only states that have a time tag larger than, say, currentTime+1 second. Those states that are taken out from the array should then be fed to the device (e.g. robot).

Above could easily be done with two (or even a single) non-threaded child scripts.

Cheers

Tobias
Posts: 21
Joined: 08 Jan 2016, 14:35

Re: Teleoperation Time Delay

Post by Tobias » 17 Oct 2016, 07:02

Thank you very much. I was thinking about that but hoping it could be done even faster. I will try to implement that.

Cheers, Tobi

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

Re: Teleoperation Time Delay

Post by coppelia » 17 Oct 2016, 08:56

The other way (i.e. your way) by playing with the simulation time step size could also work, but it is linked with many side-effects, so not recommended (and also not scalable, if you want a delay of more than 1 second or so).

Cheers

Post Reply