diff --git a/rocolib/builders/BrainsTwoWheelsBuilder.py b/rocolib/builders/BrainsTwoWheelsBuilder.py index a07de7324676eb2b65600fb27bca68995b16a77f..8b7ddc71add9cd423294b87fff0597919d586b8c 100644 --- a/rocolib/builders/BrainsTwoWheelsBuilder.py +++ b/rocolib/builders/BrainsTwoWheelsBuilder.py @@ -5,13 +5,14 @@ c = Component() #Parameters for the sheath that would cover the wheels and the ESP32 Stack #Parameters that will change the dimension of the car -c.addParameter("length", 60, paramType="length", minValue=60) #tested minValue -c.addParameter("height", 36, paramType="length", minValue=36) #tested minValue -c.addParameter("width", 72, paramType="length", minValue=72) #tested minValue +c.addParameter("length", 65, paramType="length", minValue=60) #tested minValue +c.addParameter("height", 48, paramType="length", minValue=36) #tested minValue +c.addParameter("width", 60, paramType="length", minValue=51) #tested minValue #Holder for the ESP32 FeatherBoard and its Featherwings #If you have another "brain" or microcontroller or board change it here and adjust the parameters above to fit that "brain" -c.addSubcomponent("holder", "ESP32Stack") +c.addSubcomponent("holder", "SubESP32Stack") +c.addConstraint(("holder", "length"), "width") #This car will use the customized ESP32 stack in dimensions.py and the FS90R servo #Change here if you have another board @@ -47,7 +48,6 @@ c.addConnection(("between0", "botedge1"), ("bleft", "botedge2"), angle=90, tabWi #The side of the holder will adjust when the width of the car gets bigger #so that the size of the holder for the ESP32 stack woul not change -c.addConstraint(("holder", "side"), "width", "(x-52)/2.") #Flipping he front right wheels to match the orientation of the #bottom left @@ -56,43 +56,45 @@ c.addConstConstraint(("fright", "flip"), True) #Connecting the wheels to attach to the "holder" of the ESP32 stack for i in range(2): c.addSubcomponent("split%d" %i, "SplitEdge") - c.addConstraint(("split%d" %i, "toplength"), "brains", '(getDim(x, "height") - 8,)') + c.addConstraint(("split%d" %i, "toplength"), "brains", '(getDim(x, "height"),)') c.addConstraint(("split0", "botlength"), ("brains", "driveservo"), - '(getDim(x[1], "motorwidth"), getDim(x[0], "height") - 8 - getDim(x[1], "motorwidth"))') + '(getDim(x[1], "motorwidth"), getDim(x[0], "height") - getDim(x[1], "motorwidth"))') c.addConstraint(("split1", "botlength"), ("brains", "driveservo"), - '(getDim(x[0], "height") - 8 - getDim(x[1], "motorwidth"), getDim(x[1], "motorwidth"))') + '(getDim(x[0], "height") - getDim(x[1], "motorwidth"), getDim(x[1], "motorwidth"))') -c.addConnection(("holder", "side0.topedge0"), ("split0", "topedge0")) +c.addConnection(("holder", "botedge1"), ("split0", "topedge0")) c.addConnection(("split0", "botedge0"), ("fright", "botedge0"), angle=-90) -c.addConnection(("holder", "side1.topedge2"), ("split1", "topedge0")) +c.addConnection(("holder", "topedge1"), ("split1", "topedge0")) c.addConnection(("split1", "botedge1"), ("bleft", "topedge0"), angle=-90) #Connecting the sheath to the ESP32 stack and wheels c.addSubcomponent("sheathsplit0", "SplitEdge") c.addConstraint(("sheathsplit0", "toplength"), "width", "(x,)") -c.addConstraint(("sheathsplit0", "botlength"), ("driveservo", "width"), "(getDim(x[0],'motorheight'), \ - x[1] - 2*getDim(x[0],'motorheight'), \ +c.addConstraint(("sheathsplit0", "botlength"), ("driveservo", "width"), "(x[1] - getDim(x[0],'motorheight'), \ getDim(x[0],'motorheight'))") -c.addConnection(("bleft", "botedge1"), ("sheathsplit0", "botedge2"),angle=180) +c.addConnection(("bleft", "botedge1"), ("sheathsplit0", "botedge1"),angle=180) c.addConnection(("sheathsplit0", "topedge0"), ("sheath0", "topedge2")) #Creating the holes for the servo for i in range(2): c.addSubcomponent("sidehole%d" %i, "Cutout") - c.addConstraint(("sidehole%d" %i, "dy"), "height", "18") c.addConstraint(("sidehole%d" %i, "dx"), "height", "14") +c.addConstraint(("sidehole0", "dy"), "height", "30") +c.addConstraint(("sidehole1", "dy"), "height", "23") + c.addConnection(("sheath0", "face1"), ("sidehole0", "decoration"), - mode="hole", rotate=True, offset=Function(params=("length"), fnstring="(4, 21)")) + mode="hole", rotate=True, offset=Function(params=("length"), fnstring="(7, 21)")) c.addConnection(("sheath0", "face3"), ("sidehole1", "decoration"), - mode="hole", rotate=True, offset=Function(params=("length"), fnstring="(-4, 21)")) + mode="hole", rotate=True, offset=Function(params=("length"), fnstring="(-10, 21)")) +c.inheritAllInterfaces("sheathsplit0") c.inheritAllInterfaces("sheath0") -c.toLibrary("BrainsTwoWheels") \ No newline at end of file +c.toLibrary("NewBrainsTwoWheels") \ No newline at end of file diff --git a/rocolib/builders/CarForSteeringBuilder.py b/rocolib/builders/CarForSteeringBuilder.py index 03fb517f8e080079e770aa78445abe8c249042d6..08260016fa574394200de74c727861d26413444b 100644 --- a/rocolib/builders/CarForSteeringBuilder.py +++ b/rocolib/builders/CarForSteeringBuilder.py @@ -2,16 +2,16 @@ from rocolib.api.components.Component import Component c = Component() -c.addSubcomponent("front", "BrainsTwoWheels") +c.addSubcomponent("front", "NewBrainsTwoWheels") c.addSubcomponent("back", "TwoWheels", inherit=True, prefix=None) #Main component of steering wheel car which makes them moveable: trapezoid that connects the two half of the car for i in range(4): c.addSubcomponent("midsupport%d" %i, "Trapezoid") - c.addConstraint(("midsupport%d" %i, "width"), "width", "x-40") - c.addConstraint(("midsupport%d" %i, "depth"), "width", "x-60") + c.addConstraint(("midsupport%d" %i, "width"), "width", "x-10") + c.addConstraint(("midsupport%d" %i, "depth"), "width", "x-37") c.addConstraint(("midsupport%d" %i, "bangle"), "width", - "float(np.atan((x-60)/20)* 180 * 0.318309)") + "float(np.atan((x-37)/5)* 180 * 0.318309)") c.addConnection(("back", "sheath1.botedge2"), ("midsupport1", "botedge")) c.addConnection(("front", "sheath0.botedge2"), ("midsupport0", "botedge")) diff --git a/rocolib/builders/CarHingeServoBuilder.py b/rocolib/builders/CarHingeServoBuilder.py new file mode 100644 index 0000000000000000000000000000000000000000..5a85e36b27d49638bb54f32a73ef27d400ac49a9 --- /dev/null +++ b/rocolib/builders/CarHingeServoBuilder.py @@ -0,0 +1,27 @@ +from rocolib.api.components.Component import Component + +c = Component() + +c.addSubcomponent("servo", "MountedServo") +#fs90r is the continous servo that we are using. Check dimensions.py in rocolib to check other servo motors +c.addParameter("driveservo", "fs90r", paramType="dimension") + +c.addConstraint(("servo", "servo"), "driveservo") + +#To make it longer adjust that "+4" +c.addConstraint(("servo", "length"), "driveservo", 'getDim(x, "motorlength") + 10') +c.addConstConstraint(("servo", "center"), False) + +c.addParameter("beltLength", 75, paramType="length") + +for i in range(4): + c.addSubcomponent("belt%d" %i, "Rectangle") + c.addConstraint(("belt%d"%i, "l"), "beltLength") + c.addConstraint(("belt%d"%i, "w"), "driveservo", 'getDim(x, "motorheight")') + +c.addConnection(("belt0", "l"), ("servo", "beam.botedge1"), angle=90) +c.addConnection(("belt1", "l"), ("servo", "beam.botedge3"), angle=90) +c.addConnection(("belt2", "l"), ("servo", "beam.topedge1"), angle=90) +c.addConnection(("belt3", "l"), ("servo", "beam.topedge3"), angle=90) + +c.toLibrary("CarHingeServo") \ No newline at end of file diff --git a/rocolib/builders/FourWheelCarBuilder.py b/rocolib/builders/FourWheelCarBuilder.py index cfc0e5c5c5d506e60aa623783f113493111b526b..3d00515b5f0605d42b335b4fefc65bf4e1198279 100644 --- a/rocolib/builders/FourWheelCarBuilder.py +++ b/rocolib/builders/FourWheelCarBuilder.py @@ -2,12 +2,26 @@ from rocolib.api.components.Component import Component c = Component() -c.addSubcomponent("front", "BrainsTwoWheels") +c.addSubcomponent("front", "NewBrainsTwoWheels") +c.addSubcomponent("middle", "TwoWheels") c.addSubcomponent("back", "TwoWheels", inherit=True, prefix=None) -c.addConnection(("front", "sheath0.botedge2"), ("back", "sheath1.botedge2")) -c.addConnection( ("front", "sheath0.botedge0"), ("back", "sheath1.botedge0"), tabWidth=10) +# c.addConnection(("front", "sheath0.botedge2"), ("back", "sheath1.botedge2")) +# c.addConnection(("front", "sheath0.botedge0"), ("back", "sheath1.botedge0"), tabWidth=10) -c.inheritAllInterfaces("back", prefix=None) +c.addConstraint(("back", "length"), "length", "x+15") + +#I'm trying to create a car with 6 wheels with the code below, but when I just use tabWidth. It wouldn't connect it in the 3D file +c.addConnection(("front", "sheath0.botedge2"), ("middle", "sheath1.botedge2")) +c.addConnection(("back", "sheath1.botedge2"), ("middle", "sheath1.topedge2"), tabWidth=20) +c.addConnection(("front", "sheath0.botedge0"), ("middle", "sheath1.botedge0"), tabWidth=20) +c.addConnection(("back", "sheath1.botedge0"), ("middle", "sheath1.topedge0"), tabWidth=20) + +c.addSubcomponent("shield", "Rectangle") +c.addConstraint(("shield", "l"), ("driveservo", "height"), "x[1] - getDim(x[0],'motorwidth')") +c.addConstraint(("shield", "w"), "width") + +c.addConnection(("shield", "b"), ("back", "splitedge0"), angle=90, tabWidth=10) +c.addConnection(("shield", "t"), ("back", "splitedge1"), angle=90) c.toLibrary("FourWheelCar") \ No newline at end of file diff --git a/rocolib/builders/ScooperBuilder.py b/rocolib/builders/ScooperBuilder.py new file mode 100644 index 0000000000000000000000000000000000000000..01d67d290de926d4de9e6fe43e944a10271d4801 --- /dev/null +++ b/rocolib/builders/ScooperBuilder.py @@ -0,0 +1,30 @@ +from rocolib.api.components import Component + +c = Component() + +#Body of sides +c.addSubcomponent("side0", "Trapezoid") +for i in range(3): + c.addSubcomponent("r%d" %i, "Rectangle") + +c.addParameter("width", 147, paramType="length") +c.addParameter("length", 73, paramType="length") + +c.addConstraint(("side0", "width"), "width") +c.addConstraint(("side0", "depth"), "width", "15") + +c.addConstraint(("r0", "w"), "length") +c.addConstraint(("r0", "l"), "width") + +for i in range(1,3): + c.addConstraint(("r%d" %i, "w"), "length") + c.addConstraint(("r%d" %i, "l"), "width", "float(15 * np.sqrt(2.))") + +c.addConnection(("r0", "b"), ("side0", "topedge"), angle=-90) +c.addConnection(("side0", "redge"), ("r1", "t"), angle=-90) +c.addConnection(("side0", "ledge"), ("r2", "t"), angle=-90) + +c.inheritInterface(("sideedge"), ("r0", "t")) +c.inheritInterface(("botedge"), ("side0", "botedge")) + +c.toLibrary("Scooper") \ No newline at end of file diff --git a/rocolib/builders/SubESP32StackBuilder.py b/rocolib/builders/SubESP32StackBuilder.py index ad23ad15607a864ed40843fb2993704f2bf854e6..52faeb78af1d1a5480a63b5c987bf4addbeb1ab2 100644 --- a/rocolib/builders/SubESP32StackBuilder.py +++ b/rocolib/builders/SubESP32StackBuilder.py @@ -7,7 +7,7 @@ c = Component() c.addSubcomponent("holder", "SimpleRectBeam") #Dimensions of the ESP32 Stack -c.addParameter("length", 51, paramType="length") +c.addParameter("length", 60, paramType="length") c.addParameter("brains", "esp32stack", paramType="dimension") c.addConstraint(("holder", "length"), "length") @@ -18,9 +18,6 @@ c.addConstraint(("holder", "width"), "brains", "getDim(x, 'width')") #so that it would not affect the ESP32 stack holder c.addSubcomponent("header", "Header") -def getBrainParameter(p): - return "brain", "getDim(x, '%s')" % p - #OLED at the top c.addConstraint(("header", "nrows"), "brains", "getDim(x, 'nrows')") c.addConstraint(("header", "ncols"), "brains", "getDim(x, 'ncols')") @@ -31,8 +28,8 @@ c.addConstraint(("header", "colsep"), "brains", "getDim(x, 'colsep')") c.addParameter("dy1", 18, parameterType="length") for i in range(2): c.addSubcomponent("servohole%d" %i, "Cutout") - c.addConstraint(("servohole%d" %i, "dy"), "dy1", "x+2") - c.addConstraint(("servohole%d" %i, "dx"), "dy1", "7") + c.addConstraint(("servohole%d" %i, "dy"), "dy1", "x+12") + c.addConstraint(("servohole%d" %i, "dx"), "dy1", "x-5") for i in range(4): c.addSubcomponent("pinhole%d" % i, "Cutout") @@ -48,32 +45,24 @@ c.addConstraint(("pinhole3", "dy"), "dy1", "30") c.addConstraint(("pinhole3", "dx"), "dy1", "1.2") c.addConnection(("holder", "face0"), - ("pinhole0", "decoration"), - mode="hole", offset=Function(params=("length"), fnstring="(-10, 0)")) - -c.addConnection(("holder", "face0"), - ("pinhole1", "decoration"), - mode="hole", offset=Function(params=("length"), fnstring="(10, -5)")) - -c.addConnection(("holder", "face2"), - ("pinhole2", "decoration"), - mode="hole", offset=Function(params=("length"), fnstring="(10, 0)")) + ("header", "decoration"), + mode="hole", offset=Function(params=("length", "brains"), fnstring="(0, 0)")) c.addConnection(("holder", "face2"), - ("pinhole3", "decoration"), - mode="hole", offset=Function(params=("length"), fnstring="(-10, -5)")) + ("header", "decoration"), + mode="hole", offset=Function(params=("length", "brains"), fnstring="(0, 0)")) c.addConnection(("holder", "face3"), ("servohole1", "decoration"), - mode="hole", rotate=True, offset=Function(params=("length"), fnstring="(-5, -20)")) + mode="hole", rotate=True, offset=Function(params=("length"), fnstring="(0, 14)")) c.addSubcomponent("powerhole", "Cutout") -c.addConstraint(("powerhole", "dy"), "dy1", "x+12") +c.addConstraint(("powerhole", "dy"), "dy1", "x+17") c.addConstraint(("powerhole", "dx"), "dy1", "x") c.addConnection(("holder", "face1"), ("powerhole", "decoration"), - mode="hole", rotate=True, offset=Function(params=("length"), fnstring="(-7, 12)")) + mode="hole", rotate=True, offset=Function(params=("length"), fnstring="(-5, 12)")) c.inheritAllInterfaces("holder", prefix=None) diff --git a/rocolib/builders/TwoWheelsBuilder.py b/rocolib/builders/TwoWheelsBuilder.py index 72989f9d8a1fd0129cd76b6d15bc9a66b08500f2..8ebc0bb43b8a0dd878ed22a69ad0b0528b699b4b 100644 --- a/rocolib/builders/TwoWheelsBuilder.py +++ b/rocolib/builders/TwoWheelsBuilder.py @@ -1,13 +1,12 @@ from rocolib.api.components.Component import Component -from rocolib.api.Function import Function c = Component() #Parameters for the sheath that would cover the wheels and the ESP32 Stack #Parameters that will change the dimension of the car -c.addParameter("length", 60, paramType="length", minValue=60) #tested minValue -c.addParameter("height", 36, paramType="length", minValue=36) #tested minValue -c.addParameter("width", 72, paramType="length", minValue=72) #tested minValue +c.addParameter("length", 65, paramType="length", minValue=60) #tested minValue +c.addParameter("height", 48, paramType="length", minValue=36) #tested minValue +c.addParameter("width", 60, paramType="length", minValue=51) #tested minValue #This car will use the customized ESP32 stack in dimensions.py and the FS90R servo #Change here if you have another board @@ -46,20 +45,25 @@ c.addConnection(("between2", "botedge1"), ("fleft", "botedge2"), angle=90, tabWi #Flipping he front left and right wheels to match the orientation of the #bottom left and right wheels -c.addConstConstraint(("fleft", "flip"), True) +c.addConstConstraint(("bright", "flip"), True) -#Connecting the sheath to the ESP32 stack and wheels -c.addSubcomponent("sheathsplit1", "SplitEdge") -c.addConstraint(("sheathsplit1", "toplength"), "width", "(x,)") -c.addConstraint(("sheathsplit1", "botlength"), ("driveservo", "width"), "(getDim(x[0],'motorheight'), \ - x[1] - 2*getDim(x[0],'motorheight'), \ - getDim(x[0],'motorheight'))") +# #Connecting the sheath to the ESP32 stack and wheels +for i in range(2): + c.addSubcomponent("sheathsplit%d" %i, "SplitEdge") + c.addConstraint(("sheathsplit%d" %i, "toplength"), "height", "(x,)") -c.addConnection(("fleft", "botedge1"), ("sheathsplit1", "botedge2"),angle=180) -c.addConnection(("sheathsplit1", "topedge0"), ("sheath1", "topedge2")) +c.addConstraint(("sheathsplit0", "botlength"), ("driveservo", "height"), + "(getDim(x[0],'motorwidth'), x[1] - getDim(x[0],'motorwidth'))") +c.addConstraint(("sheathsplit1", "botlength"), ("driveservo", "height"), + "(x[1] - getDim(x[0],'motorwidth'), getDim(x[0],'motorwidth'))") -c.inheritAllInterfaces("sheath1") +c.addConnection(("sheathsplit0", "topedge0"), ("sheath1", "topedge1")) +c.addConnection(("sheathsplit1", "topedge0"), ("sheath1", "topedge3")) +c.addConnection(("fleft", "botedge0"), ("sheathsplit0", "botedge0"), angle=180) +c.inheritAllInterfaces("sheath1") +c.inheritInterface("splitedge0", ("sheathsplit0", "botedge1")) +c.inheritInterface("splitedge1", ("sheathsplit1", "botedge0")) -c.toLibrary("TwoWheels") \ No newline at end of file +c.toLibrary("TwoWheels") diff --git a/rocolib/library/CarForSteering.yaml b/rocolib/library/CarForSteering.yaml index 22c10a31fbe764d6e7a1f2f47ed872baf648f988..23ee3c45078ae12baa585890e073c51b3e201671 100644 --- a/rocolib/library/CarForSteering.yaml +++ b/rocolib/library/CarForSteering.yaml @@ -54,21 +54,21 @@ parameters: units: degrees valueType: (float, int) height: - defaultValue: 36 + defaultValue: 48 spec: minValue: 36 units: mm valueType: (float, int) length: - defaultValue: 60 + defaultValue: 65 spec: minValue: 60 units: mm valueType: (float, int) width: - defaultValue: 72 + defaultValue: 60 spec: - minValue: 72 + minValue: 51 units: mm valueType: (float, int) source: ..\builders\CarForSteeringBuilder.py @@ -92,7 +92,7 @@ subcomponents: width: parameter: width front: - classname: BrainsTwoWheels + classname: NewBrainsTwoWheels kwargs: {} parameters: {} midsupport0: @@ -100,50 +100,50 @@ subcomponents: kwargs: {} parameters: bangle: - function: float(np.atan((x-60)/20)* 180 * 0.318309) + function: float(np.atan((x-37)/5)* 180 * 0.318309) parameter: width depth: - function: x-60 + function: x-37 parameter: width width: - function: x-40 + function: x-10 parameter: width midsupport1: classname: Trapezoid kwargs: {} parameters: bangle: - function: float(np.atan((x-60)/20)* 180 * 0.318309) + function: float(np.atan((x-37)/5)* 180 * 0.318309) parameter: width depth: - function: x-60 + function: x-37 parameter: width width: - function: x-40 + function: x-10 parameter: width midsupport2: classname: Trapezoid kwargs: {} parameters: bangle: - function: float(np.atan((x-60)/20)* 180 * 0.318309) + function: float(np.atan((x-37)/5)* 180 * 0.318309) parameter: width depth: - function: x-60 + function: x-37 parameter: width width: - function: x-40 + function: x-10 parameter: width midsupport3: classname: Trapezoid kwargs: {} parameters: bangle: - function: float(np.atan((x-60)/20)* 180 * 0.318309) + function: float(np.atan((x-37)/5)* 180 * 0.318309) parameter: width depth: - function: x-60 + function: x-37 parameter: width width: - function: x-40 + function: x-10 parameter: width diff --git a/rocolib/library/CarHingeServo.yaml b/rocolib/library/CarHingeServo.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f0668a73df90b3cbe56c99517a534aeac64c8a96 --- /dev/null +++ b/rocolib/library/CarHingeServo.yaml @@ -0,0 +1,85 @@ +connections: + connection0: + - - belt0 + - l + - - servo + - beam.botedge1 + - angle: 90 + connection1: + - - belt1 + - l + - - servo + - beam.botedge3 + - angle: 90 + connection2: + - - belt2 + - l + - - servo + - beam.topedge1 + - angle: 90 + connection3: + - - belt3 + - l + - - servo + - beam.topedge3 + - angle: 90 +interfaces: {} +parameters: + beltLength: + defaultValue: 75 + spec: + minValue: 0 + units: mm + valueType: (float, int) + driveservo: + defaultValue: fs90r + spec: + valueType: str +source: ..\builders\CarHingeServoBuilder.py +subcomponents: + belt0: + classname: Rectangle + kwargs: {} + parameters: + l: + parameter: beltLength + w: + function: getDim(x, "motorheight") + parameter: driveservo + belt1: + classname: Rectangle + kwargs: {} + parameters: + l: + parameter: beltLength + w: + function: getDim(x, "motorheight") + parameter: driveservo + belt2: + classname: Rectangle + kwargs: {} + parameters: + l: + parameter: beltLength + w: + function: getDim(x, "motorheight") + parameter: driveservo + belt3: + classname: Rectangle + kwargs: {} + parameters: + l: + parameter: beltLength + w: + function: getDim(x, "motorheight") + parameter: driveservo + servo: + classname: MountedServo + kwargs: {} + parameters: + center: false + length: + function: getDim(x, "motorlength") + 10 + parameter: driveservo + servo: + parameter: driveservo diff --git a/rocolib/library/FourWheelCar.yaml b/rocolib/library/FourWheelCar.yaml index 73439a204d9ea35b24a7b80346103a79a7d800f0..a05f295ff023bec0b17bb0a1ea5d4a7707dfe77c 100644 --- a/rocolib/library/FourWheelCar.yaml +++ b/rocolib/library/FourWheelCar.yaml @@ -2,58 +2,41 @@ connections: connection0: - - front - sheath0.botedge2 - - - back + - - middle - sheath1.botedge2 - {} connection1: + - - back + - sheath1.botedge2 + - - middle + - sheath1.topedge2 + - tabWidth: 20 + connection2: - - front - sheath0.botedge0 + - - middle + - sheath1.botedge0 + - tabWidth: 20 + connection3: - - back - sheath1.botedge0 - - tabWidth: 10 -interfaces: - sheath1.botedge0: - interface: sheath1.botedge0 - subcomponent: back - sheath1.botedge1: - interface: sheath1.botedge1 - subcomponent: back - sheath1.botedge2: - interface: sheath1.botedge2 - subcomponent: back - sheath1.botedge3: - interface: sheath1.botedge3 - subcomponent: back - sheath1.face0: - interface: sheath1.face0 - subcomponent: back - sheath1.face1: - interface: sheath1.face1 - subcomponent: back - sheath1.face2: - interface: sheath1.face2 - subcomponent: back - sheath1.face3: - interface: sheath1.face3 - subcomponent: back - sheath1.slotedge: - interface: sheath1.slotedge - subcomponent: back - sheath1.tabedge: - interface: sheath1.tabedge - subcomponent: back - sheath1.topedge0: - interface: sheath1.topedge0 - subcomponent: back - sheath1.topedge1: - interface: sheath1.topedge1 - subcomponent: back - sheath1.topedge2: - interface: sheath1.topedge2 - subcomponent: back - sheath1.topedge3: - interface: sheath1.topedge3 - subcomponent: back + - - middle + - sheath1.topedge0 + - tabWidth: 20 + connection4: + - - shield + - b + - - back + - splitedge0 + - angle: 90 + tabWidth: 10 + connection5: + - - shield + - t + - - back + - splitedge1 + - angle: 90 +interfaces: {} parameters: brains: defaultValue: esp32stack @@ -78,21 +61,21 @@ parameters: units: degrees valueType: (float, int) height: - defaultValue: 36 + defaultValue: 48 spec: minValue: 36 units: mm valueType: (float, int) length: - defaultValue: 60 + defaultValue: 65 spec: minValue: 60 units: mm valueType: (float, int) width: - defaultValue: 72 + defaultValue: 60 spec: - minValue: 72 + minValue: 51 units: mm valueType: (float, int) source: ..\builders\FourWheelCarBuilder.py @@ -112,10 +95,26 @@ subcomponents: height: parameter: height length: + function: x+15 parameter: length width: parameter: width front: - classname: BrainsTwoWheels + classname: NewBrainsTwoWheels + kwargs: {} + parameters: {} + middle: + classname: TwoWheels kwargs: {} parameters: {} + shield: + classname: Rectangle + kwargs: {} + parameters: + l: + function: x[1] - getDim(x[0],'motorwidth') + parameter: + - driveservo + - height + w: + parameter: width diff --git a/rocolib/library/NewBrainsTwoWheels.yaml b/rocolib/library/NewBrainsTwoWheels.yaml new file mode 100644 index 0000000000000000000000000000000000000000..97046cf6fdf2287008c792a57bae92385cb376a8 --- /dev/null +++ b/rocolib/library/NewBrainsTwoWheels.yaml @@ -0,0 +1,878 @@ +connections: + connection0: + - - fright + - topedge2 + - - between0 + - topedge1 + - angle: 90 + connection1: + - - between0 + - botedge1 + - - bleft + - botedge2 + - angle: 90 + tabWidth: 10 + connection2: + - - holder + - botedge1 + - - split0 + - topedge0 + - {} + connection3: + - - split0 + - botedge0 + - - fright + - botedge0 + - angle: -90 + connection4: + - - holder + - topedge1 + - - split1 + - topedge0 + - {} + connection5: + - - split1 + - botedge1 + - - bleft + - topedge0 + - angle: -90 + connection6: + - - bleft + - botedge1 + - - sheathsplit0 + - botedge1 + - angle: 180 + connection7: + - - sheathsplit0 + - topedge0 + - - sheath0 + - topedge2 + - {} + connection8: + - - sheath0 + - face1 + - - sidehole0 + - decoration + - mode: hole + offset: + function: (7, 21) + parameter: length + rotate: true + connection9: + - - sheath0 + - face3 + - - sidehole1 + - decoration + - mode: hole + offset: + function: (-10, 21) + parameter: length + rotate: true +interfaces: + sheath0.botedge0: + interface: botedge0 + subcomponent: sheath0 + sheath0.botedge1: + interface: botedge1 + subcomponent: sheath0 + sheath0.botedge2: + interface: botedge2 + subcomponent: sheath0 + sheath0.botedge3: + interface: botedge3 + subcomponent: sheath0 + sheath0.face0: + interface: face0 + subcomponent: sheath0 + sheath0.face1: + interface: face1 + subcomponent: sheath0 + sheath0.face2: + interface: face2 + subcomponent: sheath0 + sheath0.face3: + interface: face3 + subcomponent: sheath0 + sheath0.slotedge: + interface: slotedge + subcomponent: sheath0 + sheath0.tabedge: + interface: tabedge + subcomponent: sheath0 + sheath0.topedge0: + interface: topedge0 + subcomponent: sheath0 + sheath0.topedge1: + interface: topedge1 + subcomponent: sheath0 + sheath0.topedge2: + interface: topedge2 + subcomponent: sheath0 + sheath0.topedge3: + interface: topedge3 + subcomponent: sheath0 + sheathsplit0.botedge0: + interface: botedge0 + subcomponent: sheathsplit0 + sheathsplit0.botedge1: + interface: botedge1 + subcomponent: sheathsplit0 + sheathsplit0.botedge10: + interface: botedge10 + subcomponent: sheathsplit0 + sheathsplit0.botedge11: + interface: botedge11 + subcomponent: sheathsplit0 + sheathsplit0.botedge12: + interface: botedge12 + subcomponent: sheathsplit0 + sheathsplit0.botedge13: + interface: botedge13 + subcomponent: sheathsplit0 + sheathsplit0.botedge14: + interface: botedge14 + subcomponent: sheathsplit0 + sheathsplit0.botedge15: + interface: botedge15 + subcomponent: sheathsplit0 + sheathsplit0.botedge16: + interface: botedge16 + subcomponent: sheathsplit0 + sheathsplit0.botedge17: + interface: botedge17 + subcomponent: sheathsplit0 + sheathsplit0.botedge18: + interface: botedge18 + subcomponent: sheathsplit0 + sheathsplit0.botedge19: + interface: botedge19 + subcomponent: sheathsplit0 + sheathsplit0.botedge2: + interface: botedge2 + subcomponent: sheathsplit0 + sheathsplit0.botedge20: + interface: botedge20 + subcomponent: sheathsplit0 + sheathsplit0.botedge21: + interface: botedge21 + subcomponent: sheathsplit0 + sheathsplit0.botedge22: + interface: botedge22 + subcomponent: sheathsplit0 + sheathsplit0.botedge23: + interface: botedge23 + subcomponent: sheathsplit0 + sheathsplit0.botedge24: + interface: botedge24 + subcomponent: sheathsplit0 + sheathsplit0.botedge25: + interface: botedge25 + subcomponent: sheathsplit0 + sheathsplit0.botedge26: + interface: botedge26 + subcomponent: sheathsplit0 + sheathsplit0.botedge27: + interface: botedge27 + subcomponent: sheathsplit0 + sheathsplit0.botedge28: + interface: botedge28 + subcomponent: sheathsplit0 + sheathsplit0.botedge29: + interface: botedge29 + subcomponent: sheathsplit0 + sheathsplit0.botedge3: + interface: botedge3 + subcomponent: sheathsplit0 + sheathsplit0.botedge30: + interface: botedge30 + subcomponent: sheathsplit0 + sheathsplit0.botedge31: + interface: botedge31 + subcomponent: sheathsplit0 + sheathsplit0.botedge32: + interface: botedge32 + subcomponent: sheathsplit0 + sheathsplit0.botedge33: + interface: botedge33 + subcomponent: sheathsplit0 + sheathsplit0.botedge34: + interface: botedge34 + subcomponent: sheathsplit0 + sheathsplit0.botedge35: + interface: botedge35 + subcomponent: sheathsplit0 + sheathsplit0.botedge36: + interface: botedge36 + subcomponent: sheathsplit0 + sheathsplit0.botedge37: + interface: botedge37 + subcomponent: sheathsplit0 + sheathsplit0.botedge38: + interface: botedge38 + subcomponent: sheathsplit0 + sheathsplit0.botedge39: + interface: botedge39 + subcomponent: sheathsplit0 + sheathsplit0.botedge4: + interface: botedge4 + subcomponent: sheathsplit0 + sheathsplit0.botedge40: + interface: botedge40 + subcomponent: sheathsplit0 + sheathsplit0.botedge41: + interface: botedge41 + subcomponent: sheathsplit0 + sheathsplit0.botedge42: + interface: botedge42 + subcomponent: sheathsplit0 + sheathsplit0.botedge43: + interface: botedge43 + subcomponent: sheathsplit0 + sheathsplit0.botedge44: + interface: botedge44 + subcomponent: sheathsplit0 + sheathsplit0.botedge45: + interface: botedge45 + subcomponent: sheathsplit0 + sheathsplit0.botedge46: + interface: botedge46 + subcomponent: sheathsplit0 + sheathsplit0.botedge47: + interface: botedge47 + subcomponent: sheathsplit0 + sheathsplit0.botedge48: + interface: botedge48 + subcomponent: sheathsplit0 + sheathsplit0.botedge49: + interface: botedge49 + subcomponent: sheathsplit0 + sheathsplit0.botedge5: + interface: botedge5 + subcomponent: sheathsplit0 + sheathsplit0.botedge50: + interface: botedge50 + subcomponent: sheathsplit0 + sheathsplit0.botedge51: + interface: botedge51 + subcomponent: sheathsplit0 + sheathsplit0.botedge52: + interface: botedge52 + subcomponent: sheathsplit0 + sheathsplit0.botedge53: + interface: botedge53 + subcomponent: sheathsplit0 + sheathsplit0.botedge54: + interface: botedge54 + subcomponent: sheathsplit0 + sheathsplit0.botedge55: + interface: botedge55 + subcomponent: sheathsplit0 + sheathsplit0.botedge56: + interface: botedge56 + subcomponent: sheathsplit0 + sheathsplit0.botedge57: + interface: botedge57 + subcomponent: sheathsplit0 + sheathsplit0.botedge58: + interface: botedge58 + subcomponent: sheathsplit0 + sheathsplit0.botedge59: + interface: botedge59 + subcomponent: sheathsplit0 + sheathsplit0.botedge6: + interface: botedge6 + subcomponent: sheathsplit0 + sheathsplit0.botedge60: + interface: botedge60 + subcomponent: sheathsplit0 + sheathsplit0.botedge61: + interface: botedge61 + subcomponent: sheathsplit0 + sheathsplit0.botedge62: + interface: botedge62 + subcomponent: sheathsplit0 + sheathsplit0.botedge63: + interface: botedge63 + subcomponent: sheathsplit0 + sheathsplit0.botedge64: + interface: botedge64 + subcomponent: sheathsplit0 + sheathsplit0.botedge65: + interface: botedge65 + subcomponent: sheathsplit0 + sheathsplit0.botedge66: + interface: botedge66 + subcomponent: sheathsplit0 + sheathsplit0.botedge67: + interface: botedge67 + subcomponent: sheathsplit0 + sheathsplit0.botedge68: + interface: botedge68 + subcomponent: sheathsplit0 + sheathsplit0.botedge69: + interface: botedge69 + subcomponent: sheathsplit0 + sheathsplit0.botedge7: + interface: botedge7 + subcomponent: sheathsplit0 + sheathsplit0.botedge70: + interface: botedge70 + subcomponent: sheathsplit0 + sheathsplit0.botedge71: + interface: botedge71 + subcomponent: sheathsplit0 + sheathsplit0.botedge72: + interface: botedge72 + subcomponent: sheathsplit0 + sheathsplit0.botedge73: + interface: botedge73 + subcomponent: sheathsplit0 + sheathsplit0.botedge74: + interface: botedge74 + subcomponent: sheathsplit0 + sheathsplit0.botedge75: + interface: botedge75 + subcomponent: sheathsplit0 + sheathsplit0.botedge76: + interface: botedge76 + subcomponent: sheathsplit0 + sheathsplit0.botedge77: + interface: botedge77 + subcomponent: sheathsplit0 + sheathsplit0.botedge78: + interface: botedge78 + subcomponent: sheathsplit0 + sheathsplit0.botedge79: + interface: botedge79 + subcomponent: sheathsplit0 + sheathsplit0.botedge8: + interface: botedge8 + subcomponent: sheathsplit0 + sheathsplit0.botedge80: + interface: botedge80 + subcomponent: sheathsplit0 + sheathsplit0.botedge81: + interface: botedge81 + subcomponent: sheathsplit0 + sheathsplit0.botedge82: + interface: botedge82 + subcomponent: sheathsplit0 + sheathsplit0.botedge83: + interface: botedge83 + subcomponent: sheathsplit0 + sheathsplit0.botedge84: + interface: botedge84 + subcomponent: sheathsplit0 + sheathsplit0.botedge85: + interface: botedge85 + subcomponent: sheathsplit0 + sheathsplit0.botedge86: + interface: botedge86 + subcomponent: sheathsplit0 + sheathsplit0.botedge87: + interface: botedge87 + subcomponent: sheathsplit0 + sheathsplit0.botedge88: + interface: botedge88 + subcomponent: sheathsplit0 + sheathsplit0.botedge89: + interface: botedge89 + subcomponent: sheathsplit0 + sheathsplit0.botedge9: + interface: botedge9 + subcomponent: sheathsplit0 + sheathsplit0.botedge90: + interface: botedge90 + subcomponent: sheathsplit0 + sheathsplit0.botedge91: + interface: botedge91 + subcomponent: sheathsplit0 + sheathsplit0.botedge92: + interface: botedge92 + subcomponent: sheathsplit0 + sheathsplit0.botedge93: + interface: botedge93 + subcomponent: sheathsplit0 + sheathsplit0.botedge94: + interface: botedge94 + subcomponent: sheathsplit0 + sheathsplit0.botedge95: + interface: botedge95 + subcomponent: sheathsplit0 + sheathsplit0.botedge96: + interface: botedge96 + subcomponent: sheathsplit0 + sheathsplit0.botedge97: + interface: botedge97 + subcomponent: sheathsplit0 + sheathsplit0.botedge98: + interface: botedge98 + subcomponent: sheathsplit0 + sheathsplit0.botedge99: + interface: botedge99 + subcomponent: sheathsplit0 + sheathsplit0.topedge0: + interface: topedge0 + subcomponent: sheathsplit0 + sheathsplit0.topedge1: + interface: topedge1 + subcomponent: sheathsplit0 + sheathsplit0.topedge10: + interface: topedge10 + subcomponent: sheathsplit0 + sheathsplit0.topedge11: + interface: topedge11 + subcomponent: sheathsplit0 + sheathsplit0.topedge12: + interface: topedge12 + subcomponent: sheathsplit0 + sheathsplit0.topedge13: + interface: topedge13 + subcomponent: sheathsplit0 + sheathsplit0.topedge14: + interface: topedge14 + subcomponent: sheathsplit0 + sheathsplit0.topedge15: + interface: topedge15 + subcomponent: sheathsplit0 + sheathsplit0.topedge16: + interface: topedge16 + subcomponent: sheathsplit0 + sheathsplit0.topedge17: + interface: topedge17 + subcomponent: sheathsplit0 + sheathsplit0.topedge18: + interface: topedge18 + subcomponent: sheathsplit0 + sheathsplit0.topedge19: + interface: topedge19 + subcomponent: sheathsplit0 + sheathsplit0.topedge2: + interface: topedge2 + subcomponent: sheathsplit0 + sheathsplit0.topedge20: + interface: topedge20 + subcomponent: sheathsplit0 + sheathsplit0.topedge21: + interface: topedge21 + subcomponent: sheathsplit0 + sheathsplit0.topedge22: + interface: topedge22 + subcomponent: sheathsplit0 + sheathsplit0.topedge23: + interface: topedge23 + subcomponent: sheathsplit0 + sheathsplit0.topedge24: + interface: topedge24 + subcomponent: sheathsplit0 + sheathsplit0.topedge25: + interface: topedge25 + subcomponent: sheathsplit0 + sheathsplit0.topedge26: + interface: topedge26 + subcomponent: sheathsplit0 + sheathsplit0.topedge27: + interface: topedge27 + subcomponent: sheathsplit0 + sheathsplit0.topedge28: + interface: topedge28 + subcomponent: sheathsplit0 + sheathsplit0.topedge29: + interface: topedge29 + subcomponent: sheathsplit0 + sheathsplit0.topedge3: + interface: topedge3 + subcomponent: sheathsplit0 + sheathsplit0.topedge30: + interface: topedge30 + subcomponent: sheathsplit0 + sheathsplit0.topedge31: + interface: topedge31 + subcomponent: sheathsplit0 + sheathsplit0.topedge32: + interface: topedge32 + subcomponent: sheathsplit0 + sheathsplit0.topedge33: + interface: topedge33 + subcomponent: sheathsplit0 + sheathsplit0.topedge34: + interface: topedge34 + subcomponent: sheathsplit0 + sheathsplit0.topedge35: + interface: topedge35 + subcomponent: sheathsplit0 + sheathsplit0.topedge36: + interface: topedge36 + subcomponent: sheathsplit0 + sheathsplit0.topedge37: + interface: topedge37 + subcomponent: sheathsplit0 + sheathsplit0.topedge38: + interface: topedge38 + subcomponent: sheathsplit0 + sheathsplit0.topedge39: + interface: topedge39 + subcomponent: sheathsplit0 + sheathsplit0.topedge4: + interface: topedge4 + subcomponent: sheathsplit0 + sheathsplit0.topedge40: + interface: topedge40 + subcomponent: sheathsplit0 + sheathsplit0.topedge41: + interface: topedge41 + subcomponent: sheathsplit0 + sheathsplit0.topedge42: + interface: topedge42 + subcomponent: sheathsplit0 + sheathsplit0.topedge43: + interface: topedge43 + subcomponent: sheathsplit0 + sheathsplit0.topedge44: + interface: topedge44 + subcomponent: sheathsplit0 + sheathsplit0.topedge45: + interface: topedge45 + subcomponent: sheathsplit0 + sheathsplit0.topedge46: + interface: topedge46 + subcomponent: sheathsplit0 + sheathsplit0.topedge47: + interface: topedge47 + subcomponent: sheathsplit0 + sheathsplit0.topedge48: + interface: topedge48 + subcomponent: sheathsplit0 + sheathsplit0.topedge49: + interface: topedge49 + subcomponent: sheathsplit0 + sheathsplit0.topedge5: + interface: topedge5 + subcomponent: sheathsplit0 + sheathsplit0.topedge50: + interface: topedge50 + subcomponent: sheathsplit0 + sheathsplit0.topedge51: + interface: topedge51 + subcomponent: sheathsplit0 + sheathsplit0.topedge52: + interface: topedge52 + subcomponent: sheathsplit0 + sheathsplit0.topedge53: + interface: topedge53 + subcomponent: sheathsplit0 + sheathsplit0.topedge54: + interface: topedge54 + subcomponent: sheathsplit0 + sheathsplit0.topedge55: + interface: topedge55 + subcomponent: sheathsplit0 + sheathsplit0.topedge56: + interface: topedge56 + subcomponent: sheathsplit0 + sheathsplit0.topedge57: + interface: topedge57 + subcomponent: sheathsplit0 + sheathsplit0.topedge58: + interface: topedge58 + subcomponent: sheathsplit0 + sheathsplit0.topedge59: + interface: topedge59 + subcomponent: sheathsplit0 + sheathsplit0.topedge6: + interface: topedge6 + subcomponent: sheathsplit0 + sheathsplit0.topedge60: + interface: topedge60 + subcomponent: sheathsplit0 + sheathsplit0.topedge61: + interface: topedge61 + subcomponent: sheathsplit0 + sheathsplit0.topedge62: + interface: topedge62 + subcomponent: sheathsplit0 + sheathsplit0.topedge63: + interface: topedge63 + subcomponent: sheathsplit0 + sheathsplit0.topedge64: + interface: topedge64 + subcomponent: sheathsplit0 + sheathsplit0.topedge65: + interface: topedge65 + subcomponent: sheathsplit0 + sheathsplit0.topedge66: + interface: topedge66 + subcomponent: sheathsplit0 + sheathsplit0.topedge67: + interface: topedge67 + subcomponent: sheathsplit0 + sheathsplit0.topedge68: + interface: topedge68 + subcomponent: sheathsplit0 + sheathsplit0.topedge69: + interface: topedge69 + subcomponent: sheathsplit0 + sheathsplit0.topedge7: + interface: topedge7 + subcomponent: sheathsplit0 + sheathsplit0.topedge70: + interface: topedge70 + subcomponent: sheathsplit0 + sheathsplit0.topedge71: + interface: topedge71 + subcomponent: sheathsplit0 + sheathsplit0.topedge72: + interface: topedge72 + subcomponent: sheathsplit0 + sheathsplit0.topedge73: + interface: topedge73 + subcomponent: sheathsplit0 + sheathsplit0.topedge74: + interface: topedge74 + subcomponent: sheathsplit0 + sheathsplit0.topedge75: + interface: topedge75 + subcomponent: sheathsplit0 + sheathsplit0.topedge76: + interface: topedge76 + subcomponent: sheathsplit0 + sheathsplit0.topedge77: + interface: topedge77 + subcomponent: sheathsplit0 + sheathsplit0.topedge78: + interface: topedge78 + subcomponent: sheathsplit0 + sheathsplit0.topedge79: + interface: topedge79 + subcomponent: sheathsplit0 + sheathsplit0.topedge8: + interface: topedge8 + subcomponent: sheathsplit0 + sheathsplit0.topedge80: + interface: topedge80 + subcomponent: sheathsplit0 + sheathsplit0.topedge81: + interface: topedge81 + subcomponent: sheathsplit0 + sheathsplit0.topedge82: + interface: topedge82 + subcomponent: sheathsplit0 + sheathsplit0.topedge83: + interface: topedge83 + subcomponent: sheathsplit0 + sheathsplit0.topedge84: + interface: topedge84 + subcomponent: sheathsplit0 + sheathsplit0.topedge85: + interface: topedge85 + subcomponent: sheathsplit0 + sheathsplit0.topedge86: + interface: topedge86 + subcomponent: sheathsplit0 + sheathsplit0.topedge87: + interface: topedge87 + subcomponent: sheathsplit0 + sheathsplit0.topedge88: + interface: topedge88 + subcomponent: sheathsplit0 + sheathsplit0.topedge89: + interface: topedge89 + subcomponent: sheathsplit0 + sheathsplit0.topedge9: + interface: topedge9 + subcomponent: sheathsplit0 + sheathsplit0.topedge90: + interface: topedge90 + subcomponent: sheathsplit0 + sheathsplit0.topedge91: + interface: topedge91 + subcomponent: sheathsplit0 + sheathsplit0.topedge92: + interface: topedge92 + subcomponent: sheathsplit0 + sheathsplit0.topedge93: + interface: topedge93 + subcomponent: sheathsplit0 + sheathsplit0.topedge94: + interface: topedge94 + subcomponent: sheathsplit0 + sheathsplit0.topedge95: + interface: topedge95 + subcomponent: sheathsplit0 + sheathsplit0.topedge96: + interface: topedge96 + subcomponent: sheathsplit0 + sheathsplit0.topedge97: + interface: topedge97 + subcomponent: sheathsplit0 + sheathsplit0.topedge98: + interface: topedge98 + subcomponent: sheathsplit0 + sheathsplit0.topedge99: + interface: topedge99 + subcomponent: sheathsplit0 +parameters: + bleft.angle: + defaultValue: 0 + spec: + maxValue: null + minValue: null + units: degrees + valueType: (float, int) + brains: + defaultValue: esp32stack + spec: + valueType: str + driveservo: + defaultValue: fs90r + spec: + valueType: str + fright.angle: + defaultValue: 0 + spec: + maxValue: null + minValue: null + units: degrees + valueType: (float, int) + height: + defaultValue: 48 + spec: + minValue: 36 + units: mm + valueType: (float, int) + length: + defaultValue: 65 + spec: + minValue: 60 + units: mm + valueType: (float, int) + width: + defaultValue: 60 + spec: + minValue: 51 + units: mm + valueType: (float, int) +source: ..\builders\BrainsTwoWheelsBuilder.py +subcomponents: + between0: + classname: SimpleRectBeam + kwargs: {} + parameters: + depth: + function: getDim(x, 'motorwidth') + parameter: driveservo + length: + function: x[0]- 2 * getDim(x[1], 'motorheight') + parameter: + - width + - driveservo + width: + function: getDim(x, 'motorwidth') + parameter: driveservo + bleft: + classname: Wheel + kwargs: + invert: true + parameters: + angle: + parameter: bleft.angle + center: false + length: + function: ((x[0] - getDim(x[1], "width"))) + parameter: &id001 + - length + - brains + radius: + function: (getDim(x, "height") / 1.35) + parameter: brains + servo: + parameter: driveservo + fright: + classname: Wheel + kwargs: + invert: true + parameters: + angle: + parameter: fright.angle + center: false + flip: true + length: + function: ((x[0] - getDim(x[1], "width"))) + parameter: *id001 + radius: + function: (getDim(x, "height") / 1.35) + parameter: brains + servo: + parameter: driveservo + holder: + classname: SubESP32Stack + kwargs: {} + parameters: + length: + parameter: width + sheath0: + classname: SimpleRectBeam + kwargs: {} + parameters: + depth: + parameter: height + length: + parameter: length + width: + parameter: width + sheathsplit0: + classname: SplitEdge + kwargs: {} + parameters: + botlength: + function: (x[1] - getDim(x[0],'motorheight'), getDim(x[0],'motorheight')) + parameter: + - driveservo + - width + toplength: + function: (x,) + parameter: width + sidehole0: + classname: Cutout + kwargs: {} + parameters: + dx: + function: '14' + parameter: height + dy: + function: '30' + parameter: height + sidehole1: + classname: Cutout + kwargs: {} + parameters: + dx: + function: '14' + parameter: height + dy: + function: '23' + parameter: height + split0: + classname: SplitEdge + kwargs: {} + parameters: + botlength: + function: (getDim(x[1], "motorwidth"), getDim(x[0], "height") - getDim(x[1], + "motorwidth")) + parameter: &id002 + - brains + - driveservo + toplength: + function: (getDim(x, "height"),) + parameter: brains + split1: + classname: SplitEdge + kwargs: {} + parameters: + botlength: + function: (getDim(x[0], "height") - getDim(x[1], "motorwidth"), getDim(x[1], + "motorwidth")) + parameter: *id002 + toplength: + function: (getDim(x, "height"),) + parameter: brains diff --git a/rocolib/library/Scooper.yaml b/rocolib/library/Scooper.yaml new file mode 100644 index 0000000000000000000000000000000000000000..00be0fb7b8659d77ea9e940ac309974f7b992a17 --- /dev/null +++ b/rocolib/library/Scooper.yaml @@ -0,0 +1,76 @@ +connections: + connection0: + - - r0 + - b + - - side0 + - topedge + - angle: -90 + connection1: + - - side0 + - redge + - - r1 + - t + - angle: -90 + connection2: + - - side0 + - ledge + - - r2 + - t + - angle: -90 +interfaces: + botedge: + interface: botedge + subcomponent: side0 + sideedge: + interface: t + subcomponent: r0 +parameters: + length: + defaultValue: 73 + spec: + minValue: 0 + units: mm + valueType: (float, int) + width: + defaultValue: 147 + spec: + minValue: 0 + units: mm + valueType: (float, int) +source: ..\builders\ScooperBuilder.py +subcomponents: + r0: + classname: Rectangle + kwargs: {} + parameters: + l: + parameter: width + w: + parameter: length + r1: + classname: Rectangle + kwargs: {} + parameters: + l: + function: float(15 * np.sqrt(2.)) + parameter: width + w: + parameter: length + r2: + classname: Rectangle + kwargs: {} + parameters: + l: + function: float(15 * np.sqrt(2.)) + parameter: width + w: + parameter: length + side0: + classname: Trapezoid + kwargs: {} + parameters: + depth: + function: '15' + parameter: width + width: + parameter: width diff --git a/rocolib/library/SubESP32Stack.yaml b/rocolib/library/SubESP32Stack.yaml index 2c690e6ffc5998598916a66a3399a987adc25e94..a00adfdd0758a6e61c5555ad88060fff63149c3d 100644 --- a/rocolib/library/SubESP32Stack.yaml +++ b/rocolib/library/SubESP32Stack.yaml @@ -1,58 +1,42 @@ connections: connection0: - - &id001 - - holder + - - holder - face0 - - - pinhole0 + - &id001 + - header - decoration - mode: hole offset: - function: (-10, 0) - parameter: length + function: (0, 0) + parameter: &id002 + - length + - brains connection1: + - - holder + - face2 - *id001 - - - pinhole1 - - decoration - mode: hole offset: - function: (10, -5) - parameter: length + function: (0, 0) + parameter: *id002 connection2: - - &id002 - - holder - - face2 - - - pinhole2 - - decoration - - mode: hole - offset: - function: (10, 0) - parameter: length - connection3: - - *id002 - - - pinhole3 - - decoration - - mode: hole - offset: - function: (-10, -5) - parameter: length - connection4: - - holder - face3 - - servohole1 - decoration - mode: hole offset: - function: (-5, -20) + function: (0, 14) parameter: length rotate: true - connection5: + connection3: - - holder - face1 - - powerhole - decoration - mode: hole offset: - function: (-7, 12) + function: (-5, 12) parameter: length rotate: true interfaces: @@ -108,7 +92,7 @@ parameters: spec: parameterType: length length: - defaultValue: 51 + defaultValue: 60 spec: minValue: 0 units: mm @@ -191,25 +175,25 @@ subcomponents: function: x parameter: dy1 dy: - function: x+12 + function: x+17 parameter: dy1 servohole0: classname: Cutout kwargs: {} parameters: dx: - function: '7' + function: x-5 parameter: dy1 dy: - function: x+2 + function: x+12 parameter: dy1 servohole1: classname: Cutout kwargs: {} parameters: dx: - function: '7' + function: x-5 parameter: dy1 dy: - function: x+2 + function: x+12 parameter: dy1 diff --git a/rocolib/library/TwoWheels.yaml b/rocolib/library/TwoWheels.yaml index b3e01779764beee3c2b9ef410a0cd1aa815e5e4d..f5b31d6c656ca0f3b1fb89dc4ec3e2e832624c4d 100644 --- a/rocolib/library/TwoWheels.yaml +++ b/rocolib/library/TwoWheels.yaml @@ -25,17 +25,23 @@ connections: - angle: 90 tabWidth: 10 connection4: - - - fleft - - botedge1 - - - sheathsplit1 - - botedge2 - - angle: 180 + - - sheathsplit0 + - topedge0 + - - sheath1 + - topedge1 + - {} connection5: - - sheathsplit1 - topedge0 - - sheath1 - - topedge2 + - topedge3 - {} + connection6: + - - fleft + - botedge0 + - - sheathsplit0 + - botedge0 + - angle: 180 interfaces: sheath1.botedge0: interface: botedge0 @@ -79,6 +85,12 @@ interfaces: sheath1.topedge3: interface: topedge3 subcomponent: sheath1 + splitedge0: + interface: botedge1 + subcomponent: sheathsplit0 + splitedge1: + interface: botedge0 + subcomponent: sheathsplit1 parameters: brains: defaultValue: esp32stack @@ -103,21 +115,21 @@ parameters: units: degrees valueType: (float, int) height: - defaultValue: 36 + defaultValue: 48 spec: minValue: 36 units: mm valueType: (float, int) length: - defaultValue: 60 + defaultValue: 65 spec: minValue: 60 units: mm valueType: (float, int) width: - defaultValue: 72 + defaultValue: 60 spec: - minValue: 72 + minValue: 51 units: mm valueType: (float, int) source: ..\builders\TwoWheelsBuilder.py @@ -158,6 +170,7 @@ subcomponents: angle: parameter: bright.angle center: false + flip: true length: function: ((x[0] - getDim(x[1], "width"))) parameter: &id002 @@ -176,7 +189,6 @@ subcomponents: angle: parameter: fleft.angle center: false - flip: true length: function: ((x[0] - getDim(x[1], "width"))) parameter: *id002 @@ -195,15 +207,25 @@ subcomponents: parameter: length width: parameter: width - sheathsplit1: + sheathsplit0: classname: SplitEdge kwargs: {} parameters: botlength: - function: (getDim(x[0],'motorheight'), x[1] - 2*getDim(x[0],'motorheight'), getDim(x[0],'motorheight')) - parameter: + function: (getDim(x[0],'motorwidth'), x[1] - getDim(x[0],'motorwidth')) + parameter: &id003 - driveservo - - width + - height toplength: function: (x,) - parameter: width + parameter: height + sheathsplit1: + classname: SplitEdge + kwargs: {} + parameters: + botlength: + function: (x[1] - getDim(x[0],'motorwidth'), getDim(x[0],'motorwidth')) + parameter: *id003 + toplength: + function: (x,) + parameter: height diff --git a/rocolib/utils/dimensions.py b/rocolib/utils/dimensions.py index 0548cd9937ca1fb57697049ca630ccb4f8b0e4be..cc791e9834ee2228eb3a3d0357f61061da061095 100644 --- a/rocolib/utils/dimensions.py +++ b/rocolib/utils/dimensions.py @@ -40,13 +40,13 @@ dims["nodeMCU"] = { "type" : "brains", } dims["esp32stack"] = { "type" : "brains", - "length" : 52, + "length" : 51, "width" : 24, - "height" : 36, - "nrows" : 0, - "ncols" : 0, - "rowsep" : 0, - "colsep" : 0, + "height" : 48, + "nrows" : 16, + "ncols" : 2, + "rowsep" : 2.5, + "colsep" : 20, } '''