# RRPathVisualizer
RRPathVisualizer was written by David, Recharged Green 7236's lead programmer. It is a path "visualizer" in that you write your trajectories as you would for your bot and you stick them in a custom Kotlin project. If you run the program it will display a window and animate the bot along your specified trajectories. I personally prefer this workflow as you can simply copy-paste the trajectories you made in RRPathVisualizer into your own FTC project.
Keep in mind that RRPathVisualizer is written in Kotlin. It should be easy to understand Kotlin if you know Java.
# Installation
Install Intellij (opens new window)
- Although the community edition is free, you can get the ultimate edition for free if you sign up with a student account (opens new window)
Clone or download RRPathVisualizer (opens new window)
Open the project in Intellij
# Usage
- Open the project in Intellij
- Android Studio is very similar to Intellij so you should be familiar with the interface
- You should just be able to press the play button up top without any problems
- You may have to set the project SDK
- If so, go to the File > Project Structure
- Find the "Project SDK" setting. Select the latest JDK version installed. Intellij should come bundled with JDK 14
- To make your paths, open the
TrajectoryGen.kt
file - Ensure that the
driveConstraints
values matches theDriveConstraints
you have in your own Road Runner setup on your bot - Ensure that the
trackWidth
value matches theTRACK_WIDTH
value in yourDriveConstants.java
file. This ensures more accurate trajectory length estimates - Find
builder1
. Thebuilder1
object is the exampleTrajectoryBuilder
provided. You are free to add more builders for more trajectories - Just use the builder as you would normally create trajectories
- You can add more trajectories by calling
list.add(trajectory)
- NOTE: RRPathViz cannot simulate point turns.
# Note:
On your actual bot, each trajectory will have a 0.5s timeout after the bot is done following it. This is to allow for any correction with the translational and heading PID if your bot strays off the path. This timeout is cut short if your bot is able to reach the end of the trajectory without correction. Thus, each trajectory may have up to 0.5s added on to it. This extra time is not reflected in RRPathVisualizer's trajectory time estimate. Just be aware of this timeout when creating your trajectories. You are able to change the duration of this correction timeout in the quickstart. If you'd like to do so, change the last parameter, the one with the 0.5 value, where follower
is set to HolonomicPIDVAFollower
in SampleMecanumDrive.java
.
# Resources
Video from Bots in Black, team 16633, explaining installation, basic troubleshooting, and basic usage of RRPathVisualizer: