-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexampleWalking.groovy
More file actions
24 lines (21 loc) · 1.03 KB
/
exampleWalking.groovy
File metadata and controls
24 lines (21 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine
import com.neuronrobotics.sdk.addons.kinematics.IDriveEngine
import com.neuronrobotics.sdk.addons.kinematics.MobileBase
import com.neuronrobotics.sdk.addons.kinematics.math.TransformNR
return new com.neuronrobotics.sdk.addons.kinematics.IDriveEngine (){
IDriveEngine walking = ScriptingEngine.gitScriptRun("https://github.com/OperationSmallKat/Marcos.git", "MarcosWalk.groovy")
IDriveEngine driving = ScriptingEngine.gitScriptRun("https://github.com/NeuronRobotics/NASACurisoity.git", "DriveEngine.groovy")
IDriveEngine fixed = ScriptingEngine.gitScriptRun("https://github.com/madhephaestus/VexVitaminsRobot.git", "FixedDriveEngine.groovy")
@Override
public void DriveArc(MobileBase base, TransformNR newPose, double seconds) {
IDriveEngine engine=fixed;
if(base.getLegs().size()>0) {
engine=walking;
}else if(base.getDrivable().size()>0) {
engine=fixed;
}else if(base.getSteerable().size()>0) {
engine=driving;
}
engine.DriveArc( base, newPose, seconds);
}
}