SharebeeClub / TCP-IP-CR-Python-CMD

Demo of CR, Python package based on TCP/IP protocol, command line operation mode
MIT License
0 stars 0 forks source link

Attention the coordinates writing #1

Closed Samuel-wei closed 1 year ago

Samuel-wei commented 1 year ago

point_a = [-300, -400, 300, -150, -10, 150] point_b = [-500, -200, 400, -150, -20, 140]

If the coordinates has the point of 600 will get the error. point_a = [-300, -400, 300, -150, -10, 150] point_b = [-500, -600, 600, -150, -20, 140]

Samuel-wei commented 1 year ago

The error is caused by position of coordinates between the continuous point.

Image

Samuel-wei commented 1 year ago

这个需要跟越疆技术人员沟通,看看是否能够解决问题?

Samuel-wei commented 1 year ago

It's successful working in the DOBOT CR Studio with in graphicial program. It's not work in python program.

# Joint coordinates [x,y,z,rx,ry,rz]
    point_1 = [-176.92, -498.00, 33.44, -178.74, 1.79, -90.69]
    point_2 = [170.53, -432.66, 221.91, -89.28, 30.71, -94.31]
    point_3 = [169.80, -271.54, 65, 176.16, 0.09, -113.83]
    point_4 = [170.96, -432.74, 222.14, -89.17, -42.26, -95.17]
    point_5 = [170.21, -433.72, 223.03, -86.12, -80.95, -98.80]
    point_6 = [170.63, -432.78, 222.12, 89.34, -21.50, 85.31]
    point_7 = [-177.36, -498.42, 64.47, -179.73, 0.20, -90.66]

    while True:
        run_point(move, point_7)
        wait_arrive(point_7)  
        run_point(move, point_1)
        wait_arrive(point_1)
        do_gas(dashboard, 2, 1)
        sleep(0.3)
        do_gas(dashboard, 2, 0)
        run_point(move, point_2)
        wait_arrive(point_2)
        run_point(move, point_4)
        wait_arrive(point_4)
        run_point(move, point_5)
        wait_arrive(point_5)
        run_point(move, point_6)
        wait_arrive(point_6)
        run_point(move, point_3)
        wait_arrive(point_3) 
        do_gas(dashboard, 1, 1)
        sleep(0.2)
        do_gas(dashboard, 1, 0)
Samuel-wei commented 1 year ago

越疆技术人员反馈,使用JointMovJ() 函数去跑坐标;

Image

Samuel-wei commented 1 year ago

It's not necessary for operate the BOBOT.

def wait_arrive(point_list):
    global current_actual
    while True:
        is_arrive = True

        if current_actual is not None:
            for index in range(len(current_actual)):
                if (abs(current_actual[index] - point_list[index]) > 1):
                    is_arrive = False

            if is_arrive:
                return

        sleep(0.001)