CommonWealthRobotics / BowlerBuilder

A Full-Stack Robotics Development Environment.
http://commonwealthrobotics.com/
GNU Lesser General Public License v3.0
3 stars 2 forks source link

Walking mobile base from creature lab #30

Closed madhephaestus closed 5 years ago

madhephaestus commented 6 years ago

In you should be able to jog the mobile base in the same way as the limb. It can take drive commands through the walking engine.

See https://github.com/keionbis/SmallKat.git , launch.groovy for an example of a walking jog loop with a creature that should load in BowlerBuilder (that script runs in the pure kernel, no BowlerStudio).

Octogonapus commented 6 years ago

When trying to load that, I get an exception:

java.util.NoSuchElementException: hidfastnot found
    at com.neuronrobotics.sdk.addons.kinematics.LinkType.fromString(LinkType.java:114)
    at com.neuronrobotics.sdk.addons.kinematics.LinkConfiguration.<init>(LinkConfiguration.java:129)
    at com.neuronrobotics.sdk.addons.kinematics.AbstractKinematicsNR.loadConfig(AbstractKinematicsNR.java:264)
    at com.neuronrobotics.sdk.addons.kinematics.AbstractKinematicsNR.<init>(AbstractKinematicsNR.java:230)
    at com.neuronrobotics.sdk.addons.kinematics.DHParameterKinematics.<init>(DHParameterKinematics.java:71)
    at com.neuronrobotics.sdk.addons.kinematics.DHParameterKinematics.<init>(DHParameterKinematics.java:161)
    at com.neuronrobotics.sdk.addons.kinematics.MobileBase.loadLimb(MobileBase.java:316)
    at com.neuronrobotics.sdk.addons.kinematics.MobileBase.loadConfigs(MobileBase.java:185)
    at com.neuronrobotics.sdk.addons.kinematics.MobileBase.<init>(MobileBase.java:89)
    at com.neuronrobotics.bowlerbuilder.controller.MainWindowController.lambda$null$8(MainWindowController.java:397)
    at java.lang.Thread.run(Thread.java:748)

I load with final MobileBase mobileBase = new MobileBase(IOUtils.toInputStream(xmlContent, "UTF-8"));.

madhephaestus commented 6 years ago

Run the launch.groovy script, it in-line defines new link types that the XML uses.

Octogonapus commented 6 years ago

I'm having some sort of problem with the grapes:

java.lang.RuntimeException: Error grabbing Grapes -- [download failed: net.java.dev.jna#jna;4.2.2!jna.jar]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
    at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:71)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:81)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
    at groovy.grape.GrapeIvy.getDependencies(GrapeIvy.groovy:421)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
    at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:566)
    at groovy.grape.GrapeIvy$resolve$3.callCurrent(Unknown Source)
    at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:535)
    at groovy.grape.GrapeIvy$resolve$2.callCurrent(Unknown Source)
    at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:252)
    at groovy.grape.Grape.grab(Grape.java:163)
    at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:358)
    at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:319)
    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:923)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:585)
    at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:561)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:538)
    at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:286)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:259)
    at groovy.lang.GroovyShell.parseClass(GroovyShell.java:674)
    at groovy.lang.GroovyShell.parse(GroovyShell.java:686)
    at groovy.lang.GroovyShell.parse(GroovyShell.java:722)
    at groovy.lang.GroovyShell.parse(GroovyShell.java:713)
    at com.neuronrobotics.bowlerbuilder.controller.scripting.scriptrunner.bowlerscriptrunner.BowlerGroovy.inline(BowlerGroovy.kt:78)
    at com.neuronrobotics.bowlerbuilder.controller.scripting.scriptrunner.bowlerscriptrunner.BowlerGroovy.inlineScriptRun(BowlerGroovy.kt:39)
    at com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine.inlineScriptStringRun(ScriptingEngine.java:215)
    at com.neuronrobotics.bowlerbuilder.controller.scripting.scriptrunner.bowlerscriptrunner.BowlerScriptRunner.runScript(BowlerScriptRunner.kt:26)
    at com.neuronrobotics.bowlerbuilder.controller.AceScriptEditorController.runStringScript(AceScriptEditorController.java:393)
    at com.neuronrobotics.bowlerbuilder.controller.AceScriptEditorController.runEditorContent(AceScriptEditorController.java:335)
    at java.lang.Thread.run(Thread.java:748)
