ur5WithRg2Grasping.ttt stuck on headless mode
ur5WithRg2Grasping.ttt stuck on headless mode
Hello, I use V-REP 3.6.1 on Windows 10, when I run the official example scene "ur5WithRg2Grasping.ttt" on headless mode, the simulation stuck quickly after starting, when the first brick stop on the conveyor belt. I found this wired thing using another example scene "headlessModeDebug.ttt". I test V-REP 3.5.0, the same bug happened. I don't know why, please help.
Re: ur5WithRg2Grasping.ttt stuck on headless mode
Hello,
I didn't test it in headless mode, but there is indeed a problem with that scene. Before going further into this, can you add a non-threaded child script to object RG2_centerJoint1 with following content and tell me if the problem remains?
Cheers
I didn't test it in headless mode, but there is indeed a problem with that scene. Before going further into this, can you add a non-threaded child script to object RG2_centerJoint1 with following content and tell me if the problem remains?
Code: Select all
function sysCall_init()
openCloseMotor=sim.getObjectHandle('RG2_openCloseJoint')
PID_P=0.1
end
function sysCall_jointCallback(inData)
local errorValue=(-sim.getJointPosition(openCloseMotor)/2)-inData.currentPos
local ctrl=errorValue*PID_P
local velocityToApply=ctrl/inData.dynStepSize
if (velocityToApply>inData.velUpperLimit) then
velocityToApply=inData.velUpperLimit
end
if (velocityToApply<-inData.velUpperLimit) then
velocityToApply=-inData.velUpperLimit
end
local forceOrTorqueToApply=inData.maxForce
local outData={}
outData.velocity=velocityToApply
outData.force=forceOrTorqueToApply
return outData
end
Re: ur5WithRg2Grasping.ttt stuck on headless mode
Thank you coppelia, I've tried adding the script, but nothing change, what's the difference between windows and headless mode when the simulation is running?
Re: ur5WithRg2Grasping.ttt stuck on headless mode
Indeed, there is a problem. Following code around line 73 of the script attached to UR5 causes an error in headless mode, and the threaded script ends:
you can comment it out. The bug will be corrected for release 3.6.2 (normally tomorrow)
Cheers
Code: Select all
sim.setInt32Parameter(sim.intparam_current_page,0)
Cheers
Re: ur5WithRg2Grasping.ttt stuck on headless mode
You got it right! Thank you for the quick update.