Control of the gripper kuka youbot by matlab

Typically: "How do I... ", "How can I... " questions
Post Reply
imrobot
Posts: 1
Joined: 17 Jun 2019, 13:02

Control of the gripper kuka youbot by matlab

Post by imrobot »

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.

fferri
Posts: 1222
Joined: 09 Sep 2013, 19:28

Re: Control of the gripper kuka youbot by matlab

Post by fferri »

As done in the youBot's child script:

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}))
remember to re-add the name suffix to the tube name 'youBotGripperState' if working with multiple copies of the robot.

Post Reply