Camera not sending image to Classmate?

Right now we have compiled the Circle Tracker Demo to the CRio. We have the crossover cable connected from the camera to port 2 on the CRio, and another crossover cable connected from port 1 on the CRio to the classmate.

There is no image coming up at all either and we are very confused. Any help?

you don’t need a crossover to connect the cRIO to the Classmate.
what Language?

Brother you need unistall and install again FRCLabVIEWUpdate2.0for2010 and FRCLabVIEWUpdate1.0for2010 I had the same problem and it worked

Good luck

Yea, we just fixed the Dashboard, which wasn’t updating. We didn’t have a chance to check to see if the camera will send any, but we will tomorrow. I will update tomorrow as well. Oh, and we’re coding in Java.

I updated the dashboard, but the camera is still not sending images. However, I am not getting an error message saying Timeout in Communications, so I have no clue what is exactly happening.

You do have the video display on-off switch turned on, right? It’s the little control at the bottom of the dashboard video window. It’ll show a bright green highlight when you set it to the “on” state.

Yea, we do. We got the dashboard to say “camera running e”, but still no camera images. Any ideas?

I don’t think I saw mention of configuring the camera. There is a utility to create an FRC user and FRC password on the camera. Without those, the camera will simply return errors, and it may be that the WPI camera libs hide the errors – not sure.

Connect the camera to the PC, set the PC IP to 192.168.1.1, and run the camera setup utility. Alternately, you can browse to 192.168.1.90 and do the configuration by hand. You can also do this to verify the camera works correctly. Once you log into the camera, you can view images, change settings, etc.

Greg McKaskle

We did configure the camera and tried setting the username and password to FRC, but that still did not fix it.

Run the Driver Station update to uninstall the old Driver Station, then run it again to reinstall it. Just updating it (without the uninstall) sometimes doesn’t work.

We did uninstall the old Driver Station. Sorry to be very unhelpful to my situation. Is there anything else I can add that would make this easier?

Could you post your code that the cRIO is running?

Ok, well, I’m not at robotics now, so I’ll post it tomorrow. Thanks guys!

This post may help. I haven’t tried it yet but it appears to describe the problem we are having:

We did fix that and we have that update complete.

Here’s our code

import edu.wpi.first.wpilibj.GenericHID.Hand;
import edu.wpi.first.wpilibj.Gyro;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.PIDController;
import edu.wpi.first.wpilibj.PIDOutput;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.camera.AxisCamera;
import edu.wpi.first.wpilibj.camera.AxisCameraException;
import edu.wpi.first.wpilibj.image.ColorImage;
import edu.wpi.first.wpilibj.image.NIVisionException;
import edu.wpi.first.wpilibj.DriverStationLCD;
//   import edu.wpi.first.wpilibj.samples.CircleTrackerDemo.TrackerDashboard;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the IterativeRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class CircleTrackerDemo extends IterativeRobot {

    double kScoreThreshold = .01;
    AxisCamera cam;
  
    TrackerDashboard trackerDashboard = new TrackerDashboard();
    /**
     * This function is run when the robot is first started up and should be
     * used for any initialization code.
     */
    public void robotInit() {
        Timer.delay(10.0);
        cam = AxisCamera.getInstance();
        cam.writeResolution(AxisCamera.ResolutionT.k320x240);
        cam.writeBrightness(0);
      }

    /**
     * This function is called periodically during autonomous
     */
    public void autonomousPeriodic() {
    }

    /**
     * This function is called while the robot is disabled.
     */
    public void disabledPeriodic() {
    }

    /**
     * This function is called at the beginning of teleop
     */
    public void teleopInit() {
    boolean lastTrigger = false;
    DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser2, 1, "Starting Camera Code");
    DriverStationLCD.getInstance().updateLCD();
    Timer.delay(1.0); //Wait one second so user can see starting message

    }

    /**
     * This function is called periodically during operator control
     */
    public void teleopPeriodic() {
            try {
                DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser2, 1, "Camera Running     ");
                DriverStationLCD.getInstance().updateLCD();
                if (cam.freshImage()) {// && turnController.onTarget()) {
                    ColorImage image = cam.getImage();
                    Thread.yield();
                    Target] targets = Target.findCircularTargets(image);
                    Thread.yield();
                    image.free();
                    if (targets.length == 0 || targets[0].m_score < kScoreThreshold) {
                        System.out.println("No target found");
                        DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser2, 1, "Not Found              " );
                        Target] newTargets = new Target[targets.length + 1];
                        newTargets[0] = new Target();
                        newTargets[0].m_majorRadius = 0;
                        newTargets[0].m_minorRadius = 0;
                        newTargets[0].m_score = 0;
                        for (int i = 0; i < targets.length; i++) {
                            newTargets* = targets*;
                        }
                  } else {
                        DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser3, 1, "Pos X: " + targets[0].m_xPos );
                        DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser4, 1, "Pos Y: " + targets[0].m_yPos );
                        DriverStationLCD.getInstance().updateLCD();
                        System.out.println(targets[0]);
                        System.out.println("Target Angle: " + targets[0].getHorizontalAngle());
                    }
                }
            } catch (NIVisionException ex) {
                ex.printStackTrace();
            } catch (AxisCameraException ex) {
                ex.printStackTrace();
            }


        }
    }

It’s just the basic default code for the CircleTrackerDemo**