|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Tips for C++ programming the 2010 control system
I had a little trouble getting the new WindRiver up and running so I thought I'd share a couple of things that I discovered or would recommend:
1. Make sure you install the updates: - FRCLabVIEWUpdate2.0for2010.zip is needed even for C++ (from http://www.usfirst.org/roboticsprogr....aspx?id=10934) - WorkbenchUpdate20100107.exe (from http://first.wpi.edu/FRC/frccupdates.html) - DSUpdate1.0for2010.zip (also from http://www.usfirst.org/roboticsprogr....aspx?id=10934) 2. Follow the directions in "Getting started with C++" from http://first.wpi.edu/FRC/frccupdates.html 3. A couple of the examples didn't work: CameraToDashboardExample and SimpleTracker needed: - right-click on the project and select Properties - select the "Build Paths" tab - click "Add" - enter: -I$(WIND_BASE)/target/h/WPILib/Vision2009 CameraToDashBoardExample needed: - open "cameraToDashboardExample.cpp" - add: #include "WPILib.h" Hope that helps someone! |
|
#2
|
|||
|
|||
|
Re: Tips for C++ programming the 2010 control system
Has anyone got the CameraToDashboardExample to actually work? I can compile it but I get nothing on the DriverStation. I notice that the driverstation program changes your IP address to 10.xx.yy.5 however the CameraToDashboardExample program says it is sending the images to 10.xx.yy.6 I tried setting up a remote dashboard with the IP10.xx.yy.6 but it is not able to connect to the robot at all.
Since there is no source code available yet, I can't change the code to send to 10.xx.yy.5. Any I missing something, or should I just be patient and wait for a fix to be released? |
|
#3
|
|||
|
|||
|
Re: Tips for C++ programming the 2010 control system
Quote:
Also, according to the 2010 WPLib Manual you should try using the 2010ImageDemo code sample. |
|
#4
|
|||
|
|||
|
Re: Tips for C++ programming the 2010 control system
Quote:
Code:
AxisCamera &camera = AxisCamera::getInstance(); camera.writeResolution(k320x240); camera.writeBrightness(0); According to WPI_Library_Users_Guide.pdf found on: http://first.wpi.edu/FRC/frccupdates.html All you need to do to populate that field is to call the camera getInstance method somewhere in your code. |
|
#5
|
||||
|
||||
|
Re: Tips for C++ programming the 2010 control system
Nope, that does not do anything (for the dashboard image)
all you need to do is create a PCVideoServer object |
|
#6
|
|||
|
|||
|
Re: Tips for C++ programming the 2010 control system
The code is automatically creating a PCVideo server instance when the camera is initialized. You should be able to see the images back at the dashboard if you have it running when the sample program starts running.
And if you have the newer dashboard with the targeting stuff, it should display the location of ellipses that were found. Green ones are the "acceptable" targets and magenta are the rest of the ellipses. The 2010 Image demo should work, I just double checked it here. If it's still not working for you, I'll look around some more. I'm running with the dashboard and driver station on the same computer, both at the 10.x.y.6 IP address. |
|
#7
|
|||
|
|||
|
Re: Tips for C++ programming the 2010 control system
I did finally get it working today. The biggest issue I had is that the DSupdate did not update the dashboard. 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 |
|
#8
|
|||||
|
|||||
|
Re: Tips for C++ programming the 2010 control system
Quote:
What should I have my classmate's IP address configured to? I'm getting communications with the robot, and I have the camera tracking the target on a pan/tilt mount, but I'm not getting anything on the dashboard (nothing from the camera and nothing from the digital inputs/pwms either). The calls to DashboardDataSender are still there as per the 2010 Image demo. |
|
#9
|
|||
|
|||
|
Re: Tips for C++ programming the 2010 control system
I think the classmate sets itself to 10.xx.yy.5 when you go into the Driver Station account. You should probably leave it that when even if you are using for development.
If you use a separate laptop for development, you can set it to 10.xx.yy.6 Make sure your dashboard is actually updated as per my previous message (right before yours). You should see a compass type angle readout in the bottom-right corner. If you don't have this then your Dashboard is not updated properly and you will have to uninstall it and then reinstall it using DSUpdate1.0for2010.zip - Kevin Last edited by woodk : 15-01-2010 at 10:47. |
|
#10
|
||||
|
||||
|
Re: Tips for C++ programming the 2010 control system
Under
C:\WindRiver\vxworks-6.3\target\h\WPIlib I have a Vision and a Vision2009 folder Should only Vision2009 be used this year? |
|
#11
|
|||
|
|||
|
Re: Tips for C++ programming the 2010 control system
The Vision dir is modern and what youd should use. The Vision2009 is the code from last year and is obsolete. Only there for old program compatibility.
|
|
#12
|
|||||
|
|||||
|
Re: Tips for C++ programming the 2010 control system
The classmate can always be 10.xx.yy.5
Quote:
Quote:
Quote:
Quote:
Quote:
|
|
#13
|
|||
|
|||
|
Re: Tips for C++ programming the 2010 control system
Quote:
The problem I had was that DSUpdate1.0for2010 did not in fact update the dashboard. It updated the driver station (the bottom window) but not the dashboard. I had to uninstall the old dashboard then reinstall the update for it to work. From several comments I have seen, I think many people have had this problem but not recognized it. Once the dashboard update installed properly the camera images appeared fine. The key thing to look for is if you have the gyro compass in the bottom-right corner of the dashboard. If you do not have this, then your update was not successful; you are still using the old version of the dashboard and you will not receive video. - Kevin |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2010 Control System Manual | screamingeagle | FRC Control System | 9 | 11-01-2010 14:01 |
| Unclaassified: Information about the 2010 control system | Nadav Zingerman | General Forum | 35 | 24-11-2009 19:17 |
| 2009 Control System LabVIEW Tips and Pitfalls | Travis Hoffman | NI LabVIEW | 3 | 22-12-2008 11:25 |
| 2009 Control System C++ Tips & Pitfalls | heydowns | Programming | 1 | 19-12-2008 17:59 |
| A few questions on programming the Control System | Avarik | Control System | 21 | 08-02-2004 11:42 |