Log in

View Full Version : Robot Builder?


yelk11
08-01-2013, 14:26
My dad was looking through somewhere and found a little about Robot builder. i was wondering where to download it and the cons to using it. I am using it for Java.

sretter
08-01-2013, 16:32
The RobotBuilder come with the 2013 Update- the jar file is located at the sunspotfrcsdk/tools directory- usually something like /Users/<username>/sunspotfrcsdk

Anyways the cons I can think of right now are
1. Takes away some of the fun parts of programming
2. From my short usage it doesn't seem to be perfect(for exampe once the generated code didn't compil becasue it forgot to include a file) so I'd recommend to still go over the code that it generated.
(in my opinion the pro's outway these minor con's)

Joe Ross
08-01-2013, 16:51
There's a decent amount of documentation on screenstepslive. http://wpilib.screenstepslive.com/s/3120

yelk11
08-01-2013, 16:57
THANK YOU GUYS so much. :D

F22Rapture
08-01-2013, 20:02
I tried it out a bit but decided I'd prefer to do it by hand. I did, however, use their idea of centralizing all of the electrical parts of the robots into static instances in RobotMap. Not necessary if you don't plan to use livewindow, but if you do it makes things *much* easier.

yelk11
08-01-2013, 20:50
i encountered a problem. it wont let me execute the file. is it becouse i have windows 8 or i just dont have something downloaded?

F22Rapture
08-01-2013, 21:57
i encountered a problem. it wont let me execute the file. is it becouse i have windows 8 or i just dont have something downloaded?

Did it give you an error message? I'm also running windows 8 and haven't had any issues.

yelk11
09-01-2013, 07:12
no didnt give me a message, it asks me to choose what to run with it and i just chose java(jdk)

Bryscus
09-01-2013, 11:46
I've been following along with the videos on youtube (http://www.youtube.com/user/BradAMiller) and for the most part I've had few problems. Unfortunately, we use C++ and the examples during the coding portion aren't 100% compatible, but they are very close. C++ requires adding include files for commands that are used in a class and accessing methods a little differently (everything is a pointer, so "->" is used instead of ".").

We have used the iterative template in the past and command programming is new to us. Following the videos, however, I feel the concept is relatively easy to grasp and CERTAINLY much easier to implement in the long run as code reuse can be very high since one can call any command at any time.

Where this really shines however, is in test mode on the driver station (at which point you can manually control and tune subsystems) and manually calling commands from Smartdashboard while the robot is running. This allows one to check out each command before using commands in a sequence and even determine the best command order (or which commands can be run in parallel or need to be run sequentially).

Another great benefit to using this is the ease with which we should be able to get new programmers up and running. Because the basic structure is created by Robot Builder kids can worry more about the logic of programming and somewhat less about the complex structure of C++/Java.

For the last couple years I've been somewhat annoyed with all the cool tools the LabView guys get to play with. Its about time we had some of our own. Brad Miller and his guys have really outdone themselves this time.

- Bryce

BradAMiller
09-01-2013, 16:18
no didnt give me a message, it asks me to choose what to run with it and i just chose java(jdk)

In some Java installations on Windows it doesn't set up the .jar extension to run automatically from Windows Explorer. Jar files are Java archives and have all the classes in the program and a manifest file to tell which class to run.

To run RobotBuilder use the java command:

java -jar RobotBuilder.jar

Actually there will be a version number on RobotBuilder, so choose the actual file name from your installation.

Brad

makahn64
10-01-2013, 00:03
Has anyone else had the problem of it running once, then not so much?

We ar eon Windows 7 and Robot Builder ran the first time I tried it, then every time I try to run it since, it just gives me the little project create/load window and after that it just hangs with a Java button on the task bar. I tried a reboot, running command line and more. No joy.

RufflesRidge
10-01-2013, 08:01
Has anyone else had the problem of it running once, then not so much?

We ar eon Windows 7 and Robot Builder ran the first time I tried it, then every time I try to run it since, it just gives me the little project create/load window and after that it just hangs with a Java button on the task bar. I tried a reboot, running command line and more. No joy.

