Handler problem - Object does not exist
Posted: 26 Jan 2021, 20:37
Hello,
In my Lua code (V4.1.0) I dynamically creating joints and pureShapes.
Everything goes fine, till the handler of a shape or a joint is over 2e10.
Example:
[Dummy@childScript:handler 1048613
then i get this error in this functions:
Object does not exist. (in function 'sim.setObjectPosition')
Object does not exist. (in function 'sim.setObjectOrientation')
In version V4.0. I had problem with function sim.setObjectParent and Position and Orientation worked fine.
This is part of my code:
joints[i] = sim.createJoint(sim.joint_revolute_subtype, sim.jointmode_ik,0,{0.05,0.02})
sim.addLog(0,"handler " .. joints[i])
__setObjectPosition__(joints[i],base,{0,0,0})
__setObjectOrientation__(joints[i],base,{0,0,0})
-- this two functions were automatically created in V4.1.0 when I opened ttt file created in V4.0.
As I wrote, everything is fine till handler number is under 2e10.
Example in the sandbox:
> joint = sim.getObjectHandle("Revolute_joint")
> sim.setObjectPosition(joint,-1,{0,0,0})
[string "sandboxScript"]:1: Object does not exist. (in function 'sim.setObjectPosition')
> joint
1048614
Thank you for your answer.
In my Lua code (V4.1.0) I dynamically creating joints and pureShapes.
Everything goes fine, till the handler of a shape or a joint is over 2e10.
Example:
[Dummy@childScript:handler 1048613
then i get this error in this functions:
Object does not exist. (in function 'sim.setObjectPosition')
Object does not exist. (in function 'sim.setObjectOrientation')
In version V4.0. I had problem with function sim.setObjectParent and Position and Orientation worked fine.
This is part of my code:
joints[i] = sim.createJoint(sim.joint_revolute_subtype, sim.jointmode_ik,0,{0.05,0.02})
sim.addLog(0,"handler " .. joints[i])
__setObjectPosition__(joints[i],base,{0,0,0})
__setObjectOrientation__(joints[i],base,{0,0,0})
-- this two functions were automatically created in V4.1.0 when I opened ttt file created in V4.0.
As I wrote, everything is fine till handler number is under 2e10.
Example in the sandbox:
> joint = sim.getObjectHandle("Revolute_joint")
> sim.setObjectPosition(joint,-1,{0,0,0})
[string "sandboxScript"]:1: Object does not exist. (in function 'sim.setObjectPosition')
> joint
1048614
Thank you for your answer.