Example #1
0
 def set_index_side(self):
     self.index_p[2] = 570000
     pressure_message = SimpleFluidPressures()
     pressure_message.values = [
         self.thumb_p[2], self.thumb_p[1], 400000, self.thumb_p[0],
         self.index_p[0], self.wrist_p[0], self.index_p[1], self.wrist_p[1],
         self.middle_p[0], self.index_p[2], self.ring_p[0], self.pinky_p[0]
     ]
     self.pressure_publisher.publish(pressure_message)
Example #2
0
    def move_index(self, upper, lower, str):
        # update new pressure values
        self.index_p = [upper, lower, side]

        # send new values to hand
        pressure_message = SimpleFluidPressures()
        pressure_message.values = [
            self.thumb_p[2], self.thumb_p[1], 400000, self.thumb_p[0],
            self.index_p[0], self.wrist_p[0], self.index_p[1], self.wrist_p[1],
            self.middle_p[0], self.index_p[2], self.ring_p[0], self.pinky_p[0]
        ]
        self.pressure_publisher.publish(pressure_message)
        return
Example #3
0
    def move_mrp(self, pressure):
        # update new pressure values
        self.middle_p = [pressure]
        self.ring_p = [pressure]
        self.pinky_p = [pressure]

        # send new values to hand
        pressure_message = SimpleFluidPressures()
        pressure_message.values = [
            self.thumb_p[2], self.thumb_p[1], 400000, self.thumb_p[0],
            self.index_p[0], self.wrist_p[0], self.index_p[1], self.wrist_p[1],
            self.middle_p[0], self.index_p[2], self.ring_p[0], self.pinky_p[0]
        ]
        self.pressure_publisher.publish(pressure_message)
Example #4
0
    def set_hand_fist(self):
        # set finger pressure values
        self.thumb_p[2] = 320000
        self.thumb_p[1] = 370000
        self.thumb_p[0] = 360000
        self.index_p[0] = 570000
        self.index_p[1] = 570000
        self.middle_p[0] = 570000
        self.index_p[2] = 590000
        self.ring_p[0] = 560000
        self.pinky_p[0] = 560000

        # send new values to hand
        pressure_message = SimpleFluidPressures()
        pressure_message.values = [
            self.thumb_p[2], self.thumb_p[1], 400000, self.thumb_p[0],
            self.index_p[0], self.wrist_p[0], self.index_p[1], self.wrist_p[1],
            self.middle_p[0], self.index_p[2], self.ring_p[0], self.pinky_p[0]
        ]
        self.pressure_publisher.publish(pressure_message)
        return
Example #5
0
    def __init__(self):
        # Hand desired pressure values
        self.wrist_p = np.zeros(2)
        self.thumb_p = np.zeros(3)
        self.index_p = np.zeros(3)
        self.middle_p = np.zeros(1)
        self.ring_p = np.zeros(1)
        self.pinky_p = np.zeros(1)

        # Publisher and subscriber
        self.pressure_message = SimpleFluidPressures()
        self.pressure_publisher = rospy.Publisher("/festo/phand/set_pressures",
                                                  SimpleFluidPressures,
                                                  queue_size=10)
Example #6
0
__copyright__ = "Copyright 2020, Festo Coperate Bionic Projects"
__credits__ = ["Timo Schwarzer"]
__license__ = "GNU GPL v3.0"
__version__ = "1.0.6"
__maintainer__ = "Timo Schwarzer"
__email__ = "*****@*****.**"
__status__ = "Experimental"

# ros imports
import rospy

# festo imports
from festo_phand_msgs.msg import SimpleFluidPressures

pressure_pub = rospy.Publisher("/festo/phand/set_pressures", SimpleFluidPressures, queue_size=1)
msg = SimpleFluidPressures()

def close_claw(speed):

    pass

def open_claw(speed):

    pass

def shake_wrist(speed):

    pass

if __name__ == "__main__":