It sounds like the window may be offscreen. Try hovering over the Java icon in the taskbar, then the little window when it appears above, right click and select Maximize. If this works you can then click on the title-bar of the window and drag down to get a normal size window on screen.

makahn64
10-01-2013, 11:20
It sounds like the window may be offscreen. Try hovering over the Java icon in the taskbar, then the little window when it appears above, right click and select Maximize. If this works you can then click on the title-bar of the window and drag down to get a normal size window on screen.

BINGO! Thanks so much. No I don't have to run it on my mac :ahh: :ahh:

2130Pi
13-12-2014, 14:30
I'm no team 2130 and we have a problems with robot builder. On one of our computers that is for programming robot builder wont even open or do anything. Our "Lead Programmer" says its a problem with java but we don't know. And I haven't been able to find anything on our problem. So if you have had the same please comment and maybe we can figure it out. thx

krieck
14-12-2014, 17:10
I'm a big fan of the RobotBuilder, and encourage our programmers to use it, at least at first. With novice programmers, I can walk them through creating a driving robot in fifteen minutes.

If you haven't seen it, I recommend watching Brad Miller's videos. RobotBuilder is a wizard that puts together a command-based robot. Without RobotBuilder, you would need to understand the command-based software architecture first, and then do the low level coding of commands and subsystems later. By starting with RobotBuilder, would can construct the architecture in a visual manner, and then start your work on the low level components.

It does some of the code, but there will still be tons of work left to do. It will not make coding easy, but it will give you a solid foundation on which to work. Also, you will absolutely need to understand the resulting code; you will have serious problems if you don't eventually understand how the command pattern works.

There are lots of other pros and cons. On the plus side, it generates a wiring diagram that is terrific for communicating with the electrical team. On the minus side, it generates some ugly code that might not work exactly how some coders want. It sometimes forgets to import all necessary classes. Also, keeping the code and the robot file in sync can be problematic.

Joe Ross
14-12-2014, 18:56
I'm no team 2130 and we have a problems with robot builder. On one of our computers that is for programming robot builder wont even open or do anything. Our "Lead Programmer" says its a problem with java but we don't know. And I haven't been able to find anything on our problem. So if you have had the same please comment and maybe we can figure it out. thx

Try running it from the command line, java -jar <robotbuilder jar file>. See what it reports.

RugnarStormBorn
16-01-2016, 13:47
So...thread necromanceries here but when I try executing RobotBuilder from the command prompt we get "Error: Unable to access jarfile RobotBuilder.jar"

Joe Ross
16-01-2016, 13:52
So...thread necromanceries here but when I try executing RobotBuilder from the command prompt we get "Error: Unable to access jarfile RobotBuilder.jar"

Are you in the same directory as RobotBuilder.jar?

RugnarStormBorn
16-01-2016, 14:09
Are you in the same directory as RobotBuilder.jar?

Whelp, that would've undoubtedly helped...guess I shouldn't do this stuff when I'm half asleep. XD

But still...nothing opening, do you want me to post what the cmd prompt came up with?

Joe Ross
16-01-2016, 14:09
But still...nothing opening, do you want me to post what the cmd prompt came up with?

Yes

RugnarStormBorn
16-01-2016, 14:15
C:\Users\jones\wpilib\tools>java -jar RobotBuilder.jar
Extension components: []
Adding extensions for section: Hidden
Adding extensions for section: Subsystems
Adding extensions for section: Controllers
Adding extensions for section: Sensors
Adding extensions for section: Actuators
Adding extensions for section: Pneumatics
Adding extensions for section: OI
Adding extensions for section: Commands
Extension components: []
Extension components: []
Extension components: []
Exception in thread "AWT-EventQueue-0" while scanning for the next token
found character '\t' that cannot start any token
in "<reader>", line 3, column 1:
<static-widget class="edu.wpi.f ...
^

