JAR Template Update Thread

Download

Intro

Documentation

What’s new in v1.1.2

  • Explanatory Video!
  • Docs website with function docs and tutorials!
  • Zero Tracker Odom!
  • Memory bug fix!
  • Usercontrol deadband!

If you’re not familiar with JAR Template, it’s a quick way to set up your drivetrain for autonomous. Just follow the instructions to input your drive constants and you can have PID drives, turns, swings, and odom ready to go in about 15 minutes. This thread will mostly contain updates to the documentation as I make new tutorial videos for different aspects of the template.

If you’re not convinced, it only takes 15 minutes to try it out and decide whether you like it. Just follow the installation instructions in the download link and see what happens.

Happy coding, and best of luck in Over Under!

Josh

24 Likes

This is crazy helpful especially to teams that are just starting out.

4 Likes

24 posts were split to a new topic: Code templates and Student-Centered Policy discussion

1 Like

I moved the discussion about code templates to a new topic.

12 Likes

This is the first JAR Template explanation, with the goal of helping teams learn how the template can be implemented and gain a better understanding of the code they’re using.

The next planned explanations will cover odom and drive functions.

18 Likes

Would there be any way to convert the code from this to normal vex code? My school only has Chromebooks and I tried to make odom code and I failed miserably.

Download the project and open it in VEXCode.

1 Like

Hi Josh— is it possible to program 6-motor drivetrain using the template out of the box?

1 Like

Every Time we do the Jar Template we get a memory error.


We are wondering if you could help us with our code.

Link to Code
Thanks so much in advance

@2775Josh, Hey I was hoping you could help me with a problem I am facing with the odom without the tracking wheels. the ODOM is getting no x and y values. I tried printing the values of the odom XY cordinates using vex::task, it was printing 0 the whole time.

I’ll look at your code if you’ll run odom_test first and see what that prints.

Hi, Josh, the middle school team that I coach is trying to use the JAR template and don’t understand how to use the odom_test outputs to help them with setup. I was searching the forum to help them and found your comment. Could you guide them on where to look for more detailed instructions?

The docs are the best I’ve got. Using the odom test is pretty simple: Just run your code, push the robot around, and see if the brain screen says you’re in the right place.

1 Like

We got it working on VSCode, just getting use to the differences from this and Python.

Reminding the kids that they have to touch multiple pages is really the hardest part, maybe having a flow chart would help? Just a suggestion

I like that idea; I can do that for sure.

3 Likes

I’m gonna make sure my kids give credit to you for using your template, do i just use team number 2775 or just mention we’re using the JAR template and explaing what JAR means?

2 Likes

Hi, Josh. I am the programmer of Brighton 28646B and we just imported the JAR-Template and I would like to know how to program autonomous. Is it in inches or is it coordinates. We have odometry and I know the JAR-Template is meant for teams whose robots don’t have odometry. I would love to get a reply as soon as I can before our next tournament. Thanks. @2775Josh @2775VSamuel

All coordinates in JAR Template are in inches. You might benefit from reading the docs.

6 Likes

Hi, Josh. I am just wondering,… how do I get the autonomous to stop when it is finished.

break;

does not work.

Neither does

chassis.drive_stop(hold);

How can I get the autonomous to stop during testing.

@2775Josh @2775VSamuel

I dont fully know why it would not stop(would need to see code to figure it out) but break; is an exit statement for switch cases, it essentially just tells the code “hey this case is done” and leaves all the cases and conditions(this also works with while loops and for loops)