🤚PND Dexterous hands
Adam can be equipped with self-developed humanoid five-fingered dexterous hand. This dexterous hand has 6 degrees of freedom and 12 moving joints, and can simulate human hands to achieve complex actions.
🕹️Control method
The official dexterous hand defaults to using serial port/485 communication for control. Adam will use a passthrough module to convert it to Ethernet protocol, making it a node sub-device of Adam, facilitating Ethernet operations such as tcp/udp and better integrating into the Adam robot ecosystem.
- Communication process:
udp/tcp
<->serial port
<->485
<->hand
.
The following control example uses udp to control five fingers.
id | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
Joint | pinky | ring | middle | index | thumb-bend | thumb-rotation |
The above id corresponds to the control of each finger and corresponds to the numerical input order of the write6
function in the following demo.
🐍Python demo
import pnd_hand
import time
import socket
import threading
import signal
import sys
global port
port = 2562
global addr_l,addr_r
addr_l = '10.10.10.18'
addr_r = '10.10.10.38'
global sok_l,sok_r
def ctrl_one(id):
global sok_l,sok_r
global port
global addr_l,addr_r
sbytes = pnd_hand.hand_ctrl_pack([2000],[id])
sok_l.sendto(bytes(sbytes),(addr_l,port))
sok_r.sendto(bytes(sbytes),(addr_r,port))
time.sleep(1)
sbytes = pnd_hand.hand_ctrl_pack([0],[id])
sok_l.sendto(bytes(sbytes),(addr_l,port))
sok_r.sendto(bytes(sbytes),(addr_r,port))
time.sleep(1)
def ctrl():
global sok_l,sok_r
global port
global addr_l,addr_r
# sbytes = pnd_hand.hand_ctrl_pack([200],[id])
# sok_l.sendto(bytes(sbytes),(addr_l,port))
# sok_r.sendto(bytes(sbytes),(addr_r,port))
# time.sleep(1)
# sbytes = pnd_hand.hand_ctrl_pack([0],[id])
# sok_l.sendto(bytes(sbytes),(addr_l,port))
# sok_r.sendto(bytes(sbytes),(addr_r,port))
sbytes = pnd_hand.hand_ctrl_pack([0,0,0,0,0,0])
sok_l.sendto(bytes(sbytes),(addr_l,port))
sok_r.sendto(bytes(sbytes),(addr_r,port))
time.sleep(0.8)
sbytes = pnd_hand.hand_ctrl_pack([1900,1900,1900,1900,0,0])
sok_l.sendto(bytes(sbytes),(addr_l,port))
sok_r.sendto(bytes(sbytes),(addr_r,port))
time.sleep(0.8)
sbytes = pnd_hand.hand_ctrl_pack([0,0,0,0,0,0])
sok_l.sendto(bytes(sbytes),(addr_l,port))
sok_r.sendto(bytes(sbytes),(addr_r,port))
time.sleep(0.8)
sbytes = pnd_hand.hand_ctrl_pack([0,0,0,0,1900,1900])
sok_l.sendto(bytes(sbytes),(addr_l,port))
sok_r.sendto(bytes(sbytes),(addr_r,port))
time.sleep(0.8)
# sbytes = pnd_hand.hand_ctrl_pack([0,0,0,0,0,0])
# sok_l.sendto(bytes(sbytes),(addr_l,port))
# sok_r.sendto(bytes(sbytes),(addr_r,port))
# time.sleep(0.5)
sok_l = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sok_l.settimeout(1)
sok_r = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sok_r.settimeout(1)
# change_id(2,4)
# ctrl()
# get_id()
while True:
ctrl()
# for i in range(6):
# ctrl_one(i+1)