Elephant Robotics
Published © GPL3+

Newly Launched Force-Controlled Gripper for Robot Grasping

A newly launched, screen-equipped force-controlled gripper, and a demo of robotic accurately grasping by using it.

BeginnerFull instructions provided1 hour329

Things used in this project

Hardware components

ESP32 Basic Core IoT Development Kit
M5Stack ESP32 Basic Core IoT Development Kit
×1

Hand tools and fabrication machines

Elephant Robotics myGripper F100
myCobot 320 m5
Elephant Robotics myCobot 320 m5

Story

Read more

Code

Demo_SetAndTestMyGripper.py

Python
Set and test MyGripper
from pymycobot import MyCobot320

import time


mc=MyCobot320("COM3",115200) # Change the serial port number of the robotic arm
# Declare MyCobot320

mc.set_pro_gripper_torque(gripper_id=14, torque_value=10)
#Function: Set torque of force control gripper.
#gripper_id (int): MyGripper ID, default[14], range[1 ~ 254].
#torque_value (int) : range [1 ~ 100] .
# return(int): 0 - fail , 1 - success .

print(mc.get_pro_gripper_torque(gripper_id=14)) # Print the torque value
#Function: Read the torque of the force control gripper.
#gripper_id (int): MyGripper ID, defaulte[14], range [1 ~ 254].
#return(int): 100 ~ 300

mc.set_pro_gripper_open(gripper_id=14)
#Function: Open gripper.
#gripper_id (int):MyGripper ID, default[14], range[1 ~ 254].
#return(int):0 - fail ,  1 - success.

time.sleep(3)
#delay

mc.set_pro_gripper_close(gripper_id=14) # Tcompletely close the gripper
#Function: Set the zero position of the force control gripper. (need to set zero position for the first time to use )
#gripper_id (int):MyGripper ID, default[14], range[1 ~ 254].
#return(int):0 - fail ,  1 - success.

Demo_GripAndCarryObjects.py

Python
GripAndCarryObjects
from pymycobot import MyCobot320

import time

mc=MyCobot320("/dev/ttyAMA0",1000000)#Change the serial port number of the robotic arm

mc.set_pro_gripper_torque(14,10)
# Set torque of force control .

print(mc.get_pro_gripper_torque(14))
# Function: Read the torque of the gripper.

mc.set_pro_gripper_open(14)
# Open gripper.

start_angles=[19.68, -1.23, -91.4, -0.52, 90.08, 60.29]

# Define a set of starting joint angle of the robotic arm

target_coords=[[231.3, -61.3, 232.7, 178.35, -2.7, -130.56],[231.3, 65.3, 232.7, 178.35, -2.7, -130.56]]

# Define a set of position which the force controlled gripper reached to ( in Cartesian space)

end_angles=[80,0,-85,0,90,60]

#  Since object recognition with camera is not used in this case, for the clamping and handling of objects, we declared a fixed starting and ending joint angle and the Cartesian coordinate system of objects to represent the target pose of each movement, and called it in the cycle

for i in range(len(target_coords)):

    mc.sync_send_angles(start_angles,50)

    mc.send_coords(target_coords[i],100,1)

    time.sleep(2)

    mc.send_coord(3,165,50)

    time.sleep(2)

    mc.set_pro_gripper_close(14)

    time.sleep(2)
 
    mc.send_coords(target_coords[i],100,1)

    mc.sync_send_angles(end_angles,100)

    mc.set_pro_gripper_open(14)
   
    time.sleep(2)

Credits

Elephant Robotics
94 projects • 204 followers
An Innovative Robotics Company.

Comments