Skip to content

Commit de5e213

Browse files
authored
Added methods to path generator (#46)
* added methods to path generator * version
1 parent b340a9d commit de5e213

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dependencies {
3535
}
3636

3737
group = 'org.team5499'
38-
version = '2.7.5'
38+
version = '2.8.0'
3939

4040
task sourcesJar(type: Jar) {
4141
from sourceSets.main.allJava

src/main/kotlin/org/team5499/monkeyLib/path/PathGenerator.kt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ class PathGenerator {
9898
return Path(samples, velocities, reversed)
9999
}
100100

101+
public fun generatePath(reversed: Boolean, waypoints: Array<Pose2d>, maxVelo: Double, maxAccel: Double): Path {
102+
return generatePath(reversed, waypoints, maxVelo, maxAccel, mStartPathVelocity, mEndPathVelocity)
103+
}
104+
101105
public fun generatePath(reversed: Boolean, waypoints: Array<Pose2d>): Path {
102106
return generatePath(
103107
reversed, waypoints,
@@ -107,4 +111,50 @@ class PathGenerator {
107111
mEndPathVelocity
108112
)
109113
}
114+
115+
@Suppress("LongParameterList")
116+
public fun generateMirroredPath(
117+
reversed: Boolean,
118+
waypoints: Array<Pose2d>,
119+
maxVelo: Double,
120+
maxAccel: Double,
121+
startVelocity: Double,
122+
endVelocity: Double
123+
): MirroredPath {
124+
return MirroredPath(
125+
generatePath(
126+
reversed,
127+
waypoints,
128+
maxVelo,
129+
maxAccel,
130+
startVelocity,
131+
endVelocity
132+
)
133+
)
134+
}
135+
136+
public fun generateMirroredPath(
137+
reversed: Boolean,
138+
waypoints: Array<Pose2d>,
139+
maxVelo: Double,
140+
maxAccel: Double
141+
): MirroredPath {
142+
return MirroredPath(
143+
generatePath(
144+
reversed,
145+
waypoints,
146+
maxVelo,
147+
maxAccel
148+
)
149+
)
150+
}
151+
152+
public fun generateMirroredPath(reversed: Boolean, waypoints: Array<Pose2d>): MirroredPath {
153+
return MirroredPath(
154+
generatePath(
155+
reversed,
156+
waypoints
157+
)
158+
)
159+
}
110160
}

0 commit comments

Comments
 (0)