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
CSG startCube = new Cube(100).toCSG() | |
CSG cubeToFit = new Sphere(50/2).toCSG() | |
.movez(startCube.getMaxZ()) | |
.setColor(javafx.scene.paint.Color.RED) | |
// This performs an intersection of the 2 parts, then minkowski the intersection,then cut the reslult from the base shape | |
// Use this function to make cut outs that will be 3d printed | |
CSG clearenceFit = startCube | |
.minkowskiDifference( | |
cubeToFit,// the part we want to fit into a cutout |
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
//@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{ | |
ByteOrder be =ByteOrder.LITTLE_ENDIAN; | |
int packetSize = 64 |
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 |
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
class SampleMaker implements IParameterChanged{//collection of parts | |
ArrayList<CSG> parts = null; | |
boolean loading=false; | |
ArrayList<CSG> makeSamples(){ | |
if(parts !=null){ | |
return parts | |
} | |
loading=true; | |
double myStartSize = 40; |
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 java.util.ArrayList; | |
import com.neuronrobotics.sdk.addons.kinematics.DHChain; | |
import com.neuronrobotics.sdk.addons.kinematics.DHLink; | |
import com.neuronrobotics.sdk.addons.kinematics.DhInverseSolver; | |
import com.neuronrobotics.sdk.addons.kinematics.math.TransformNR; | |
import com.neuronrobotics.sdk.common.Log; | |
import Jama.Matrix; | |
return new DhInverseSolver() { |
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
//If your DyIO is using a lower voltage power source, you need to disable the brownout detect | |
def myDyIO =DeviceManager.getSpecificDevice( "dyio",{ | |
//If the device does not exist, prompt for the connection | |
SerialConnection s =new SerialConnection("/dev/ttyACM0"); | |
DyIO m = new DyIO(s) | |
return m | |
}) | |
myDyIO.setServoPowerSafeMode(false); |
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
int [] vals = dyio.getAllChannelValues(); | |
//Set up the array of channels | |
ArrayList<ServoChannel> chans = new ArrayList<ServoChannel>(); | |
Log.enableDebugPrint(); | |
float time = 5; | |
for(int i=0;i<12;i++){ | |
chans.add(new ServoChannel(dyio.getChannel(i))); | |
} | |
//Set the DyIO into cached mode | |
dyio.setCachedMode(true); |
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
package com.neuronrobotics.test.nrdk; | |
import com.neuronrobotics.sdk.genericdevice.GenericDevice; | |
import com.neuronrobotics.sdk.serial.SerialConnection; | |
public class SimpleConnection { | |
/** | |
* @param args | |
*/ |
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
@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 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
obstacle_range: 2.5 | |
raytrace_range: 3.5 | |
#footprint: [[-0.110, -0.090], [-0.110, 0.090], [0.041, 0.090], [0.041, -0.090]] | |
robot_radius: 0.105 | |
inflation_radius: 0.15 | |
cost_scaling_factor: 0.5 | |
map_type: costmap | |
transform_tolerance: 5 | |
observation_sources: scan | |
scan: {data_type: LaserScan, topic: scan, marking: true, clearing: true} |
OlderNewer