Commit 7b25a32f authored by Jan Koniarik's avatar Jan Koniarik
Browse files

wololo

parent fbd36424
......@@ -29,7 +29,7 @@ catkin_package(
)
CABAL_BUILD( koke )
#CABAL_BUILD( schpin-koke )
###########
## Build ##
......
all: src/stl/body/body.stl src/stl/body/body_collision_a.stl src/stl/leg/rr/coxa/coxa.stl src/stl/leg/rr/coxa/coxa_collision.stl src/stl/leg/rr/femur/femur.stl src/stl/leg/rr/femur/femur_collision_a.stl src/stl/leg/rr/femur/femur_collision_b.stl src/stl/leg/rr/tibia/tibia.stl src/stl/leg/rr/tibia/tibia_collision.stl src/stl/leg/rl/coxa/coxa.stl src/stl/leg/rl/coxa/coxa_collision.stl src/stl/leg/rl/femur/femur.stl src/stl/leg/rl/femur/femur_collision_a.stl src/stl/leg/rl/femur/femur_collision_b.stl src/stl/leg/rl/tibia/tibia.stl src/stl/leg/rl/tibia/tibia_collision.stl src/stl/leg/fr/coxa/coxa.stl src/stl/leg/fr/coxa/coxa_collision.stl src/stl/leg/fr/femur/femur.stl src/stl/leg/fr/femur/femur_collision_a.stl src/stl/leg/fr/femur/femur_collision_b.stl src/stl/leg/fr/tibia/tibia.stl src/stl/leg/fr/tibia/tibia_collision.stl src/stl/leg/fl/coxa/coxa.stl src/stl/leg/fl/coxa/coxa_collision.stl src/stl/leg/fl/femur/femur.stl src/stl/leg/fl/femur/femur_collision_a.stl src/stl/leg/fl/femur/femur_collision_b.stl src/stl/leg/fl/tibia/tibia.stl src/stl/leg/fl/tibia/tibia_collision.stl
src/stl/body/body.stl: src/scad/gen/body/body.scad
mkdir -p `dirname src/stl/body/body.stl`
openscad -o src/stl/body/body.stl src/scad/gen/body/body.scad
admesh --write-binary-stl=src/stl/body/body.stl --no-check src/stl/body/body.stl
src/stl/body/body_collision_a.stl: src/scad/gen/body/body_collision_a.scad
mkdir -p `dirname src/stl/body/body_collision_a.stl`
openscad -o src/stl/body/body_collision_a.stl src/scad/gen/body/body_collision_a.scad
admesh --write-binary-stl=src/stl/body/body_collision_a.stl --no-check src/stl/body/body_collision_a.stl
src/stl/leg/rr/coxa/coxa.stl: src/scad/gen/leg/rr/coxa/coxa.scad
mkdir -p `dirname src/stl/leg/rr/coxa/coxa.stl`
openscad -o src/stl/leg/rr/coxa/coxa.stl src/scad/gen/leg/rr/coxa/coxa.scad
admesh --write-binary-stl=src/stl/leg/rr/coxa/coxa.stl --no-check src/stl/leg/rr/coxa/coxa.stl
src/stl/leg/rr/coxa/coxa_collision.stl: src/scad/gen/leg/rr/coxa/coxa_collision.scad
mkdir -p `dirname src/stl/leg/rr/coxa/coxa_collision.stl`
openscad -o src/stl/leg/rr/coxa/coxa_collision.stl src/scad/gen/leg/rr/coxa/coxa_collision.scad
admesh --write-binary-stl=src/stl/leg/rr/coxa/coxa_collision.stl --no-check src/stl/leg/rr/coxa/coxa_collision.stl
src/stl/leg/rr/femur/femur.stl: src/scad/gen/leg/rr/femur/femur.scad
mkdir -p `dirname src/stl/leg/rr/femur/femur.stl`
openscad -o src/stl/leg/rr/femur/femur.stl src/scad/gen/leg/rr/femur/femur.scad
admesh --write-binary-stl=src/stl/leg/rr/femur/femur.stl --no-check src/stl/leg/rr/femur/femur.stl
src/stl/leg/rr/femur/femur_collision_a.stl: src/scad/gen/leg/rr/femur/femur_collision_a.scad
mkdir -p `dirname src/stl/leg/rr/femur/femur_collision_a.stl`
openscad -o src/stl/leg/rr/femur/femur_collision_a.stl src/scad/gen/leg/rr/femur/femur_collision_a.scad
admesh --write-binary-stl=src/stl/leg/rr/femur/femur_collision_a.stl --no-check src/stl/leg/rr/femur/femur_collision_a.stl
src/stl/leg/rr/femur/femur_collision_b.stl: src/scad/gen/leg/rr/femur/femur_collision_b.scad
mkdir -p `dirname src/stl/leg/rr/femur/femur_collision_b.stl`
openscad -o src/stl/leg/rr/femur/femur_collision_b.stl src/scad/gen/leg/rr/femur/femur_collision_b.scad
admesh --write-binary-stl=src/stl/leg/rr/femur/femur_collision_b.stl --no-check src/stl/leg/rr/femur/femur_collision_b.stl
src/stl/leg/rr/tibia/tibia.stl: src/scad/gen/leg/rr/tibia/tibia.scad
mkdir -p `dirname src/stl/leg/rr/tibia/tibia.stl`
openscad -o src/stl/leg/rr/tibia/tibia.stl src/scad/gen/leg/rr/tibia/tibia.scad
admesh --write-binary-stl=src/stl/leg/rr/tibia/tibia.stl --no-check src/stl/leg/rr/tibia/tibia.stl
src/stl/leg/rr/tibia/tibia_collision.stl: src/scad/gen/leg/rr/tibia/tibia_collision.scad
mkdir -p `dirname src/stl/leg/rr/tibia/tibia_collision.stl`
openscad -o src/stl/leg/rr/tibia/tibia_collision.stl src/scad/gen/leg/rr/tibia/tibia_collision.scad
admesh --write-binary-stl=src/stl/leg/rr/tibia/tibia_collision.stl --no-check src/stl/leg/rr/tibia/tibia_collision.stl
src/stl/leg/rl/coxa/coxa.stl: src/scad/gen/leg/rl/coxa/coxa.scad
mkdir -p `dirname src/stl/leg/rl/coxa/coxa.stl`
openscad -o src/stl/leg/rl/coxa/coxa.stl src/scad/gen/leg/rl/coxa/coxa.scad
admesh --write-binary-stl=src/stl/leg/rl/coxa/coxa.stl --no-check src/stl/leg/rl/coxa/coxa.stl
src/stl/leg/rl/coxa/coxa_collision.stl: src/scad/gen/leg/rl/coxa/coxa_collision.scad
mkdir -p `dirname src/stl/leg/rl/coxa/coxa_collision.stl`
openscad -o src/stl/leg/rl/coxa/coxa_collision.stl src/scad/gen/leg/rl/coxa/coxa_collision.scad
admesh --write-binary-stl=src/stl/leg/rl/coxa/coxa_collision.stl --no-check src/stl/leg/rl/coxa/coxa_collision.stl
src/stl/leg/rl/femur/femur.stl: src/scad/gen/leg/rl/femur/femur.scad
mkdir -p `dirname src/stl/leg/rl/femur/femur.stl`
openscad -o src/stl/leg/rl/femur/femur.stl src/scad/gen/leg/rl/femur/femur.scad
admesh --write-binary-stl=src/stl/leg/rl/femur/femur.stl --no-check src/stl/leg/rl/femur/femur.stl
src/stl/leg/rl/femur/femur_collision_a.stl: src/scad/gen/leg/rl/femur/femur_collision_a.scad
mkdir -p `dirname src/stl/leg/rl/femur/femur_collision_a.stl`
openscad -o src/stl/leg/rl/femur/femur_collision_a.stl src/scad/gen/leg/rl/femur/femur_collision_a.scad
admesh --write-binary-stl=src/stl/leg/rl/femur/femur_collision_a.stl --no-check src/stl/leg/rl/femur/femur_collision_a.stl
src/stl/leg/rl/femur/femur_collision_b.stl: src/scad/gen/leg/rl/femur/femur_collision_b.scad
mkdir -p `dirname src/stl/leg/rl/femur/femur_collision_b.stl`
openscad -o src/stl/leg/rl/femur/femur_collision_b.stl src/scad/gen/leg/rl/femur/femur_collision_b.scad
admesh --write-binary-stl=src/stl/leg/rl/femur/femur_collision_b.stl --no-check src/stl/leg/rl/femur/femur_collision_b.stl
src/stl/leg/rl/tibia/tibia.stl: src/scad/gen/leg/rl/tibia/tibia.scad
mkdir -p `dirname src/stl/leg/rl/tibia/tibia.stl`
openscad -o src/stl/leg/rl/tibia/tibia.stl src/scad/gen/leg/rl/tibia/tibia.scad
admesh --write-binary-stl=src/stl/leg/rl/tibia/tibia.stl --no-check src/stl/leg/rl/tibia/tibia.stl
src/stl/leg/rl/tibia/tibia_collision.stl: src/scad/gen/leg/rl/tibia/tibia_collision.scad
mkdir -p `dirname src/stl/leg/rl/tibia/tibia_collision.stl`
openscad -o src/stl/leg/rl/tibia/tibia_collision.stl src/scad/gen/leg/rl/tibia/tibia_collision.scad
admesh --write-binary-stl=src/stl/leg/rl/tibia/tibia_collision.stl --no-check src/stl/leg/rl/tibia/tibia_collision.stl
src/stl/leg/fr/coxa/coxa.stl: src/scad/gen/leg/fr/coxa/coxa.scad
mkdir -p `dirname src/stl/leg/fr/coxa/coxa.stl`
openscad -o src/stl/leg/fr/coxa/coxa.stl src/scad/gen/leg/fr/coxa/coxa.scad
admesh --write-binary-stl=src/stl/leg/fr/coxa/coxa.stl --no-check src/stl/leg/fr/coxa/coxa.stl
src/stl/leg/fr/coxa/coxa_collision.stl: src/scad/gen/leg/fr/coxa/coxa_collision.scad
mkdir -p `dirname src/stl/leg/fr/coxa/coxa_collision.stl`
openscad -o src/stl/leg/fr/coxa/coxa_collision.stl src/scad/gen/leg/fr/coxa/coxa_collision.scad
admesh --write-binary-stl=src/stl/leg/fr/coxa/coxa_collision.stl --no-check src/stl/leg/fr/coxa/coxa_collision.stl
src/stl/leg/fr/femur/femur.stl: src/scad/gen/leg/fr/femur/femur.scad
mkdir -p `dirname src/stl/leg/fr/femur/femur.stl`
openscad -o src/stl/leg/fr/femur/femur.stl src/scad/gen/leg/fr/femur/femur.scad
admesh --write-binary-stl=src/stl/leg/fr/femur/femur.stl --no-check src/stl/leg/fr/femur/femur.stl
src/stl/leg/fr/femur/femur_collision_a.stl: src/scad/gen/leg/fr/femur/femur_collision_a.scad
mkdir -p `dirname src/stl/leg/fr/femur/femur_collision_a.stl`
openscad -o src/stl/leg/fr/femur/femur_collision_a.stl src/scad/gen/leg/fr/femur/femur_collision_a.scad
admesh --write-binary-stl=src/stl/leg/fr/femur/femur_collision_a.stl --no-check src/stl/leg/fr/femur/femur_collision_a.stl
src/stl/leg/fr/femur/femur_collision_b.stl: src/scad/gen/leg/fr/femur/femur_collision_b.scad
mkdir -p `dirname src/stl/leg/fr/femur/femur_collision_b.stl`
openscad -o src/stl/leg/fr/femur/femur_collision_b.stl src/scad/gen/leg/fr/femur/femur_collision_b.scad
admesh --write-binary-stl=src/stl/leg/fr/femur/femur_collision_b.stl --no-check src/stl/leg/fr/femur/femur_collision_b.stl
src/stl/leg/fr/tibia/tibia.stl: src/scad/gen/leg/fr/tibia/tibia.scad
mkdir -p `dirname src/stl/leg/fr/tibia/tibia.stl`
openscad -o src/stl/leg/fr/tibia/tibia.stl src/scad/gen/leg/fr/tibia/tibia.scad
admesh --write-binary-stl=src/stl/leg/fr/tibia/tibia.stl --no-check src/stl/leg/fr/tibia/tibia.stl
src/stl/leg/fr/tibia/tibia_collision.stl: src/scad/gen/leg/fr/tibia/tibia_collision.scad
mkdir -p `dirname src/stl/leg/fr/tibia/tibia_collision.stl`
openscad -o src/stl/leg/fr/tibia/tibia_collision.stl src/scad/gen/leg/fr/tibia/tibia_collision.scad
admesh --write-binary-stl=src/stl/leg/fr/tibia/tibia_collision.stl --no-check src/stl/leg/fr/tibia/tibia_collision.stl
src/stl/leg/fl/coxa/coxa.stl: src/scad/gen/leg/fl/coxa/coxa.scad
mkdir -p `dirname src/stl/leg/fl/coxa/coxa.stl`
openscad -o src/stl/leg/fl/coxa/coxa.stl src/scad/gen/leg/fl/coxa/coxa.scad
admesh --write-binary-stl=src/stl/leg/fl/coxa/coxa.stl --no-check src/stl/leg/fl/coxa/coxa.stl
src/stl/leg/fl/coxa/coxa_collision.stl: src/scad/gen/leg/fl/coxa/coxa_collision.scad
mkdir -p `dirname src/stl/leg/fl/coxa/coxa_collision.stl`
openscad -o src/stl/leg/fl/coxa/coxa_collision.stl src/scad/gen/leg/fl/coxa/coxa_collision.scad
admesh --write-binary-stl=src/stl/leg/fl/coxa/coxa_collision.stl --no-check src/stl/leg/fl/coxa/coxa_collision.stl
src/stl/leg/fl/femur/femur.stl: src/scad/gen/leg/fl/femur/femur.scad
mkdir -p `dirname src/stl/leg/fl/femur/femur.stl`
openscad -o src/stl/leg/fl/femur/femur.stl src/scad/gen/leg/fl/femur/femur.scad
admesh --write-binary-stl=src/stl/leg/fl/femur/femur.stl --no-check src/stl/leg/fl/femur/femur.stl
src/stl/leg/fl/femur/femur_collision_a.stl: src/scad/gen/leg/fl/femur/femur_collision_a.scad
mkdir -p `dirname src/stl/leg/fl/femur/femur_collision_a.stl`
openscad -o src/stl/leg/fl/femur/femur_collision_a.stl src/scad/gen/leg/fl/femur/femur_collision_a.scad
admesh --write-binary-stl=src/stl/leg/fl/femur/femur_collision_a.stl --no-check src/stl/leg/fl/femur/femur_collision_a.stl
src/stl/leg/fl/femur/femur_collision_b.stl: src/scad/gen/leg/fl/femur/femur_collision_b.scad
mkdir -p `dirname src/stl/leg/fl/femur/femur_collision_b.stl`
openscad -o src/stl/leg/fl/femur/femur_collision_b.stl src/scad/gen/leg/fl/femur/femur_collision_b.scad
admesh --write-binary-stl=src/stl/leg/fl/femur/femur_collision_b.stl --no-check src/stl/leg/fl/femur/femur_collision_b.stl
src/stl/leg/fl/tibia/tibia.stl: src/scad/gen/leg/fl/tibia/tibia.scad
mkdir -p `dirname src/stl/leg/fl/tibia/tibia.stl`
openscad -o src/stl/leg/fl/tibia/tibia.stl src/scad/gen/leg/fl/tibia/tibia.scad
admesh --write-binary-stl=src/stl/leg/fl/tibia/tibia.stl --no-check src/stl/leg/fl/tibia/tibia.stl
src/stl/leg/fl/tibia/tibia_collision.stl: src/scad/gen/leg/fl/tibia/tibia_collision.scad
mkdir -p `dirname src/stl/leg/fl/tibia/tibia_collision.stl`
openscad -o src/stl/leg/fl/tibia/tibia_collision.stl src/scad/gen/leg/fl/tibia/tibia_collision.scad
admesh --write-binary-stl=src/stl/leg/fl/tibia/tibia_collision.stl --no-check src/stl/leg/fl/tibia/tibia_collision.stl
-- This is a Cabal package environment file.
-- THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY.
-- Please create a 'cabal.config' file in the same directory
-- if you want to change the default settings for this sandbox.
local-repo: /home/squirrel/data/Projects/Schpin/repos/schpin-robot/schpin_koke/.cabal-sandbox/packages
logs-dir: /home/squirrel/data/Projects/Schpin/repos/schpin-robot/schpin_koke/.cabal-sandbox/logs
world-file: /home/squirrel/data/Projects/Schpin/repos/schpin-robot/schpin_koke/.cabal-sandbox/world
user-install: False
package-db: /home/squirrel/data/Projects/Schpin/repos/schpin-robot/schpin_koke/.cabal-sandbox/x86_64-linux-ghc-8.6.4-packages.conf.d
build-summary: /home/squirrel/data/Projects/Schpin/repos/schpin-robot/schpin_koke/.cabal-sandbox/logs/build.log
install-dirs
prefix: /home/squirrel/data/Projects/Schpin/repos/schpin-robot/schpin_koke/.cabal-sandbox
bindir: $prefix/bin
libdir: $prefix/lib
libsubdir: $abi/$libname
dynlibdir: $libdir/$abi
libexecdir: $prefix/libexec
libexecsubdir: $abi/$pkgid
datadir: $prefix/share
datasubdir: $abi/$pkgid
docdir: $datadir/doc/$abi/$pkgid
htmldir: $docdir/html
haddockdir: $htmldir
sysconfdir: $prefix/etc
<launch>
<param name="robot_description" textfile="$(find schpin_koke)/src/urdf/koke.urdf"/>
<param name="robot_semantics" textfile="$(find schpin_koke)/src/srdf/koke.srdf"/>
</launch>
......@@ -57,7 +57,7 @@ executable schpin-koke
-- other-extensions:
-- Other library packages from which modules are imported.
build-depends: base >=4.11 && <4.12, linear, schpin-robot-lib
build-depends: base >=4.11, linear, schpin-robot-lib, dimensional
-- Directories containing source files.
hs-source-dirs: src
......
#!/usr/bin/env runhaskell
import Data.SCAD
import Data.Shared
import Data.SRDF.Xml (writeSRDFXML)
import Data.URDF.Xml (writeXML)
import Data.Walker
import Linear.Quaternion
import Linear.V3
import Numeric.Units.Dimensional.Prelude ((*~), degree, radian, second)
import qualified Numeric.Units.Dimensional.Prelude as D
data LegPos = RL | RR | FR | FL deriving Eq;
kokeTipPos = V3 (90 *~ mm) (0 *~ mm) (0 *~ mm)
femurOffset :: Pose
femurOffset = Pose (V3 (61.3 *~ mm) (0 *~ mm) (0 *~ mm)) $ toQuat zAxis (0 *~ degree)
tibiaOffset :: Pose
tibiaOffset = Pose (V3 (86 *~ mm) (0 *~ mm) (0 *~ mm)) $ toQuat yAxis (90 *~ degree)
legPose :: LegPos -> Pose
legPose pos = Pose (V3 x y (0 *~ mm)) $ toQuat zAxis ( angle *~ degree )
where
x = case pos of
FR -> 36 *~ mm
RR -> 36 *~ mm
FL -> (-36) *~ mm
RL -> (-36) *~ mm
y = case pos of
FL -> 45 *~ mm
FR -> 45 *~ mm
RR -> (-45) *~ mm
RL -> (-45) *~ mm
angle = standingZAngles pos
standingZAngles :: LegPos -> Double
standingZAngles pos = case pos of
RL -> -90 - 45
RR -> -90 + 45
FL -> 90 + 45
FR -> 90 - 45
foldedZAngles :: LegPos -> Double
foldedZAngles pos = case pos of
RL -> -90
RR -> -90
FL -> 90
FR -> 90
tibia = Part {
model = scadModel "tibia" [ ("tipOffset",kokeTipPos) ] ["tibia.scad"],
collision_models = [
scadModel "tibia_collision" [("tipOffset", kokeTipPos)] ["tibia.scad"]
],
part_weight = Nothing,
center_of_mass = Nothing
}
femur = Part {
model = scadModel "femur" [ ( "tibiaOffset", pos $ tibiaOffset)] ["femur.scad"],
collision_models = [
scadModel "femur_collision_a" [("tibiaOffset", pos $ tibiaOffset)] ["femur.scad"],
scadModel "femur_collision_b" [("tibiaOffset", pos $ tibiaOffset)] ["femur.scad"]
],
part_weight = Nothing,
center_of_mass = Nothing
}
coxa = Part {
model = scadModel "coxa" [ ( "femurOffset", pos $ femurOffset)] ["coxa.scad"],
collision_models = [
scadModel "coxa_collision" [ ( "femurOffset", pos $ femurOffset)] ["coxa.scad"]
],
part_weight = Nothing,
center_of_mass = Nothing
}
kokeBody legs = Body $ Part {
model = scadModel "body" [("positions", map leg_pose legs)] ["body.scad"],
collision_models = [
scadModel "body_collision_a" [("positions", map leg_pose legs)] ["body.scad"]
],
part_weight = Nothing,
center_of_mass = Nothing
}
where
leg_pose leg = pos $ offset $ head $ chain leg
leg :: LegPos -> Leg
leg pos = Leg {
leg_name = case pos of
RL -> "rl"
RR -> "rr"
FL -> "fl"
FR -> "fr"
,
chain = [
Link { link_name = "coxa",
offset= legPose pos,
part = coxa,
axis = zAxis,
joint_config = JointConfig{
min_angle = (-3*pi/8) *~ radian,
default_angle = 0 *~ radian,
max_angle = (3*pi/8) *~ radian,
vel_lim = 50 *~ (radian D./ second),
effor_lim = 100,
g_steps = 8
}},
Link { link_name = "femur",
offset = femurOffset,
part = femur,
axis = yAxis,
joint_config = JointConfig {
min_angle=(-3*pi/8) *~ radian,
default_angle=(-pi/8) *~ radian,
max_angle=(3*pi/8) *~ radian,
vel_lim= 50 *~ (radian D./ second),
effor_lim = 100,
g_steps= 8
}},
Link {
link_name ="tibia",
offset = tibiaOffset,
part = tibia,
axis = yAxis,
joint_config = JointConfig {
min_angle = (-3*pi/8) *~ radian,
default_angle = (pi/8) *~ radian,
max_angle = (3*pi/8) *~ radian,
vel_lim = 50 *~ (radian D./ second),
effor_lim = 100,
g_steps = 8
}
}
],
tip = Tip {
point = kokeTipPos
},
pose = noOffset -- is not considered during offset in schpin_ompl -> remove
}
koke :: Walker
koke = Walker walker_name legs (kokeBody legs)
where
walker_name = "Tote"
legs = [leg RR, leg RL, leg FR, leg FL]
main :: IO ()
main = do
mapM_ (uncurry renderSCAD) $ getSCAD koke
writeXML (getURDF koke) "src/urdf/koke.urdf"
writeSRDFXML (getSRDF koke) "src/srdf/koke.srdf"
renderWalkerStl koke
include<tile.scad>;
LX15D_dim = [ 44.17, 22.95, 26 ];
LX15D_middle_t = 1.5; // height of the middle space
......@@ -7,6 +8,7 @@ LX15D_horn_d = 20;
LX15D_horn_w = 38.6;
LX15D_screw_x = 41.2;
LX15D_screw_y = 18;
LX15D_horn_screw_d = 3;
LX15D_screw_clearance_d = 7;
LX15D_body_screw_d = 2;
LX15D_horn_clearance_d = 8;
......@@ -21,14 +23,24 @@ module LX15D() color("gray") {
cube(dim + [ -LX15D_middle_a, -LX15D_middle_a, LX15D_middle_t * 2 ],
center = true);
for (i = [ -0.5, 0.5 ], j = [ -0.5, 0.5 ])
translate([ dim[0] * i, dim[1] * j, 0 ]) cylinder(
d = 13, h = 100, center = true);
translate([ dim[0] * i, dim[1] * j, 0 ])
cylinder(d = 13, h = 100, center = true);
}
}
cylinder(d = LX15D_horn_d, h = LX15D_horn_w, center = true);
}
module LX15D_collision() {
dim = LX15D_dim;
translate([ dim[0] / 2 - LX15D_axis_offset, 0, 0 ]) {
cube(dim + [ 0, 0, LX15D_middle_t * 2 ], center = true);
}
cube([ LX15D_horn_d, LX15D_horn_d, LX15D_horn_w ], center = true);
}
module LX15D_clearance() {
cylinder(r = LX15D_clearance_r, h = LX15D_horn_w, center = true);
}
......@@ -63,3 +75,65 @@ module LX15D_side_plate(screw_d, holes, t) difference() {
LX15D_bottom_screw_pos()
cylinder(d = LX15D_body_screw_d, h = 100, center = true);
}
LX15D_U_h = 6;
LX15D_U_c = 0.2;
LX15D_U_offset =
[ LX15D_dim[0] - LX15D_axis_offset + LX15D_U_c + LX15D_U_h, 0, 0 ];
module LX15D_U() render() difference() {
a = 24;
t = 2;
union() {
translate([ LX15D_dim[0] - LX15D_axis_offset + LX15D_U_c, 0, 0 ])
difference() {
translate([ LX15D_U_h / 2, 0, 0 ])
cube([ LX15D_U_h, a, LX15D_dim[2] + t * 2 ], center = true);
translate([ LX15D_U_h, 0, 0 ]) rotate([ 0, -90, 0 ])
tile_neg(T24, LX15D_U_h);
}
for (m = [ 0, 1 ])
mirror([ 0, 0, m ]) LX15D_bottom_screw_pos()
hull() for (x = [ 0, LX15D_U_h / 2 ]) translate([ x, 0, 0 ])
cylinder(d = LX15D_screw_clearance_d, h = t);
}
LX15D_bottom_screw_pos()
cylinder(d = LX15D_body_screw_d, h = 100, center = true);
}
LX15D_BU_h = 6;
LX15D_BU_screw_d = 3;
LX15D_BU_screw_h = 6;
LX15D_BU_screw_a = 10;
LX15D_BU_x_off = -LX15D_clearance_r - LX15D_BU_h / 2;
module LX15D_BU_plate() difference() {
t = 3;
hull() translate([ 0, 0, LX15D_horn_w / 2 ]) {
LX15D_horn_screw_pos() cylinder(d = LX15D_horn_screw_d + t * 2, h = t);
for (i = [ -0.5, 0.5 ])
translate([ LX15D_BU_x_off, i * LX15D_BU_screw_a, 0 ])
cylinder(d = LX15D_BU_screw_d + t * 2, h = t);
}
LX15D_horn_screw_pos()
cylinder(d = LX15D_horn_screw_d, h = 100, center = true);
for (i = [ -0.5, 0.5 ])
translate([ LX15D_BU_x_off, i * LX15D_BU_screw_a, 0 ])
cylinder(d = LX15D_BU_screw_d, h = 100, center = true);
}
module LX15D_BU_body() difference() {
dim = [ LX15D_BU_h, LX15D_dim[1], LX15D_horn_w ];
x_off = LX15D_BU_x_off;
union() {
translate([ x_off, 0, 0 ]) difference() {
cube(dim, center = true);
rotate([ 0, 90, 0 ]) tile_neg(T24, LX15D_BU_h, center = true);
}
}
for (z = [ -dim[2] / 2, dim[2] / 2 ], i = [ -0.5, 0.5 ])
translate([ x_off, i * LX15D_BU_screw_a, z ]) cylinder(
d = LX15D_BU_screw_d, h = LX15D_BU_screw_h * 2, center = true);
}
module LX15D_BU() {
LX15D_BU_body();
for (m = [ 0, 1 ]) mirror([ 0, 0, m ]) LX15D_BU_plate();
}
include<tile.scad>;
include<LX15D.scad>;
screw_d = 3;
tile_a = 24;
t = 3;
tube_d = 4;
local_tile_t = 5;
coxa_z_space = 40;
tile_t = 5;
middle_t = 10;
coxa_z_space = 10;
module body_collision_a(positions) {
hull() for (pos = positions) {
......@@ -14,34 +14,21 @@ module body_collision_a(positions) {
}
}
module top_tiles() {
translate([ 0, 0, (coxa_z_space + t) / 2 ]) {
for (j = [-2:2])
translate([ 0, j * tile_a, 0 ]) tile_base(local_tile_t, 0);
for (i = [ -1, 0, 1 ])
translate([ i * tile_a, 0, 0 ]) tile_base(local_tile_t, 0);
}
}
module bot_tiles() {
translate([ 0, 0, -(coxa_z_space + t) / 2 ]) {
for (j = [-2:2])
translate([ 0, j * tile_a, 0 ]) tile_base(local_tile_t, 0);
for (i = [ -1, 0, 1 ])
translate([ i * tile_a, 0, 0 ]) tile_base(local_tile_t, 0);
}
}
module body(positions) {
$fn = 32;
for (pos = positions) translate(pos) {
if (pos[1] > 0) {
rotate([ 0, 0, -90 ]) LX15D();
} else {
rotate([ 0, 0, 90 ]) LX15D();
}
for (pos = positions)
translate(pos) rotate([ 0, 0, pos[1] > 0 ? -90 : 90 ]) {
LX15D();
LX15D_U();
}
top_tiles();
bot_tiles();
rotate([ 90, 0, 0 ]) for (i = [-1.5:1.5]) translate([ i * tile_a, 0, 0 ]) {
tile(T24, middle_t, center = true);
}
}
body(positions = [
[ 36.0, -45.0, 0.0 ], [ -36.0, -45.0, 0.0 ], [ 36.0, 45.0, 0.0 ],
[ -36.0, 45.0, 0.0 ]
]);
include<LX15D.scad>;
screw_d = 3;
t = 2;
z_screw_offset = 36;
main_screw_offset = LX15D_clearance_r + t;
module main_screw_pos() {
for (z = [ -0.5, 0.5 ])
translate([ main_screw_offset, 0, z * z_screw_offset ])
rotate([ -90, 0, 0 ]) children();
}
module side_screw_pos(femurOffset) {
translate(femurOffset) rotate([ 90, 0, 180 ]) {
LX15D_bottom_screw_pos() children();
}
rotate([ -90, 0, 0 ]) LX15D_screw_plane() {
rotate([ 90, 0, 0 ]) main_screw_pos() children();
}
}
module M3_screw(l, center = false) { cylinder(d = 3, h = l, center = center); }
module side_plate(femurOffset) {
relative_screw_offset = [ femurOffset[0] - main_screw_offset, 0, 0 ];
translate(femurOffset) rotate([ 90, 0, 180 ]) LX15D_side_plate(
screw_d,
[
relative_screw_offset + [ 0, z_screw_offset / 2, 0 ],
relative_screw_offset - [ 0, z_screw_offset / 2, 0 ]
],
t);
}
cable_clearance_radius = 2;
cable_clearance_d = 3;
cable_clearance_h = LX15D_screw_y;
cable_clearance_w = cable_clearance_d / 2 + t;
cable_clearance_x = 10;
module cable_side_plate() difference() {
union() {
rotate([ 90, 0, 180 ]) hull()
LX15D_bottom_screw_pos() for (x = [ 0, -1.5 ])
translate([ x, 0, t ]) {
cylinder(d = LX15D_screw_clearance_d,
h = cable_clearance_w - t + LX15D_middle_t);
}
translate([ LX15D_axis_offset - LX15D_dim[0], LX15D_dim[2] / 2, 0 ])
translate([ cable_clearance_x, LX15D_middle_t, 0 ]) difference() {
union() {
cube(
[
cable_clearance_d + t * 3, cable_clearance_w * 2,
cable_clearance_h
],
center = true);
}
translate([ 0, -50, 0 ]) cube(100, center = true);
difference() {
cube(
[
cable_clearance_d + cable_clearance_radius * 2,
cable_clearance_d + cable_clearance_radius * 2, 30
],
center = true);
rotate_extrude(convexity = 10) hull() for (i = [ -0.5, 0.5 ])
translate([
cable_clearance_radius + cable_clearance_d,
i * (cable_clearance_h - cable_clearance_radius * 2), 0
]) circle(r = cable_clearance_radius);
}
}
}
rotate([ 90, 0, 180 ]) LX15D_bottom_screw_pos()
cylinder(d = LX15D_body_screw_d, h = 100, center = true);
}
module holder() difference() {
a = screw_d + t * 2;
hull() {
LX15D_horn_screw_pos() translate([ 0, 0, LX15D_horn_w / 2 ])
cylinder(d = a, h = t);
translate([ main_screw_offset, 0, z_screw_offset / 2 ])
rotate([ 90, 0, 0 ])
cylinder(d = a, h = LX15D_dim[2], center = true);
}
LX15D_clearance();
LX15D_horn_screw_pos() translate([ 0, 0, LX15D_horn_w / 2 ])
cylinder(d = screw_d, h = 100, center = true);
cylinder(d = LX15D_horn_clearance_d, h = 100, center = true);
translate([ main_screw_offset, 0, z_screw_offset / 2 ]) rotate([ 90, 0, 0 ])
cylinder(d = screw_d, h = 100, center = true);
}
module coxa_holder(femurOffset) {
for (m = [ 0, 1 ]) mirror([ 0, 0, m ]) holder();
for (m = [ 0, 1 ]) mirror([ 0, m, 0 ]) side_plate(femurOffset);
translate(femurOffset) cable_side_plate();
}
module coxa_collision(femurOffset) {
width = LX15D_dim[2] + t * 2;
translate([ femurOffset[0] / 2, 0, 0 ]) cube(
[ femurOffset[0] + width, width, LX15D_horn_w + t * 2 ], center = true);
}
$fs = 0.5;
$fa = 0.5;