Hello,
I already understood how to manage the links of the manipulator kuka youbot by matlab. But I can't figure out what functions to use to open / close a gripper. I ask for your help.
Thanks.
Control of the gripper kuka youbot by matlab
Re: Control of the gripper kuka youbot by matlab
As done in the youBot's child script:
remember to re-add the name suffix to the tube name 'youBotGripperState' if working with multiple copies of the robot.
Code: Select all
-- in initialization:
gripperCommunicationTube=sim.tubeOpen(0,'youBotGripperState',1)
-- to close the gripper:
sim.tubeWrite(gripperCommunicationTube,sim.packInt32Table({0}))
-- to open the gripper:
sim.tubeWrite(gripperCommunicationTube,sim.packInt32Table({1}))