at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTo kens(ScannerImpl.ja
va:413)
at org.yaml.snakeyaml.scanner.ScannerImpl.peekToken(S cannerImpl.java:247
)
at org.yaml.snakeyaml.parser.ParserImpl$ParseDocument End.produce(ParserI
mpl.java:264)
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(Par serImpl.java:160)
at org.yaml.snakeyaml.parser.ParserImpl.getEvent(Pars erImpl.java:170)
at org.yaml.snakeyaml.composer.Composer.composeDocume nt(Composer.java:12
4)
at org.yaml.snakeyaml.composer.Composer.getNode(Compo ser.java:84)
at org.yaml.snakeyaml.constructor.BaseConstructor.get Data(BaseConstructo
r.java:104)
at org.yaml.snakeyaml.Yaml$1.next(Yaml.java:501)
at robotbuilder.robottree.RobotTree.load(RobotTree.ja va:387)
at robotbuilder.robottree.RobotTree.load(RobotTree.ja va:361)
at robotbuilder.MainFrame.openDefaultFile(MainFrame.j ava:141)
at robotbuilder.RobotBuilder.lambda$main$85(RobotBuil der.java:44)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessI mpl.doIntersectionP
rivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

krieck
17-01-2016, 16:32
I have a theory on what's going wrong for you. When RobotBuilder starts up, it tries to load the robot configuration file it was working on previously. The name of the file it was most recently working on is stashed using Java's Preferences utility. I think that on your system it is mixed up, and is reading a file that is isn't a valid RobotBuilder YAML file.

If we clean out RobotBuilder's preferences, then it should revert to opening up a blank robot configuration.

Unfortunately, I don't know that there is anything in the RobotBuilder code to self-correct on this subject. Java preferences are stored in different locations for each different operating system. Macs keep them in PLIST files in the user Library. I think Windows stashes them in the registry. Linux has its own set of files.

The simplest solution I can think of is to run a short Java program that cleans out the RobotBuilder preferences. Try compiling and executing the following. It won't do any harm to your system:


import java.util.prefs.Preferences;

public class PreferencesCleaner {

public static void main(String[] args) throws Exception {
Preferences prefs = Preferences.userRoot().node("robotbuilder.MainFrame");
prefs.clear();
}

}

BradAMiller
19-01-2016, 13:25
The old or corrupted preferences or previous save file seems like it might be your problem. Have you gotten past the issue you were having?

RugnarStormBorn
20-01-2016, 20:04
I have a theory on what's going wrong for you. When RobotBuilder starts up, it tries to load the robot configuration file it was working on previously. The name of the file it was most recently working on is stashed using Java's Preferences utility. I think that on your system it is mixed up, and is reading a file that is isn't a valid RobotBuilder YAML file.

If we clean out RobotBuilder's preferences, then it should revert to opening up a blank robot configuration.

Unfortunately, I don't know that there is anything in the RobotBuilder code to self-correct on this subject. Java preferences are stored in different locations for each different operating system. Macs keep them in PLIST files in the user Library. I think Windows stashes them in the registry. Linux has its own set of files.

The simplest solution I can think of is to run a short Java program that cleans out the RobotBuilder preferences. Try compiling and executing the following. It won't do any harm to your system:


import java.util.prefs.Preferences;

public class PreferencesCleaner {

public static void main(String[] args) throws Exception {
Preferences prefs = Preferences.userRoot().node("robotbuilder.MainFrame");
prefs.clear();
}

}


This fixed it! Thanks a million!

Coach Seb
02-05-2016, 09:10
Wow.... just watched the Robo Builder overview videos from Brad Miller and i am excited...

Can this be use for both FTC and FRC?

We are a rookie team, we depended on one programmer last season and he did good with labview with no experience, unfortunately he is leaving for college and we are starting our programming team from scratch.

Many teams recommended going to JAVA as it would be a much easier programming language to ;earn for beginners and there is tons of ways for the students to learn it... I am still not totally sold as Labview seem to have some great material online too...

And then i found this thread... I really like what i seen in the video... just trying to wrap my head around where to start and how much of a learning curve is it going to be...

Our programmers will most likely work on both the FTC and FRC robot next season and beyond !

Any input would be appreciated...