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
// Starting with the connected camera from BowlerStudio | |
println(cameraCHDK) | |
//Create the default detector using "haarcascade_frontalface_default.xml" | |
IObjectDetector detector = new HaarDetector("haarcascade_smile.xml") | |
// Create the input and display images. The display is where the detector writes its detections overlay on the input image | |
Mat inputImage = new Mat() | |
Mat displayImage = new Mat() | |
// Loop checking the camera for faces | |
while(true){ | |
cameraCHDK.getLatestImage(inputImage,displayImage); // capture image |
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
import com.neuronrobotics.sdk.addons.gamepad.IJInputEventListener; | |
import net.java.games.input.Component; | |
import net.java.games.input.Event; | |
ServoChannel srvfront = new ServoChannel (dyio.getChannel(0)); | |
ServoChannel srvdrive = new ServoChannel (dyio.getChannel(11)); | |
IJInputEventListener listener = new IJInputEventListener() { | |
@Override public void onEvent(Component comp, Event event1,float value, String eventString) { | |
int front,drive; |
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
import com.neuronrobotics.sdk.addons.gamepad.IJInputEventListener; | |
import com.neuronrobotics.sdk.addons.gamepad.BowlerJInputDevice; | |
import net.java.games.input.Component; | |
import net.java.games.input.Event; | |
import net.java.games.input.Controller; | |
import net.java.games.input.ControllerEnvironment; | |
BowlerJInputDevice g=null;// Create a variable to store the device | |
//Check if the device already exists in the device Manager | |
if(DeviceManager.getSpecificDevice(BowlerJInputDevice.class, "jogController")==null){ |
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
<root> | |
<mobilebase> | |
<driveType>walking</driveType> | |
<cadEngine> | |
<git>https://gist.github.com/bcb4760a449190206170.git</git> | |
<file>ThreeDPrintCad.groovy</file> | |
</cadEngine> | |
<driveEngine> | |
<git>https://gist.github.com/bcb4760a449190206170.git</git> |
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
import javafx.scene.text.Text; | |
// Create a tab | |
Tab myTab = new Tab(); | |
//set the title of the new tab | |
myTab.setText("Whoh a tab!"); | |
//add content to the tab | |
myTab.setContent(new Text(10, 50, "Oh my, how cool!")); | |
return myTab |
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
import com.neuronrobotics.bowlerstudio.creature.CreatureLab; | |
import org.apache.commons.io.IOUtils; | |
import com.neuronrobotics.bowlerstudio.physics.*; | |
import com.neuronrobotics.bowlerstudio.threed.*;import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.Set; | |
import javax.vecmath.Vector3f; | |
import com.bulletphysics.BulletGlobals; |
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
//you print messages to the text output | |
println "Hello World From BowlerStudio Terminal!" | |
// or have it speak messages | |
BowlerKernel.speak("My copy") |
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
import eu.mihosoft.vrl.v3d.STL; | |
import eu.mihosoft.vrl.v3d.RoundedCube; | |
import com.neuronrobotics.bowlerstudio.vitamins.*; | |
import eu.mihosoft.vrl.v3d.parametrics.*; | |
float len = 68; | |
float width = 70; | |
float height = 42; | |
float thickness = 6.35; | |
float dia = 15; |
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
import eu.mihosoft.vrl.v3d.parametrics.*; | |
CSG makeCube(){ | |
//Set up som parameters to use | |
LengthParameter xkey = new LengthParameter("X dimention",30,[120.0,1.0]) | |
LengthParameter ykey = new LengthParameter("Y dimention",30,[130.0,2.0]) | |
LengthParameter zkey = new LengthParameter("Z dimention",30,[140.0,3.0]) | |
LengthParameter sphereSize = new LengthParameter("Sphere Size",30,[150.0,4.0]) | |
//you can also create parametrics that are not used in creating primitives | |
LengthParameter offset = new LengthParameter("Sphere Offset Distance",15,[20,-5]) |
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
//Your code here | |
import eu.mihosoft.vrl.v3d.parametrics.*; | |
ArrayList<CSG> makeDividers(){ | |
LengthParameter thickness = new LengthParameter("Material Thickness",6.2,[10,1]) | |
LengthParameter foamThick = new LengthParameter("Foam Thickness",25,[40,1]) | |
LengthParameter height = new LengthParameter("Divider Height",60,[200,1]) | |
LengthParameter sheetX = new LengthParameter("sheetX",590,[914.4,1])// rows | |
LengthParameter sheetY = new LengthParameter("sheetY",590,[609.6,1])//columns | |
ArrayList<CSG> parts = new ArrayList<CSG>() |
OlderNewer