forked from acmerobotics/road-runner-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
117 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "FtcDashboard"] | ||
path = FtcDashboard | ||
url = https://github.com/acmerobotics/ftc-dashboard |
Submodule FtcDashboard
added at
e52004
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
repositories { | ||
jcenter() | ||
mavenLocal() | ||
} | ||
|
||
dependencies { | ||
compile project(':FtcRobotController') | ||
compile (name: 'RobotCore-release', ext: 'aar') | ||
compile (name: 'Hardware-release', ext: 'aar') | ||
compile (name: 'FtcCommon-release', ext: 'aar') | ||
compile (name:'Analytics-release', ext:'aar') | ||
compile (name:'WirelessP2p-release', ext:'aar') | ||
} | ||
|
||
compile 'com.acmerobotics.splinelib:core:0.1-SNAPSHOT' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
poses: | ||
- x: 0.0 | ||
y: 0.0 | ||
heading: 0.0 | ||
- x: 20.0 | ||
y: 40.0 | ||
heading: 0.0 | ||
constraints: | ||
maximumVelocity: 25.0 | ||
maximumAcceleration: 40.0 | ||
maximumAngularVelocity: 3.141592653589793 | ||
maximumAngularAcceleration: 6.283185307179586 |
29 changes: 29 additions & 0 deletions
29
TeamCode/src/main/java/com/acmerobotics/splinelib/AssetsTrajectoryLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.acmerobotics.splinelib; | ||
|
||
import com.acmerobotics.splinelib.trajectory.Trajectory; | ||
import com.acmerobotics.splinelib.trajectory.TrajectoryConfig; | ||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; | ||
import com.fasterxml.jackson.module.kotlin.KotlinModule; | ||
|
||
import org.firstinspires.ftc.robotcore.internal.system.AppUtil; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
public class AssetsTrajectoryLoader { | ||
private static final ObjectMapper MAPPER = new ObjectMapper(new YAMLFactory()); | ||
|
||
static { | ||
MAPPER.registerModule(new KotlinModule((512))); | ||
} | ||
|
||
public static TrajectoryConfig loadConfig(String name) throws IOException { | ||
InputStream inputStream = AppUtil.getDefContext().getAssets().open("trajectory/" + name + ".yaml"); | ||
return MAPPER.readValue(inputStream, TrajectoryConfig.class); | ||
} | ||
|
||
public static Trajectory load(String name) throws IOException { | ||
return loadConfig(name).toTrajectory(); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/TestOpMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.firstinspires.ftc.teamcode; | ||
|
||
import com.acmerobotics.splinelib.AssetsTrajectoryLoader; | ||
import com.acmerobotics.splinelib.trajectory.Trajectory; | ||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous; | ||
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; | ||
|
||
import java.io.IOException; | ||
|
||
@Autonomous | ||
public class TestOpMode extends LinearOpMode { | ||
|
||
@Override | ||
public void runOpMode() throws InterruptedException { | ||
try { | ||
Trajectory trajectory = AssetsTrajectoryLoader.load("test"); | ||
System.out.println(trajectory.duration()); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
121 changes: 0 additions & 121 deletions
121
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/readme.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.gradle.jvmargs=-Xmx2048m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#Thu Jun 01 08:33:11 PDT 2017 | ||
#Sun Jul 29 18:03:48 PDT 2018 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip | ||
|
||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
include ':FtcRobotController' | ||
include ':TeamCode' | ||
include ':FtcDashboard' |