Esempio n. 1
0
    def __init__(self):
        ####################
        #move_arm呼出し
        self.arm = move_arm.move_arm()

        self.arm.x = 0.0
        self.arm.y = 0.15
        self.arm.z = 0.10
        self.arm.wrist_arg = 0.0
        self.grip = 95
        self.arm.move_xyz()
        self.arm.grip(self.grip)

        M_PI = 3.14
    def __init__(self):
        ####################
        #move_arm呼出し
        self.arm = move_arm.move_arm()

        self.arm.x = 0.0
        self.arm.y = 0.2
        self.arm.z = 0.1
        self.arm.wrist_arg = 0.0
        grip = 0
        self.arm.move_xyz()
        self.arm.grip(grip)

        M_PI = 3.14

        ##loop
        while (1):
            key = raw_input('key=> ')

            if key == "q":
                break
            elif key == "8":  #forward
                self.arm.y += 0.01
            elif key == "2":  #back
                self.arm.y -= 0.01
            elif key == "6":  #right
                self.arm.x += 0.01
            elif key == "4":  #left
                self.arm.x -= 0.01
            elif key == "5":  #up
                self.arm.z += 0.01
            elif key == "0":  #down
                self.arm.z -= 0.01
            elif key == "9":  #wrist up
                self.arm.wrist_arg -= M_PI / 180 * 5
            elif key == "3":  #wrist down
                self.arm.wrist_arg += M_PI / 180 * 5
            elif key == "7":  #tilt5 close
                grip += 10
                if grip > 100: grip = 100
                self.arm.grip(grip)
            elif key == "1":  #tilt5 open
                grip -= 10
                if grip < 0: grip = 0
                self.arm.grip(grip)

            #ARM移動
            self.arm.move_xyz()

        exit()
Esempio n. 3
0
    def __init__(self, ARM_ON, GRAPH_ON):
        #ARM制御ONモード[True/False]
        self.ARM_ON = ARM_ON
        #画面描画ONモード[True/False]
        self.GRAPH_ON = GRAPH_ON

        #ARM制御準備
        if self.ARM_ON == True:
            self.arm = move_arm.move_arm()
            self.arm.Step = 100
            self.arm.WaitMove = False

        #パラメータ初期設定
        self.setup_param()

        if self.ARM_ON == True:
            self.arm.Step = 100
            self.arm.x = (self.x_Left + self.x_Right) / 2
            self.arm.y = (self.y_Top + self.y_Bottom) / 2
            self.arm.z = self.HeightDown + 0.02
            self.arm.grip(0)
            self.arm.move_xyz()
Esempio n. 4
0
    def __init__(self):
        ####################
        #move_arm呼出し
        self.arm = move_arm.move_arm()

        self.arm.x = 0.0
        self.arm.y = 0.2
        self.arm.z = 0.1
        self.arm.wrist_arg = 0.0
        grip = 95
        self.arm.move_xyz()
        self.arm.grip(grip)

        M_PI = 3.14

        ##loop
        while (10):
            #catch
            self.arm.z -= 0.03  #0
            self.arm.y += 0.07  #8
            #self.arm.x+=0.001 #6
            grip -= 95
            if grip > 100: grip = 100
            self.arm.move_xyz()
            self.arm.grip(grip)  #7

            #catch back
            self.arm.z += 0.03  #5
            self.arm.y -= 0.07  #2
            #self.arm.x-=0.001 #4
            self.arm.move_xyz()
            grip += 95
            if grip < 0: grip = 0
            self.arm.grip(grip)  #1

        #ARM移動
        #self.arm.move_xyz()

        exit()
Esempio n. 5
0
#! /usr/bin/env python
# -*- coding: utf-8 -*-

#move_arm制御プログラム実装例
#  試してみたい項目の "if(0):" を "if(1)" に書き換えてから実行してください
 
import rospy
import move_arm_v1 as move_arm


####################
#move_arm呼出し
arm=move_arm.move_arm()

####################
#xyz座標で移動例(単位:m)
#- 原点はアーム本体の場所(根元)
arm.z=+0.10

#x,y 4象限移動例
if(0):
    arm.x=+0.10
    arm.y=+0.20
    arm.move_xyz()
    
    arm.x=-0.10
    arm.y=+0.20
    arm.move_xyz()
    
    arm.x=+0.10
    arm.y=-0.20