Is it the cRio or the Code?

Hey everyone,

I am going to edit this post because half of it was resolved. Thanks to those who helped!

Current issue:

The code in the attachments does not result in a streaming video on the classmate’s dashboard. I configured the camera according to the camera configuration guide provided by FIRST.

The Post that was here previously:

I am having problems and I am not sure what causes them. I am running pretty simple code (in attachments).

The purpose of this test code is to

  1. Have Servos tilt the camera
  2. Have Camera Image displayed in the classmate’s dashboard

I set-up the camera prior to running the code according to the FIRST Camera Configuration Guide and had the image show to the browser during the set-up. I am using the Axis 206.

I loaded the code ( and I had the right download location specified in Windriver’s preferences). I reset the cRio and then ran teleop.

The Camera image did not show and the servos did not run.

I never worked with the camera before, so maybe it is the code error, but I think the servo code is correct.


I do not know what is causing the issue, but when I was re-imaging the cRio i had a few problems, so is it maybe because the cRio is not processing the code?

  1. When I first re-imaged it, the cRio reset to the correct IP address (10.3.75.2) and I could ping it, but my cRio imaging tool would no longer detect it and I could not load coad.

  2. I IP reset the cRio and did the re-imaging again and got the following error:

[quote]Unable to complete operation because of unexpected error:

Error 7 occurred at File/Directory Info in NI_InternetTK_FTP_VIs.lvlib:FTP [STOR].vi->NI_InternetTK_FTP_VIs.lvlib:FTP Store Multiple.vi->NI_InternetTK_FTP_VIs.lvlib:FTP Put Multiple Files and Buffers.vi->NI_InternetTK_FTP_VIs.lvlib:FTP Put File.vi->ConfigUtility.lvlib:CloseAndUploadRemoteConfiguration.vi->ConfigUtility.lvlib:CurrentLanguageConfig.vi->ConfigUtility.lvlib:ReImageTarget.vi->ConfigUtility.lvlib:Dialog.vi

Possible reason(s):

LabVIEW: File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on Linux. Verify that the path is correct using the command prompt or file explorer.

C:\Users\Robotics\AppData\Local\Temp\lvtemporaryd_440493\FRC_ImageVersion.ini

  1. Re-imaged again and everything ran successfully.

  2. re-imaged the crio again when I thought the cRio was the problem and got the following error

Unable to complete operation because of unexpected error:
Error 56 occurred at TCP Open Connection in repFPC open connection.vi->Query Format.vi->Format Target.vi->ConfigUtility.lvlib:ReImageTarget.vi->ConfigUtility.lvlib:Dialog.vi

Possible reason(s):

LabVIEW: The network operation exceeded the user-specified or system time limit.

  1. I did not know what was wrong and my imaging device started to act strange, so I put the cRio into the safe mode, formated it, and then re-imaged again

  2. Re-imaging was successful, so I reset the cRio, deployed code, and still, nothing worked.

________________________________________[/quote]

Thank you for the help!

Code.png
Definitions.png


Code.png
Definitions.png

Where is the camera connected? It needs to be on cRIO port 2 for the default Dashboard display to work.

Did you remember to install the 6v servo power jumpers on the Digital Sidecar for the PWM outputs they are connected to?

Do you have good communication and robot code lights on the Driver Station? Have you enabled the robot?

The camera is connected to the cRio through a cross-over, to Port 2.

This fixed the servo problem. We did not have the jumpers, now they are moving which means everything is alright with the cRio.

The communications are good, Robot Code light is on, and the Robot is enabled.

Do you by any chance know if the camera code is not what I need to have the image display?

Thank you!

Unless they changed it for 2011 (have not checked) the code you have appears like it should work.

Have you configured the camera itself? Instructions are here:
http://www.usfirst.org/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2011_Assets/Kit_of_Parts/How_to_Configure_Your_Camera.pdf

In short, you have to set up the camera’s username/password access to match that used internally by the software libraries given to us.

Also, regarding your imaging problems, if you deploy camera-relevant code (C++ version at least, which it sounds like you are using) to your cRIO, you will likely have problems imaging due to the way the camera software module is written (it has a bug that prevents proper system soft-reboots, which the imaging tool needs to do). This is why you were forced to use safe mode. The alternative is to “undeploy” and reboot your robot before attempting an imaging operation.

Thank you for the cRio clarification!

Yes, I configured the camera prior to use, and after it did not work, I reset it to factory conditions and went through the process again, but there is still no camera image.

My desktop has a “Setup Axis Camera” icon which is very similar to the icon for re-imaging. When I open it, it tells me that “Unable to complete operation because of unexpected error %d:
%s63 TCP Open Connection in Axis Issue HTTP Request with Authentication.vi->Axis Issue Get.vi->Axis Create FRC User.vi->Dialog.vi”

Is this Setup important by any chance?

Thanks!

That’s unfortunate :frowning:
Do you get any sort of diagnostics on the driver station message windows?

My desktop has a “Setup Axis Camera” icon which is very similar to the icon for re-imaging. When I open it, it tells me that “Unable to complete operation because of unexpected error %d:
%s63 TCP Open Connection in Axis Issue HTTP Request with Authentication.vi->Axis Issue Get.vi->Axis Create FRC User.vi->Dialog.vi”

Is this Setup important by any chance?

This utility was the prescribed (documented) way to configure the camera last year. This year the documentation gives the manual procedure. I’m not sure if that’s due to problems with the utility and the different cameras out there, or if the settings being configured are actually different.

I think if you wanted to try to use that, you’d need to factory reset the camera again to default settings. You also need to wire the camera directly to your laptop and have the laptop’s IP address set appropriately (different than you would set your laptop up to in order to talk to the robot/cRIO).

I’m not (yet) an expert on the C++ or Java frameworks. I hope someone else jumps in with better help than I can give.

Are you sure you’re putting the GetInstance() line in the right place? It looks like it’s going to get called repeatedly, and I think it really should be somewhere that happens only once during initialization.

We had an issue a couple days ago where the factory reset button on our Camera was pressing against our Arm. I can confirm that the Camera Setup Tool does still work with the system due to this.

Hi.

I had the same problem a few days ago but I got my camera working. I dont specifically know what fixed the problem.

We’re using the Axis camera provided to us a few years ago.

All I did was to make sure I followed the steps as advised by FIRST, Use a CROSSOVER cable in PORT 2, Make sure the camera has a power supply (5V) and connect the camera directly to the PC with crossover cable and run the “Setup Axis Camera” Program. The process is fairly quick.

GetInstance() returns a singleton (if the same as last year - don’t have sources in front of me), so it shouldn’t matter.

OP, any chance you can post your complete OperatorControl()? Or a simplified version of such that you’ve tried and not been successful with?

Also as noted in another post, do check that you are using a crossover cable for the camera<>crio connection. Check the ethernet link light on the cRIO when both crio and camera are powered up.