This file contains hidden or 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
import com.neuronrobotics.bowlerstudio.vitamins.Vitamins; | |
// Set a specific repository for the vitamins | |
Vitamins.setGitRepoDatabase("https://github.com/madhephaestus/Hardware-Dimensions.git") | |
ArrayList<String> types = Vitamins.listVitaminTypes() | |
println "\n\nAll availible types: "+types | |
CSG vitaminFromScript = Vitamins.get("hobbyServo","Dynam"); | |
println "\n\nOptional servo sizes: "+Vitamins.listVitaminSizes("hobbyServo") |
This file contains hidden or 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
@Grab(group='org.hid4java', module='hid4java', version='0.5.0') | |
import org.hid4java.* | |
import org.hid4java.event.*; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
class PacketProcessor{ | |
HidDevice myHidDevice; | |
ByteOrder be =ByteOrder.LITTLE_ENDIAN; |
This file contains hidden or 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
@Grab(group='org.hid4java', module='hid4java', version='0.5.0') | |
import org.hid4java.* | |
import org.hid4java.event.*; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
class PacketProcessor{ | |
HidDevice myHidDevice; | |
ByteOrder be =ByteOrder.LITTLE_ENDIAN; |
This file contains hidden or 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
CSG simpleSyntax =new Cylinder(10,10,40,(int)30).toCSG() // a one line Cylinder | |
//create a Cylinder | |
height = 22.5 | |
CSG wheel_body = new Cylinder(33, // Radius at the bottom | |
33, // Radius at the top | |
17.6, // Height | |
(int)30 //resolution | |
).toCSG().movez(height/2 - 17.6/2) | |
CSG hub = new Cylinder(14.3, // Radius at the bottom |
This file contains hidden or 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
import com.neuronrobotics.bowlerstudio.creature.ICadGenerator; | |
import com.neuronrobotics.bowlerstudio.creature.CreatureLab; | |
import org.apache.commons.io.IOUtils; | |
//Create the kinematics model from the xml file describing the D-H compliant parameters. | |
def file=["https://github.com/madhephaestus/carl-the-hexapod.git","CarlTheRobot.xml"]as String[] | |
String xmlContent = ScriptingEngine.codeFromGit(file[0],file[1])[0] | |
println "Loading the robot" | |
MobileBase base=null; | |
if(DeviceManager.getSpecificDevice(MobileBase.class, "CarlTheWalkingRobot")==null){ |