예제 #1
0
 def __init__(self, Tp2ws):
     ###
     ### Student team selection -- transform from workspace coordinates to world
     ###
     Tws2w = asarray([[1, 0, 0, 0], [0, 1, 0, -5], [0, 0, 1, -10],
                      [0, 0, 0, 1]])
     ###
     ### Arm specification
     ###
     armSpec = asarray([
         [0, 0.01, 1, 5, 0],
         [0, 1, 0, 5, 1.57],
         [0, 1, 0, 5, 0],
     ]).T
     ArmAnimatorApp.__init__(self, armSpec, Tws2w, Tp2ws)
예제 #2
0
    def __init__(self, Tp2ws, x, y, s, **kw):
        ###
        ### Student team selection -- transform from workspace coordinates to world
        ###

        #first three columns represent axis. Last column represents
        #translation. Adjust last column to adjust workspace placement relative to arm.
        #Base of arm is always at world origin
        Tws2w = asarray([
            [1, 0, 0, 0],  #placement of workspace along x axis
            [0, 1, 0, -5],  #placement of workspace along y axis
            [0, 0, 1, -10],  #placement of workspace along z axis
            [0, 0, 0, 1]
        ])
        ###
        ### Arm specification
        ###

        #Each row represents an arm segment.
        #First three columns represent joint rotation axis. Fourth column represents
        #arm segment length. Last column represents initial arm segment angle.
        armSpec = asarray([
            [0, 0.02, 1, 5, 0],
            [0, 1, 0, 5, 1.57],
            [0, 1, 0, 5, 0],
        ]).T
        self.armSpec = armSpec
        ArmAnimatorApp.__init__(
            self,
            armSpec,
            Tws2w,
            Tp2ws,
            simTimeStep=
            0.25,  # Real time that corresponds to simulation time of 0.1 sec
            **kw)
        self.idealArm = Arm(
            armSpec
        )  #create instance of arm class without real-life properties
        self.move = Move(self)  #move plan