I have had great success with the FTC Offline Blocks Editor, but now I need something very similar, except for OnBot.
Now I know Andriod Studio, and in fact have played with it a bit. But we are trying to get the Java code imported into Blocks for new programmers, and Onbot is the recommended way to do that. AS, if we were to use it, would either have to compile an .aar / .jar file specifically for our java code and not the entire app, or be purely used as a java editor.
Furthermore, AS does not catch all the errors that Onbot throws, because it is targeted for Android and not the specific SDK/API that FIRST provides.
Here is the meat of the problem: I need a Java editor that throws the exact same errors that Onbot tends to do. Like the exact same. If there was a way to get the Onbot compiler offline, I’m sure that would work great. I will try and look through the source code and see how the Onbot editor works.
I know that I’m asking a very difficult topic, but any help would be greatly appreciated!
I’m exactly sure what you mean by this.
You can export Blocks to Java, but you can not import Java to Blocks. Can you please clarify exactly what you are trying to achieve?
Yes, it is this functionality: Home · WestsideRobotics/FTCmyBlocks Wiki · GitHub
Basically we can add a tag before a class in Onbot, and that class will be “exported” to Blocks.
This is great for our case where we have new programmers wanting to use blocks, and experienced programmers wanting to use java.
Ok, got it. You want to use the feature that allows one to call Java from Blocks. I was confused because my mental model for how this works is Blocks to Java, not necessarily importing Java into Blocks. But I understand now.
Unfortunately, FIRST does not officially support an offline OnBotJava development model.
I know there may not be an official way to do that, but is there any way I could get something similar? Do you know anyone who developed Onbot, that maybe I could talk to?
I’m thinking that it is running the Java built into Android, but it’d be nice if I could confirm that. Then I could make my own editor based on that java version and java compiler. Most important to me if I build my own editor would be “What did they change? What errors did they experience when they created the program?”
It’s a complete development environment built into the SDK using a java compiler packaged with the javax tools.
If you really want to run down this path, you can spend some time with Extracted-RC in the OpenFTC repository here.
But there’s nothing out of the box, and I am unaware of anyone who has done what you are looking to do.
I think I found a temporary solution to my problem, installing the FTC app on an android phone I have at my house. That way I can run the exact same Onbot web server that the robot has, and at least produce similar if not exact same errors.
It’s weird that Onbot produces more errors than Android Studio, then sometimes it produces none and the robot crashes anyway. I would totally use AS as an “offline editor” if the same errors popped up with either AS, or Onbot.
I think this whole topic is something good for me to research in the off season, but thanks for your help anyway!