There's a new version of the Cookbook posted

There is a new version of the Robot Programming Cookbook posted on the WPILib project under the documents section. It has a new section on writing command-based programs in C++ with a fairly extensive tutorial. I would highly encourage teams using C++ to check it out. It makes writing complex robot programs much simpler and provides a “cookbook” method of organizing your code.

http://firstforge.wpi.edu/sf/docman/do/listDocuments/projects.wpilib/docman.root.c_and_java_documentation

I still have to add more C++ examples to go with the existing Java code, but this should make it a lot better for everyone thinking about using this approach to programming your robot.

Brad

Hi Brad,

I’m going to work w/the students today to see if we can get this to work; I think the standardization of subsystem/command behavior is going to make distributing tasks to different students who are at different experience levels easier, and should really help as we integrate everything together.

I’m pretty experienced w/WPI Library, cRio & Dashboard in general, but since this command-based scheduler and programming model is pretty new I am hoping you’ll be available to guide us through any roadblocks we encounter, either through our misunderstanding or any bugs that may remain in the Scheduler, etc.

I am assuming this forum is the best way to get this help, but if there’s a better way to give you feedback on any issues we encounter please let me know.

Thanks,

  • scott

Hi Brad,

We ran into a problem installing the FRC CPP tools plugin into Windriver 3.0.1 (one of our students is using 32-bit Windows XP). The latest cookbook says to be in the “Advanced device development” perspective, which doesn’t exist in Windriver 3.0.1.

Instead, we use Help->Software Updates->Find and Install…

The Update URL we used was: http://first.wpi.edu/FRC/c/eclipse/update/

However, when we attempt to update, we get this message:

“No features found on the selected site. Choose a different site or site category.”

Thanks for any help you can provide,

  • scott

Hi Brad!

My team and I are having the same problem as Scott. Is it possible to download the plugin in the old (3.0.1) version of Windriver? Or do we need to install the newer version (3.3.1)? If so, does the newer version work on XP 32 bit or only on Windows 7 and XP 64 bit? Or can we install the newer version on our Windows XP 32 bit computers? We only have Windows XP 32 bit computers to really work with, so will not having the plugin make or break programming in Command-Base?

Thanks!!
-Liz

HI Brad,
We too only have 32bit XP machines, and are having NO luck getting the first example program to build and deploy. Had to play around a lot to get WR to see the cRio, but finally see the target. But every time we build, we only get a Makfile. We need VERY detailed instructions on how to set this up.

Thanks,
Steve - 470

Hello Brad,

Same problem here with not having the “Advanced Device Development” perspective and with not being able to install the plugins. Copy and pasting the default parts for each .h and .cpp files for every Command and Subsystem seems the only way around this issue right now, but is there a way to fix that?

Thanks,

Sajan - 818

We are having similiar problems. I wanted to use this framework since it goes along with designs we have used in the past. Fortunately we have one Windows 7 machine to create commands and subsystems but would be better if we could do that on XP 32 bit machines. Also ran into another problem that I posted in another thread hoping for some sort of hint. The sample (GearBot) program includes the Command.h file that should be in the Commands folder. I don’t see it in the example and the example doesn’t build because that file does not exist. I think this is related to a problem we are having with our own program where we have a class inheriting correctly from CommandBase which in turn inherits from Command. It doesn’t appear that the inheritance is working properly since the build does not recognize the class. Any help would be great.

Tom Thompson
Team 847

Hey Brad,
I’ll break from the pak and say…I only see the cookbook version 3 from 01/09/12 and nothing newer. Can you take a look and see what you see?

Thanks,
bob

Since Brad’s post was on 1/9/2012 it makes sense that’s the date on the document. I looked at first forge and the latest version of the doc I see is version 3 from 1/9.

I also took a crack at installing the plug-in to the workbench and had no problems. I am running a 32-bit Windows XP machine. I don’t think the perspective you are in really matters but I started from the standard application development perspective. I took screen shots of the process all the way through and have attached a word doc with the screen shots.

WPICookBookInstall.doc (1.59 MB)


WPICookBookInstall.doc (1.59 MB)

Ha. My bad. I realize my error here now. I was excited as I thought there was another update and got a bit carried away. :slight_smile:

bob

I successfully went through the posted instructions for installing the plug-in on a 32 bit XP machine. Everything seemed to work except I still don’t see the option of adding a command or subsytem file to the project when I right click on the project. I get this when I use my Windows 7 machine but can’t find the menu choice anywhere on the XP.

Tom Thompson

I also do no see the menu options for adding new subsystems, commands, etc. I guess we at least get the example project and can just copy paste the example classes and change the names (which is i guess all the menu options do for you anyway).

Thanks for the verification. I thought I was losing my touch. We do have a backup plan but still struggling with errors that I think are related to Command.h. In the Gearsbot sample, this is included with the following:

#include “Commands/Command.h”

Since there is no Command.h in that folder, the build does not complete. I am wondering if it also did not get included in the WPILib since we are having problems with our software that might be the result of trying to inherit from Command.h. We have deleted the above include in our version of the software.

Tom Thompson
team 847

It sounds like you may need to install the Workbench update. This includes the latest cRIO image and WPILib source code. You need this update whether you plan to use the Command based robot stuff or not (if you plan to use C++).

http://firstforge.wpi.edu/sf/frs/do/viewRelease/projects.wpilib/frs.2012_update_for_c.frc_workbench_update_v2993

The updates were installed. I would be curious if anyone has actually gotten the command based sample to work properly in C++. It looks like it was originally developed and tested for Java but it is hard to tell. Anyway, we decided to move back to a more familiar method of employing OOP since this particular problem has just stalled the work. Maybe I will go back and explore the issue more when we have the luxury of time. I thank you all for responses.

Tom Thompson

The update is necessary to correctly run the plug-ins, however the update site has also been re-deployed to attempt to avoid further problems.

Every time I try to run the install this plugin, an error comes up that says FRC Cpp Development Tools (1.0.0.2) requires plug-in “org.eclipse.ui.console (3.5.0)”, or later version. Anyone have any idea where I could fix this?

Thanks,

Sajan

Team 818

Could you give a little more info on your development environment?

useful information would be:

  • Version of Workbench you are running (in about)
  • Whether you have installed the updates for this year for workbench (if not, try that, as this appears at first glance to be a “your version is too old” issue)
  • Any additional plug-ins your have installed
  • What step of the process this occurs on

All this will help to narrow down where to look for the problem, and figure out if its specific to you or a general one I need to fix in the next update of the plug-ins.

Hopefully I’ll be able to help :slight_smile: (and hope your build season is going well!)

When reading the cookbook section on vision processing, the subsections on sending data to the robot, detecting circular targets, and measuring distance to targets have section titles, but no explanations, just a blank page. Is there another version that includes these somewhere that I haven’t found?

I am running a 32 bit Windows XP Professional and WindRiver version 3.0.1. I’ve ran the WindRiver update v2993 and the only plugin that has been installed this season has been the FRC Dowloader that was installed when I installed WindRiver this season.

As for when in the process this error has occured, after adding the url and name of the plugin in the updates window and clicking finish, there is a new window that comes that has the search results for the updates and has a checklist. I go to check WPICookBook and when I do this error (“FRC Cpp Development Tools (1.0.0.2) requires plug-in “org.eclipse.ui.console (3.5.0)”, or later version”) comes up and doesn’t allow me to do anything else in that window except for press cancel or unchecking the plugin update.

Let me know if you need anything else to figure this out.

Thanks,

Sajan
Team 818