Gripper Control and General Control Question

Typically: "How do I... ", "How can I... " questions
Post Reply
zhy149
Posts: 132
Joined: 14 Apr 2021, 20:18

Gripper Control and General Control Question

Post by zhy149 »

Hello, I'm new to Robotics and Coppeliasim, and I'm still learning some basic stuff.
I tried to control the Baxter gripper and it seems it works ok, but when it turned to Robotiq-85 and some other more complex Grippers, I don't know how to control them. Could you give me some advice on how to understand the structure inside a gripper or a model and if there is a general way to control all of them?
Thank you!

coppelia
Site Admin
Posts: 10337
Joined: 14 Dec 2012, 00:25

Re: Gripper Control and General Control Question

Post by coppelia »

Hello,

this really depends on the type of gripper. The Robotiq-85 gripper is fairly complex. To get an idea how to control those grippers, have a look at the usually child scripts attached to them. Normally the functionality is linked to a custom UI, which allows to manually open/close or otherwise actuate the gripper, when selected during simulation.

If the way gripping itself happens is not that relevant in your application, I'd strongly suggest to fake the gripping operation, by dynamically attaching the object to grasp to a force sensor, itself attached to the gripper.

Cheers

zhy149
Posts: 132
Joined: 14 Apr 2021, 20:18

Re: Gripper Control and General Control Question

Post by zhy149 »

Hello,

Thanks a lot for your reply!
There are two things I'd like to know about.
The first one is that the default script of Robotiq-85 can only fully open or close the gripper, but I'd like to close or open the gripper based on my given parameter (for example I want to close the gripper to half spread or some other spread), as well as what's way to control both velocity and the force of the gripper to best grasp since I'm going to do real grasp in Coppelia simulation.
The second one is that I want to extend the Robotiq-85 gripper fingertip in terms of length or width then put it back, what should I do?
Thanks a lot!

Best regards

coppelia
Site Admin
Posts: 10337
Joined: 14 Dec 2012, 00:25

Re: Gripper Control and General Control Question

Post by coppelia »

The way that model is handling gripping is different than what happens in reality, since physics engines are not capable of replicating the same behaviour without too many flaws. So have a look at the gripper when inversing the visibility layers, and you'll see how it really operates.

If you want to operate the fingers in position, then enable the control loop of joints ROBOTIQ_85_active1 and ROBOTIQ_85_active2, in the joint dynamics dialog.

Then, in the child script attached to the gripper, around line 69, replace that section of the code with something similar to:

Code: Select all

    if (closing) then
        sim.setJointTargetPosition(j1,-0.05)
        sim.setJointTargetPosition(j2,-0.05)
    else
        sim.setJointTargetPosition(j1,0)
        sim.setJointTargetPosition(j2,0)
    end
If you need to make the fingers longer, I'd really not recommend editing the gripper, since it is fairly complex, unless you know exactly what you are doing. Instead, simply attach two cuboids via a force/torque sensor to objects ROBOTIQ_85_RfingerTip and ROBOTIQ_85_LfingerTip.

Cheers

Post Reply