Mercurial > cortex
view org/test-creature.org @ 73:257a86328adb
saving progress
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 28 Dec 2011 00:00:23 -0700 |
parents | |
children | fb810a2c50c2 |
line wrap: on
line source
1 #+title: First attempt at a creature!2 #+author: Robert McIntyre3 #+email: rlm@mit.edu4 #+description:5 #+keywords: simulation, jMonkeyEngine3, clojure6 #+SETUPFILE: ../../aurellem/org/setup.org7 #+INCLUDE: ../../aurellem/org/level-0.org9 * Intro10 So far, I've made the following senses --11 - Vision12 - Hearing13 - Touch14 - Proprioception16 And one effector:17 - Movement19 However, the code so far has only enabled these senses, but has not20 actually implemented them. For example, there is still a lot of work21 to be done for vision. I need to be able to create an /eyeball/ in22 simulation that can be moved around and see the world from different23 angles. I also need to determine weather to use log-polar or cartesian24 for the visual input, and I need to determine how/wether to25 disceritise the visual input.27 I also want to be able to visualize both the sensors and the28 effectors in pretty pictures. This semi-retarted creature will by my29 first attempt at bringing everything together.31 * The creature's body33 Still going to do an eve-like body in blender, but due to problems34 importing the joints, etc into jMonkeyEngine3, I',m going to do all35 the connecting here in clojure code, using the names of the individual36 components and trial and error. Later, I'll maybe make some sort of37 creature-building modifications to blender that support whatever38 discreitized senses I'm going to make.40 #+name: body-141 #+begin_src clojure42 (ns cortex.silly43 "let's play!"44 {:author "Robert McIntyre"})46 ;; TODO remove this!47 (require 'cortex.import)48 (cortex.import/mega-import-jme3)49 (use '(cortex world util body hearing touch vision))51 (use '[clojure.contrib [seq :only [find-first]]])54 (rlm.rlm-commands/help)56 (defn load-blender-model57 "Load a .blend file using an asset folder relative path."58 [^String model]59 (.loadModel60 (doto (asset-manager)61 (.registerLoader BlenderModelLoader (into-array String ["blend"])))62 model))65 (defn apply-skeleton66 "Given an imported blender model, apply the armature using the67 following pattern: if two bones are connected and have the same68 names as two shapes, connect the shapes with a joint constraint."69 [armature-name creature]73 #+end_src77 * COMMENT generate source78 #+begin_src clojure :tangle ../src/cortex/silly.clj79 <<body-1>>80 #+end_src