Can I model the dynamical properties(delay or deviation) of robot

Typically: "How do I... ", "How can I... " questions
Post Reply
Hotpot
Posts: 4
Joined: 16 Jan 2021, 12:23

Can I model the dynamical properties(delay or deviation) of robot

Post by Hotpot »

Hi everyone,

I am using vrep to do a simulation of ur5. In the real world, the robot could not able to precisely move to the command position, the robot always has a small delay or deviation(about 30 ms? ). I wonder if VREP can model this kind of deviation and how?
I am using Matlab to control the robot. My simulated positions and command positions have actually not error or deviation.

thank You

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

Re: Can I model the dynamical properties(delay or deviation) of robot

Post by coppelia »

Hello,

so if I understand you correctly, you want the simulated robot to have a delay? Then you have several ways of foing this, depending on how you are sending the positions over from Matlab to CoppeliaSim.
So instead of applying the positions immediately on CoppeliaSim side, use a buffer that can mimic a delay. So this means you can't directly set its positions via simxSetJointPosition or simxSetJointTargetPosition-type commands. Instead, use simxCallScriptFunction to call a script function. That script function can then receive one or several joint positions, store them in a buffer together with a time tag. The same script would then constantly check if a new position command is ready to be applied, given a specific delay. If a similar way you could also add other types of disturbances (e.g. in position, etc.). But it really depends how you plan to send/apply movement data to CoppeliaSim in the first place.

Have also a look at the demo scene scenes/movementViaRemoteApi.ttt and one of the example python scripts (Matlab is very similar), located in programming/remoteApiBindings/python/python

Cheers

Post Reply