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
from math import pi | |
def rect_interia(b,h): | |
return (1/12.0)*b*h**3 | |
def circ_interia(ro,ri): |
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
clear all | |
close all | |
clc | |
syms q1(t) q2(t) q3(t) q4(t) q5(t) q6(t) px py g | |
l = sym('l_%d', [1 7]); | |
m = sym('m_%d', [1 7]); | |
qd = sym('qd', [1 6]); | |
qdd = sym('qdd', [1 6]); | |
P = [px;py]; |
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
""" | |
This cacluclates the jacobian for the seires elastic arm. | |
The link parameters are taken from https://github.com/nag92/SeriesElasticActuator/blob/master/walkingSEA.xml | |
""" | |
import numpy as np | |
def get_jacobian_matricies(theta_1,theta_2,theta_3): | |
""" | |
:param robot: | |
:return: |
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
""" | |
This cacluclates the jacobian for the seires elastic arm. | |
The link parameters are taken from https://github.com/nag92/SeriesElasticActuator/blob/master/walkingSEA.xml | |
""" | |
import numpy as np | |
def get_jacobian_matricies(theta_1,theta_2,theta_3): | |
""" | |
:param robot: | |
:return: |
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
clear all | |
obj = udp('localhost',9876) ; | |
obj.ByteOrder = 'littleEndian'; | |
fopen(obj) | |
data = zeros(15,1,'single'); | |
time = 100; | |
for i = 1:2 |
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){ |