I am trying to get my joint callback function working once again. I followed the instructions from the help files. I tried to send a float from MATLAB to Coppelia to change the upper velocity limit through the MATLAB remote API function "simxCallScriptFunction" but I received an error within Coppelia:
"[UR10_joint1@childScript:error] 55: attempt to perform arithmetic on field 'errorValue' (a nil value)
[string "UR10_joint1@childScript"]:55: in function <[string "UR10_joint1@childScript"]:19>
[CoppeliaSim:error] External call to simCallScriptFunction failed (sysCall_jointCallback@UR10_joint1): Error in script function."
In MATLAB, I received a return code of "1" and it outputs rFloat as nothing. Here is my MATLAB code:
Code: Select all
upperVelocityLimit = deg2rad(120); [R1,~,rFloat,~,~] = sim.simxCallScriptFunction(clientID, 'UR10_joint1', sim.sim_scripttype_childscript, 'sysCall_jointCallback', , 'upperVelocityLimit', , , sim.simx_opmode_oneshot)
I am not entirely sure how to use a joint callback function and am wondering if I could get help. Below is the link to the scene.
https://app.box.com/folder/127459522101 ... gfr50oadu1
Thanks in advance,