Last active
August 7, 2017 08:24
-
-
Save mmurooka/9a3a28667777de87c5eeabffe73f0fed to your computer and use it in GitHub Desktop.
fullbody ik root link end-coords error
This file contains 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
(defun test | |
() | |
(load "package://hrpsys_ros_bridge_tutorials/euslisp/samplerobot-interface.l") | |
(setq *robot* (instance samplerobot-robot :init)) | |
(send *robot* :fix-leg-to-coords (make-coords)) | |
;; add additional end-coords | |
(let* ((parent-link | |
(elt (send *robot* :links) 0)) | |
) | |
(send *robot* :put :additional-end-coords | |
(make-cascoords :coords (send parent-link :copy-worldcoords) | |
:parent parent-link)) | |
) | |
;; fullbody ik | |
(let* ((mt | |
(append (list (send *robot* :get :additional-end-coords)) | |
(send *robot* :legs :end-coords))) | |
(tc | |
(send-all mt :copy-worldcoords)) | |
(ll | |
(mapcar #'(lambda (c) (send *robot* :link-list (send c :parent))) mt)) | |
) | |
(send *robot* :fullbody-inverse-kinematics | |
tc | |
:move-target mt | |
:link-list ll | |
:centroid-thre 100 | |
:debug-view :no-message | |
))) | |
) | |
(defun test2 | |
() | |
(load "package://hrpsys_ros_bridge_tutorials/euslisp/samplerobot-interface.l") | |
(setq *robot* (instance samplerobot-robot :init)) | |
(send *robot* :fix-leg-to-coords (make-coords)) | |
;; add additional end-coords | |
(let* ((parent-link | |
(elt (send *robot* :links) 0)) | |
) | |
(send *robot* :put :additional-end-coords | |
(make-cascoords :coords (send parent-link :copy-worldcoords) | |
:parent parent-link)) | |
) | |
(let* ((mt | |
(append (list (send *robot* :get :additional-end-coords)) | |
(send *robot* :legs :end-coords))) | |
(tc | |
(send-all mt :copy-worldcoords)) | |
(ll | |
(mapcar #'(lambda (c) (send *robot* :link-list (send c :parent))) mt)) | |
) | |
(pprint (mapcar #'(lambda (l) | |
(send-all l :name)) | |
ll)) | |
(with-append-root-joint ;; inverse-kinematics with base-link | |
(link-list-with-robot-6dof *robot* ll | |
:joint-class 6dof-joint) | |
(pprint link-list-with-robot-6dof) | |
)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
irtmodel.lをロードしてtestをした結果です.