Code: Select all
function sysCall_threadmain()
--simRemoteApi.start(19999)
base=sim.getObjectHandle('Cuboid0')
joint=sim.getObjectHandle('Revolute_joint')
angle=sim.getObjectOrientation(base,-1)[3]
sim.setJointTargetVelocity(joint,0.5) --rad/s
while (angle<math.pi/2) do
angle=sim.getObjectOrientation(base,-1)[3]
print(angle)
end
sim.setJointTargetVelocity(joint,0)
end
function sysCall_cleanup()
-- Put some clean-up code here
end
0.96741753816605
0.96741753816605
0.99241989850998
0.99241989850998
0.99241989850998
1.0174136161804
1.0174136161804
1.0424164533615
1.0674144029617
1.0924071073532
1.0924071073532
1.1174054145813
1.1174054145813
1.1424080133438
1.1674021482468
1.1674021482468
1.192400097847
1.192400097847
1.192400097847
1.2173956632614
1.2173956632614
1.2424006462097
1.2424006462097
1.2674024105072
1.2923972606659
1.2923972606659
I would really appreciate if anyone can point out any error present in code. Thank You.
Regards,
HinayM