madhephaestus commented 6 years ago

i think i remember this one, try adding: compile group: 'org.apache.ivy', name:'ivy', version:'2.2.0' to your build.gradle

Octogonapus commented 6 years ago

Cool, that fixed the grapes problem. But now it looks like other files can't access the class you declare in the launch.groovy file:

SEVERE: Could not run CAD script.
java.lang.ClassNotFoundException: HIDSimpleComsDevice
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at com.neuronrobotics.bowlerbuilder.controller.scripting.scriptrunner.bowlerscriptrunner.BowlerGroovy.inline(BowlerGroovy.kt:55)
    at com.neuronrobotics.bowlerbuilder.controller.scripting.scriptrunner.bowlerscriptrunner.BowlerGroovy.inlineScriptRun(BowlerGroovy.kt:24)
    at com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine.inlineScriptRun(ScriptingEngine.java:199)
    at com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine.gitScriptRun(ScriptingEngine.java:777)
    at com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine$gitScriptRun.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
    at Script1.run(Script1.groovy:335)
    at com.neuronrobotics.bowlerbuilder.controller.scripting.scriptrunner.bowlerscriptrunner.BowlerGroovy.inline(BowlerGroovy.kt:74)
    at com.neuronrobotics.bowlerbuilder.controller.scripting.scriptrunner.bowlerscriptrunner.BowlerGroovy.inlineScriptRun(BowlerGroovy.kt:28)
    at com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine.inlineScriptStringRun(ScriptingEngine.java:215)
    at com.neuronrobotics.bowlerbuilder.controller.scripting.scriptrunner.bowlerscriptrunner.BowlerScriptRunner.runScript(BowlerScriptRunner.kt:35)
    at com.neuronrobotics.bowlerbuilder.controller.AceScriptEditorController.runStringScript(AceScriptEditorController.java:393)
    at com.neuronrobotics.bowlerbuilder.controller.AceScriptEditorController.runEditorContent(AceScriptEditorController.java:335)
    at java.lang.Thread.run(Thread.java:748)
madhephaestus commented 6 years ago

try pulling the script and running again?

Octogonapus commented 6 years ago

I am getting NullPointerExceptions and ConcurrentModificationExceptions

Octogonapus commented 6 years ago

And for some reason, your script freezes my UI (same thing in BowlerStudio).

Octogonapus commented 6 years ago

@madhephaestus I've been poking at the build script tonight so I decided to revisit this. I get this exception when I run launch.groovy:

SEVERE: Could not start building robot.
java.lang.RuntimeException: This object can not behave as a device
    at com.neuronrobotics.sdk.common.DeviceManager.addConnection(DeviceManager.java:49)
    at com.neuronrobotics.sdk.common.DeviceManager.getSpecificDevice(DeviceManager.java:263)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrap.invoke(StaticMetaMethodSite.java:130)
    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:88)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at LoadGameController.run(LoadGameController.groovy:102)
    at com.neuronrobotics.bowlerstudio.scripting.GroovyHelper.inline(GroovyHelper.java:61)
    at com.neuronrobotics.bowlerstudio.scripting.GroovyHelper.inlineScriptRun(GroovyHelper.java:74)
    at com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine.inlineScriptRun(ScriptingEngine.java:199)
    at com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine.gitScriptRun(ScriptingEngine.java:777)
    at com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine$gitScriptRun.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
    at launch.run(launch.groovy:11)
    at com.neuronrobotics.bowlerstudio.scripting.GroovyHelper.inline(GroovyHelper.java:61)
    at com.neuronrobotics.bowlerstudio.scripting.GroovyHelper.inlineScriptRun(GroovyHelper.java:74)
    at com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine.inlineScriptRun(ScriptingEngine.java:199)
    at com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine.gitScriptRun(ScriptingEngine.java:777)
    at com.neuronrobotics.bowlerbuilder.controller.MainWindowController.lambda$null$12(MainWindowController.java:473)
    at java.lang.Thread.run(Thread.java:748)
Octogonapus commented 5 years ago

Closing because this is related to JavaUI, which is being removed.