Announcement

Collapse
No announcement yet.

Concept tensorflow object detection webcam

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Concept tensorflow object detection webcam

    We are trying to use "Concept tensorflow object detection webcam" as provided in the examples.m When we view the camera stream everything works great. When we initiate the hit play the following error pops up evertime:
    "Robot Status: Running
    To attempt recovery please restart the robot
    Error could not find hardware device
    intakeasdcmotor"

    We don't have a motor named intake anywhere in our hardware. The only two programs we have loaded are the hardware and the webcam program.

    Below is the hardware program
    package org.firstinspires.ftc.teamcode;

    import com.qualcomm.robotcore.hardware.DcMotor;
    import com.qualcomm.robotcore.hardware.DcMotorEx;
    import com.qualcomm.robotcore.hardware.HardwareMap;
    import com.qualcomm.robotcore.hardware.Servo;
    import com.qualcomm.robotcore.util.ElapsedTime;

    public class HardwarePushbot
    {

    //Motors
    public DcMotor left1 = null;
    public DcMotor left2 = null;
    public DcMotor right1 = null;
    public DcMotor right2 = null;

    /* local OpMode members. */
    HardwareMap hwMap = null;
    private ElapsedTime period = new ElapsedTime();

    /* Constructor */
    public HardwarePushbot(){

    }

    /* Initialize standard Hardware interfaces */
    public void init(HardwareMap ahwMap) {
    // Save reference to Hardware map
    hwMap = ahwMap;

    // Define and Initialize Motors
    left1 = hwMap.get(DcMotor.class, "left1");
    left2 = hwMap.get(DcMotor.class, "left2");
    right1 = hwMap.get(DcMotor.class, "right1");
    right2 = hwMap.get(DcMotor.class, "right2");

    //Set motor direction

    left1.setDirection(DcMotor.Direction.REVERSE);
    left2.setDirection(DcMotor.Direction.REVERSE);

    right1.setDirection(DcMotor.Direction.FORWARD);
    right2.setDirection(DcMotor.Direction.FORWARD);

    // Define and Initialize Servos

    // leftHand = hwMap.get (Servo.class,"leftHand");
    // rightHand = hwMap.get (Servo.class,"rightHand");

    // Set all motors to zero power

    left1.setPower(0);
    left2.setPower(0);
    right1.setPower(0);
    right2.setPower(0);

    // Set all motors to run without encoders.
    // May want to use RUN_USING_ENCODERS if encoders are installed.
    left1.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER) ;
    left2.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER) ;
    right1.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER );
    right2.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER );


    // set the drive motors to brake when zero power is applied

    left1.setZeroPowerBehavior(DcMotor.ZeroPowerBehavi or.BRAKE);
    left2.setZeroPowerBehavior(DcMotor.ZeroPowerBehavi or.BRAKE);
    right1.setZeroPowerBehavior(DcMotor.ZeroPowerBehav ior.BRAKE);
    right2.setZeroPowerBehavior(DcMotor.ZeroPowerBehav ior.BRAKE);

    //set the shooter motor to run using encoders to use velocity instead of motor power

    }
    }



  • #2
    did you modify the sample program "Concept tensorflow object detection webcam" and declare a "HardwarePushbot" object or another Hardware object? It looks like the program is trying to establish a Hardware project with a motor named "intake".

    Comment


    • #3
      we did not modify the webcam sample at all, that's what has us confused! We even deleted the sample and downloaded it again just to be sure.

      Comment


      • #4
        Are you using blocks? The message "Could not find hardware device" comes from blocks.

        Comment


        • #5
          Yes, we had a block left from last years program, removed it and it worked great.

          Comment

          Working...
          X