Last active
March 1, 2024 04:24
-
-
Save k-okada/9513a9e32d7dbade3b664ef2baf1ebf5 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env roseus | |
;; (setq robot-name 'akira) | |
;; (setq robot-name 'hanzou) | |
(setq robot-name 'h3s) | |
(require (format nil "models/~A-robot.l" robot-name)) | |
(unless (and (boundp '*robot*) (string= (string-upcase (send *robot* :name)) (string robot-name))) | |
(warning-message 2 "funcall ~A~%" robot-name) | |
(setq *robot* (funcall robot-name))) | |
(case robot-name | |
('akira | |
(send *robot* :legs :crotch-p :joint-angle -20) | |
(send *robot* :legs :knee-p :joint-angle 40) | |
(send *robot* :legs :ankle-p :joint-angle -20) | |
(send *robot* :arms :shoulder-p :joint-angle 20) | |
(send *robot* :arms :elbow-p :joint-angle -40) | |
;; auto-balancer | |
(send *robot* :rleg :ankle-p :joint-angle -10) | |
(send *robot* :lleg :crotch-p :joint-angle -90) | |
(send *robot* :lleg :ankle-p :joint-angle 10) | |
(send *robot* :rarm :shoulder-p :joint-angle -90) | |
(send *robot* :rarm :elbow-p :joint-angle -70) | |
(send *robot* :rarm :collar-y :joint-angle -30) | |
(send *robot* :head :neck-y :joint-angle -20) | |
) | |
('hanzou | |
(send *robot* :legs :crotch-p :joint-angle -20) | |
(send *robot* :legs :knee-p :joint-angle 40) | |
(send *robot* :legs :ankle-p :joint-angle -20) | |
(send *robot* :arms :shoulder-p :joint-angle 20) | |
(send *robot* :arms :elbow-p :joint-angle -90) | |
;; walk | |
;; (send *robot* :lleg :end-coords) | |
;; #<cascaded-coords #X555a5a8343b0 -0.684 35.0 -281.678 / -1.571 3.282e-16 7.850e-17> | |
(send *robot* :rleg :move-end-pos #f(0 20 0)) | |
(send *robot* :lleg :move-end-pos #f(0 -40 0)) | |
) | |
('h3s | |
(send *robot* :h3larm-shoulder-p :joint-angle 20) | |
(send *robot* :h3larm-elbow-p :joint-angle -40) | |
(send *robot* :h3rarm-shoulder-y :joint-angle -20) | |
(send *robot* :h3rarm-shoulder-p :joint-angle -90) | |
(send *robot* :h3rarm-elbow-p :joint-angle -20) | |
(send *robot* :h3head-neck-p :joint-angle -20) | |
(send *robot* :h3head-neck-y :joint-angle -10) | |
(send *robot* :h3head-neck-r :joint-angle -10) | |
) | |
) | |
(objects (list *robot*)) | |
(eus2stl (format nil "~A.stl" robot-name) *robot* :scale 0.001) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment