コード例 #1
0
from RobotControl import RobotControl

if __name__ == "__main__":
    RC = RobotControl()
    RC.link(fileName="shm_VS.bin")
    RC.setSpeed([10, 10, 10])
    RC.setAcce([10, 10, 10, 10, 0, 0])

    print '[350,153.8,121.0,51.5,0,0] isPoseOK?', RC.isPoseOK(
        [350, 153.8, 121.0, 51.5, 0, 0])
    print RC.getCurPos()
    RC.sendRobotPos(robotPos=[350, 153.8, 121.0, 51.5, 0, 0],
                    type="MOVE",
                    error=0.5)
    print RC.getCurPos()
    raw_input('input anykey to next')
    RC.sendRobotPos(robotPos=[299, 154, 76, 82, 0, 0], type="GO")
    print RC.getCurPos()
コード例 #2
0
from RobotControl import RobotControl

if __name__ == "__main__":
    RC = RobotControl()
    RC.link(fileName="shm_VS.bin")
    RC.setSpeed([10, 10, 10])
    RC.setAcce([10, 10, 10, 10, 0, 0])

    # zx, oi, begin
    #print '[350,153.8,121.0,51.5,0,0] isPoseOK?', RC.isPoseOK([350,153.8,121.0,51.5,0,0])
    #print RC.getCurPos()
    RC.sendRobotPos(robotPos=[350, 153.8, 121.0, 51.5, 0, 0],
                    type="MOVE",
                    error=0.5)
    # zx, oi, end

    #RC.sendRobotPos(robotPos=[200.0, -226.0, 395.07, -37.89, 0.0, 89.92], type="MOVE", error=0.5)
    print RC.getCurPos()

    raw_input('input anykey to next')
    # zx, oi, begin
    #RC.sendRobotPos(robotPos=[299,154,60,82,0,0],type="GO")
    # zx, oi, end

    #RC.sendRobotPos(robotPos=[221.13211468, 144.40044912, 60, 82, 0, 0], type="GO")
    #RC.sendRobotPos(robotPos=[364.29494662, -52.58334555, 54.57142639, 0.66162154, 0.0, 0.0], type="GO")  # p0
    #RC.sendRobotPos(robotPos=[340.12691049, -55.48038278, 54.57142639, 0.66162154, 0.0, 0.0], type="GO")  # p1
    #RC.sendRobotPos(robotPos=[337.16612335, -30.80669559, 54.57142639, 0.66162154, 0.0, 0.0], type="GO")  # p8
    #RC.sendRobotPos(robotPos=[239.50279732, -42.36209227, 54.57142639, 0.66162154, 0.0, 0.0], type="GO")  # p12
    #RC.sendRobotPos(robotPos=[233.35125407, 7.32913015, 54.57142639, 0.66162154, 0.0, 0.0], type="GO")   # p26
    #RC.sendRobotPos(robotPos=[223.98607617, 82.37886273, 54.57142639, 0.66162154, 0.0, 0.0], type="GO")   # p47