![]() |
2010 Camera and vision problems.
After working most of last build season trying to get the camera working, and ultimately failing. We are hoping to get the camera set up and working this year.
The problem is that it doesn't. The camera works when plugged in to the laptop, both through the NI vision assistant and the web interface. However, when plugged into the cRIO, nothing works. Running the default code that came with this years kit (C++ in windriver) there is no response. Also, the link light on the port that the camera is plugged into on the cRIO doesn't light up. So far I have tried everything I can think of and I have hit a dead end. Has anyone here had any luck getting the camera working? Any suggestions? Thanks in advance, -Luke (675) |
Re: 2010 Camera and vision problems.
Are you using a crossover cable when you plug it into the cRIO?
Eric |
Re: 2010 Camera and vision problems.
Eric,
Yes, we are using a crossover cable to connect. Are we supposed to be using something else? The crossover cable that attaches it to the cRIO is the same as the one we used when attaching it to the PC. -Luke |
Re: 2010 Camera and vision problems.
Many (most?) modern laptops are smart enough to compensate if you use / don't use a cross over cable by switching internally. It is possible that your laptop is tricking you by this method.
Try plugging a hub or switch into ethernet port 2 on the cRIO. Does it light up now? |
Re: 2010 Camera and vision problems.
The crossover cable in the kit last year was orange. The other ethernet cables in the kit were not crossover cables.
|
Re: 2010 Camera and vision problems.
We have used the orange cable. And the cable we are using now is a crossover (We tested it). If I plug the computer into port 2, the lights do come up just as they do if the computer is plugged into port 1. (Although there are no comms with this method). Because of that I am reasonably sure the port is okay.
In reference to another thread on here, I made sure the Camera to Dashboard program compiles and is on the robot. And if I have a debugging console running there are no errors reported :-/ This is really irritating. -Luke |
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
Which camera to dashboard program are you using?
The "Camera to Dashboard" example program does not work to my knowledge. Either build the "FRC 2010 Vision Demonstration" program, or add this to your robot's main code: Code:
AxisCamera &camera = AxisCamera::getInstance();Code:
#include "Vision/AxisCamera2010.h" |
Re: 2010 Camera and vision problems.
DanDon: The code has that, and every part completes as expected.
jc4p: Ahhh, I will give that a go when I get back to the laptop. Is the transmit to the DS auto-magic from that point, or should I also include the PCVideoServer? Thanks again everyone for all the help. Ill report back after I test again. |
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
After testing the recommended code, I still have some problems.
Code:
AxisCamera &camera = AxisCamera::getInstance();The one that leads me to believe this is a hardware problem of some sort is: Quote:
-Luke |
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
I assume you set up the camera passwords per the control system documentation?
|
Re: 2010 Camera and vision problems.
Ok, I feel like I am close to the solution. One thing I am seeing, after poking around in the console of the cRIO, is that it only has two network devices, the loopback, and the main one with the 10.xx.xx.2 ip. This makes me wonder how port two is supposed to connect on a different subnet to the camera.
My question then, is if one of you who has the console working to your cRIO could run "ifShow" and just tell me what things are listed. Failing that, I am at my wits end and I will have to call NI tomorrow if I cant get this fixed. -Luke |
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
Update: My code now seems to be able to initialize the camera without it hanging. The lights are on on the cRIO as well. To do this I re-flashed the cRIO and checked to see if the other interface was there. We also switched crossover cables, but im not sure if we needed to.
It seems like the only remaining problem is getting the video out to go back to the laptop now. Thank you all for your help so far. -Luke |
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
Quote:
Here is the result of an inetstatShow command PHP Code:
PHP Code:
The camera has the root/admin account set up and has the default 192.168.0.90 IP address. And yes, I am using a crossover cable. |
Re: 2010 Camera and vision problems.
Can you ping your camera (192.168.0.90) from the WR Console prompt?
|
Re: 2010 Camera and vision problems.
Quote:
Also, I don't know if the camera /works/ after starting it up, only that it starts up. I'm going to put some tracking code on today at some point and try to see if the camera is working. Also, has anyone heard of a team actually getting the camera working/sending to the dashboard? Because I think its possible that this is a first problem. Actually, has anyone gotten "2010ImageDemo" to compile? I really wish I could tell what is FIRSTs fault, and what is mine. :P |
Re: 2010 Camera and vision problems.
we got the code to compile but it didn't seem to be working, held the target in front of it and it just said no valid targets, no video was sent to the dashboard. we are really confused and since this task is pretty important to us and we didn't write the code, its safe to say that we are a little frustrated
|
Re: 2010 Camera and vision problems.
Quote:
Other than that it looks like we just have to wait for first to to fix it. |
Re: 2010 Camera and vision problems.
i did hook it up to a computer to check to see if its focused, it was a little bit out but not all that much
|
Re: 2010 Camera and vision problems.
So I get into the lab today and the camera decides to initialize itself without a problem. Still getting no image on the dashboard though. I'm not getting any other data on the dashboard either though....is anyone else?
EDIT: Annnnnnd now it's decided to go back to not working. Can I throw this thing out of a window? |
Re: 2010 Camera and vision problems.
I'll test the Java Camera Code tonight and see if it works correctly using the v19 image and the sample code.
|
Re: 2010 Camera and vision problems.
1 Attachment(s)
I tested the sample code for Java and it seems ok, but it also has some gyro code in it so I stripped that out to show the bare minimum. Here you go...
It uses the Driver Station to Output Cam X and Y values. |
Re: 2010 Camera and vision problems.
So I guess this means that in C++ either the example is wrong or the WPILib is wrong...
|
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
Seeing Java and C++ use pretty much the same code base, I'd think it would work in one if it works in the other, I can test the C++ code tomorrow night.
|
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
With Java, it pretty much went.
Download: http://joule.ni.com/nidu/cds/view/p/lang/en/id/1534 and install it Update cRio Image to v19 (Tick Format Controller) Plug Camera into Laptop and Run Config Utility Plug the camera into the robot using Port 2 and a Crossover Cable Pull down the Netbeans plug-ins Run the source code I posted on the last page I'd assume it would be the same for Wind River, except you would need to download the update from http://first.wpi.edu/Images/CMS/Firs...te20100107.exe for Workbench. |
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
Something else you may want to try, if you used Wind River last year is to uninstall it and delete all traces of it. Then reinstall, I think the location of WPILib.a moved down a directory and Wind River could be pointing to the wrong file.
You may also try searching for WPILib.a under C:\Windriver and deleting it, after that reinstall the Workbench update. If it can't find WPILib.a then that's your issue and you need to point to the current location. If you were using WPILIb source code to compile you WPILib.a file that can cause the issue as well. I haven't seen the new version of WPILib source yet. |
Re: 2010 Camera and vision problems.
Quote:
The dashboard on the Driver Station doesn't work though. :( |
Re: 2010 Camera and vision problems.
Still absolutely no dashboard data with the 2010ImageDemo. I'm getting the code to run, however there's an output line on the VxWorks console that worries me.
Quote:
No idea what it means, but it doesn't look promising to me. Any help? |
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
I'm working on LabVIEW trying to solve the same problem. I've gotten the image to show up on the LabVIEW instrument, but not on the dashboard. I am getting the image from the cRio.
|
Re: 2010 Camera and vision problems.
Hey does anyone know were the demo code is located I can't find it anywhere.
Thanks, |
Re: 2010 Camera and vision problems.
Some people seem to be having a similar problem to what I had ...
in my case the DSupdate did not update the dashboard (only the driver station). I only noticed because I installed the update on a second laptop and it looked different. I went back and checked the file date and it was not the same on the classmate. I had to run the DSupdate program, but tell it to uninstall, then run it again and install. Now it works. - Kevin |
Re: 2010 Camera and vision problems.
Quote:
Make sure you follow the "Getting started with C++" document the first time. - Kevin |
Re: 2010 Camera and vision problems.
Reinstalling worked for us!!!!
Thanks guys, Julian |
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
I finally got camera output + target data on the dashboard. The problem was indeed the drivers station update.
Here's how to fix it:
This fixes it. NI needs to fix the installer. |
Re: 2010 Camera and vision problems.
Quote:
I also have the camera tracking the target on a pan/tilt assembly :yikes: . |
Re: 2010 Camera and vision problems.
Does anyone know if you should be able to ping the camera @ 192.168.0.90 from the driver station. Thanks
|
Re: 2010 Camera and vision problems.
Quote:
The syntax for the VxWorks ping command is Code:
ping "host address",numPacketsCode:
ping "192.168.0.90",10 |
Re: 2010 Camera and vision problems.
Somehow, it still doesn't work for my team. We tried reinstalling the driver station update and the dashboard reverted to the newer update. However, it still refuses to show an image or return data. Is it necessary to change the camera settings through the given program?
|
Re: 2010 Camera and vision problems.
Quote:
We have been unable to get the camera sending the camera information using C++ (seems to hang during the camera initialization) but have it running successfully in both Java and LabVIEW. |
Re: 2010 Camera and vision problems.
Has anyone gotten the Camera running in LabView?
|
Re: 2010 Camera and vision problems.
Quote:
I don't know the details, but basically the ethernet port lights are off. We've tried a few crossover cables, but none of them are working. The camera works connected to a laptop, and the port works when we connect the router to port 2, so neither the camera or the cRio seems to be broken. I know we've updated the LabView software and the Dashboard software. The Dashboard update didn't work, so we tried it again, and got it to work. The last thing I know of is that the cRio is not responding to the Dashboard or something anymore. Something about the Watchdog is stopping. Anyway, don't quote me on the problems as I wasn't the one messing with it, but I wanted to add another team to the list. I think we tried everything here. I know this thread was up on the projector the whole time while the programming team tried to sort it out. |
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
Quote:
I cannot test this till monday, but you might wanna try post 6 of this thread Hopefully reinstalling the DS update will work, but if it doesnt, this might(post 3) |
Re: 2010 Camera and vision problems.
Quote:
when we discovered the problem, the single crossover in series with a normal cable worked just fine. We are painting the target now. By noon tomorrow we hope to have target images. We have had much experience with setting IP addresses on computers. This is the most likely cause of a system to fail to get an image. I have to threaten students with bodily harm if they try to do wireless before testing with wired LAN. The wireless stuff loves to do its own thing. After we had wired connections successfully, then we did the wireless. |
Re: 2010 Camera and vision problems.
I am quite excited about the hopefully better camera workings this year. Wether or we get the target tracking working this year is an anserw i won't know until shipping date, but we intend to use it for tele-opp. On the intial testing of the camera, the vetrans were able to get it to work perfectly fine, however there was a slight delay. I wanted to see if anyone found a way to fix the lag, or are we stuck waiting a few seconds to get the images back. - If the lag is un-fixable, I am interested to see how the drive-teams get around that little obstacle.
|
Re: 2010 Camera and vision problems.
We're programming in java and we got the camera hooked up to the cRIO and Dashboard. It recognized the camera by saying "camera running e". However there was no image being fed to the dashboard. The dashboard has already been fixed and the v19 update has already been made. Any suggestions?
|
Re: 2010 Camera and vision problems.
Just a last small update from us, everything seems to be working after trying the uninstall re-install that was recommended. Thank you all for the help!
|
Re: 2010 Camera and vision problems.
I'm a programmer for rookie team 3357 and we are programming in Java.
When ever we initialize the camera (AxisCamera.getInstance();) our code NEVER works. It displays "Watchdog not fed" and "no robot code". It also hangs on that line. We have updated our drivers station to v19 and done all of the other necessary updates. Any suggestions? |
Re: 2010 Camera and vision problems.
From above:
Which camera to dashboard program are you using? The "Camera to Dashboard" example program does not work to my knowledge. Either build the "FRC 2010 Vision Demonstration" program, or add this to your robot's main code: Could you direct me to the "FRC 2010 Vision Demonstration" program mentioned above? We are having issues getting our camera working as well with C++. -Ted Dressel, Mentor, Team 1111 |
2010 Camera and Vision Attempted Setup Summary
************************************************** ****************************************
**EDIT: PLEASE DON'T REFER TO THIS. REFER TO POST #68 INSTEAD. THERE IS INCORRECT INFORMATION BELOW!** ************************************************** **************************************** Hi Guys, Since there’s a wealth of information located in this thread I’m going to try to summarize the steps for getting a working camera setup for C++ (this may still be helpful for those using the other platforms as well). This summary assumes that code can be loaded on the cRio and run. This is specifically for the 2010 Vision Demonstration example. 1. cRio must be reflashed with v19 image. 2. WindRiver should be intstalled with the WPI Lib update (WorkbenchUpdate20100107.exe). Did anyone have to uninstall WindRiver first? 3. The camera should be set up with IP address 192.168.0.90 (which is the default) and a username and password of “root” and “admin” respectively (admin is NOT the default). I understand there are other valid usernames and password combinations as well. 4. The camera should be connected via CROSSOVER cable to Ethernet port 2 on the cRio and adequate power supplied. 5. The driver’s station update should be installed (DSUpdate1.0for2010.zip). This requires installing BOTH components, uninstalling BOTH components and then reinstalling BOTH components again. Apparently the NI loader has issues. ::ouch:: 6. Add the “2010 Vision Demonstration Program” to the current workspace and compile. (In WindRiver click File -> New -> Example… -> VxWorks Downloadable Kernel Module Sample Project -> FRC 2010 Vision Demonstration Program -> Finish.) Be sure to use the correct compiled cRio image path located in the FIRST Downloader Preferences section of “Preferences” (Located under Window). 7. Deploy the code. And watch it work! From the information I can glean from this thread, this should work (and pan and tilt maybe as well if you hook up some servos – my goal is just to get some images first). Now at this point, us SPAM guys haven’t been able to get it to work (camera/cable work with a computer, but not the cRio), but we didn’t uninstall BOTH of the driver’s station components last night. I’m thinking of just starting from scratch on all of this, so the above is somewhat speculative. Please feel free to make comments or suggestions for additions to the above steps. I know a many people have been going through the same frustrations and I’m trying to alleviate some of the pain. Hope this helps someone! - Bryce |
Re: Camera ping questions
I've seen in this thread that one can access the console on the cRio using WindRiver and NetConsole. Is it correct for me to assume then, that one can use putty or some other console program as well by connecting a null modem cable between a PC and the cRio? If this is the case, what is the baud rate and other settings?
My first assumption would be a 115200 baud rate 8 - N - 1 with no flow control. Any help would be great. Thanks. |
Re: 2010 Camera and vision problems.
Well, I see now how one can connect to the cRio using an Ethernet based approach, but is there a method to use just a serial cable?
- Bryce |
Re: 2010 Camera and vision problems.
Use a null modeum cable
Any terminal emulator program (9600 baud, 8 data bits, 1 stop bit, parity-none, flow control-none) On the cRIO there is a DIP switch "Console Out" that must be on. I usually leave it on. Connect up and reset the cRIO to see the startup console dump. |
Re: 2010 Camera and vision problems.
I got it working by changing the username of the camera to FRC and the password to FRC
In Vision/AxisCamera2010.cpp it's using that combo (and only that combo) for the send request Code:
Authorization: Basic RlJDOkZSQw==Code:
"RlJDOkZSQw==", /* FRC, FRC */ |
Re: 2010 Camera and vision problems.
Quote:
|
Re: 2010 Camera and vision problems.
Ok, so we've tried changing the username and password to FRC, but the camera is still not sending any images. It still says "camera running e". We have everything working on the dashboard except the image.
We noticed that when plugged into port 2, the orange light in the port is not flashing, as opposed to the flashing one in port 1. Is there any chance that could signify the problem/a solution? |
Re: 2010 Camera and Vision Attempted Setup Summary
Quote:
|
2010 Camera and Vision UPDATED Setup Summary
Ok Guys,
Last night we were able to get it working! It appears our major problem was that the camera did not have an ADMINISTRATIVE user with the username "FRC" and password "FRC". When I add this it works, and when I use "root" and "admin" it does not. This seems definitive to me. Also, I don't think it was necessary, but as we were grasping at straws, we installed the FRC LabView update on the Classmate PC (FRCLabVIEWUpdate2.0for2010.zip). If any teams still can't get this to work, this might be the problem. Can anyone who got it to work verify that they didn't have to install this? Also, you shouldn't have to uninstall and reinstall WindRiver because we didn't. Here are the updated steps below with what we did: 1. cRio must be reflashed with v19 image. 2. WindRiver should be intstalled with the WPI Lib update (WorkbenchUpdate20100107.exe). **AN UNINSTALL APPEARS UNNECESSARY AS WE DID NOT UNINSTALL.** 3. The camera should be set up with IP address 192.168.0.90 (which is the default) and a username and password of **FRC** and **FRC**, respectively. I understand there **MAY BE** other valid usernames and password combinations as well. ** I PREVIOUSLY STATED THE USERNAME AND PASSWORD AS root AND admin. THIS IS INCORRECT. I KNOW AT LEAST ONE VALID COMBINATION IS "FRC" and "FRC". root AND admin DO NOT WORK!** 4. The camera should be connected via CROSSOVER cable to Ethernet port 2 on the cRio and adequate power supplied. When you plug in the camera, the orange and green lights should stay on (when not sending data) and may blink a couple times, but no rapid blinks (again, when idle).These two lights signify that there is at least a connection between the cRio and camera. They must be on, or you either have a bad cable, or non CROSSOVER cable (the orange one is a crossover cable). 5. The driver’s station update should be installed (DSUpdate1.0for2010.zip). This requires installing BOTH components, uninstalling BOTH components and then reinstalling BOTH components again. Apparently the NI installer has issues. **IT MAY NOT BE NECESSARY TO UNINSTALL BOTH COMPONENTS. THE OTHER IS FOR THE CYPRESS I/O AND SHOULD NOT BE RELATED TO THE CAMERA. IT MIGHT HOWEVER, AFFECT THE I/O MODULE.** 6. Add the “2010 Vision Demonstration Program” to the current workspace and compile. (In WindRiver click File -> New -> Example… -> VxWorks Downloadable Kernel Module Sample Project -> FRC 2010 Vision Demonstration Program -> Finish.) Be sure to use the correct compiled cRio image path located in the FIRST Downloader Preferences section of “Preferences” (Located under Window). 7. Deploy the code. And watch it work! I'll try to give a description of what happens after rebooting the cRio using the unmodified 2010 Vision Demo example: With the dashboard up and running, reprogram the cRio and then reboot. When the dashboard shows that you have three green lights (communications and two others I don't remember), you should be disabled and Ethernet port 2 on the cRio (to which the camera is connected) should have steady lights, orange and green (the orange may blink every now and then). After enabling, not much happens for at least 10 seconds. Referring to the code, there is a wait statement that will wait for 10 seconds to allow the camera to boot. During this time THE WATCHDOG IS NOT FED. So just after enabling and for about 10 seconds afterwards, the watchdog will not be fed. There will be a message that says "Watchdog not fed". After about 12-15 seconds the orange light at Ethernet Port 2 will start flashing rapidly and an image will be displayed. Also, the "Watchdog not fed" message will go away. The green lights at the front of the camera should come on as well to let you know it has an active connection. Also, when you pull the trigger, the camera will track a target. It seems to do a reasonable job, but the frame rate of the image displayed using the unmodified code is pretty horrible. My hope is that this will help a lot of teams overcome their frustrations. I'll try to answer any questions people might have about this process. - Bryce P.S. The caps locked words are not me screaming, but rather trying to point out important information. :rolleyes: |
Re: 2010 Camera and Vision Attempted Setup Summary
Quote:
Please refer to the updated setup summary. The "watchdog not fed" message will appear for about 12-15 seconds and then go away. You might not be waiting long enough. We also have 1 joystick and multiple jags hooked up (we're still on last years setup). If you have verified that the camera works using a computer, you should see the orange and green light turn on on Ethernet Port 2 when hooked up to the cRio. |
Re: 2010 Camera and vision problems.
We switched to "2010ImageDemo" and got our camera working.
Note: You need to wait for the camera lights to come back green after rebooting the robot then enable the robot. About 10 seconds later, the camera stream comes up. In my personal opinion, this camera setup is a real pain in the you know what. :) |
Re: 2010 Camera and vision problems.
Has anyone gotten the camera working in DEBUG mode through Wind River?
We can get it working in both RUN, and when we DOWNLOAD the code, but in DEBUG mode the video feed never comes up. Even in RUN and DOWNLOAD modes, sometimes it's unreliable. When we make code changes using either of these methods, we must reset the cRIO. After powering the unit back on, the video feed doesn't always come up. Would love to know if anyone else is experiencing this same behaviour, or if it's just us? |
Re: 2010 Camera and vision problems.
Quote:
- Bryce |
Re: 2010 Camera and vision problems.
Quote:
Also, when doing Debug mode with the 2010ImageDemo, the user program will fail to terminate correctly so you can't do multiple debug/run/terminate sessions in a row. The normal FRC tasks terminate correctly, but the CameraTask and PCVideoServer tasks don't die, and result in the robot hanging until a reboot. --Eric |
Re: 2010 Camera and vision problems.
Quote:
It's a real pain, but for the time being, I don't see any way around it. I wonder if there could be an issue with how the AxisCamera object is disposed of? |
Re: 2010 Camera and vision problems.
I saw that someone said that the watchdog was not being fed. We had that problem too and it turns out that what we were doing was that we put a camera display image into the teleop front panel to see if we could get a picture that way, but when we took that part out of teleop the watchdog never timed out again.
|
Re: 2010 Camera and vision problems.
Hi
I am having trouble with the DS update. I have tried the the up date and deleted the folders and did everything for it. When the Classmate restarted the DS newer came up on the driver station for the driver account. Did I do something wrong or did I miss something. Please help. By the way I am using LabVIEW. |
Re: 2010 Camera and vision problems.
I am using 2010 image demo - it seems that this should enable the camera to be displayed in the driver station - am I understanding this correctly?
Currently, however it is not working... just want to make sure I am not wasting my time.... The camera image display says "timeout in cameracommunications" sometimes the operation will not start because "watch dog not fed" ... sometimes this isn't an issue, however... edit fixed problem; ds not updated |
| All times are GMT -5. The time now is 14:45. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi