Exemple #1
0
 def get(self):
     piarm = PiArm(None)
     joint = request.query_string
     print "Joint " + joint
     input_primitive_joints = joint + " r 20"
     piarm.parse_joints(input_primitive_joints)
     return {}
Exemple #2
0
    def should_be_call_parser_with_joint(self):
        Configuration().configure()
        self._executor = RPiExecutor()

        waist = Motor(13, 19)
        shoulder = Motor(23, 24)
        elbow = Motor(17, 27)
        wrist = Motor(16, 20)
        gripper = Motor(5, 6)
        led = Pin(21)
        arm = Arm_partial(waist, shoulder, elbow, wrist, gripper, led)
        self._arm = arm
        self._led = led
        control = Control(None, self._executor, self._led)
        pi_arm = PiArm(control)

        input_primitive_joints = "g c 10"
        pi_arm.execute_joint = MagicMock()
        expected_joint = Joint_partial("g", "c", 10)

        pi_arm.parse_joints(input_primitive_joints)

        pi_arm.execute_joint.assert_called_with(expected_joint)
Exemple #3
0
 def get(self):
     piarm = PiArm(None)
     input_primitive_joints = "g c 20"
     piarm.parse_joints(input_primitive_joints)
     return {}