Skip to content

Commit

Permalink
(jsk-ros-pkg/issues/41) euscollada/src/euscollada-robot*.l : move col…
Browse files Browse the repository at this point in the history
…lision model codes to irtrobot.l euslisp/jskeus#93
  • Loading branch information
nozawa authored and nozawa committed May 24, 2014
1 parent 8ac1ef1 commit 7a23aca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 40 deletions.
21 changes: 1 addition & 20 deletions euscollada/src/euscollada-robot.l
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
(l . inertia-tensor))))
)
(send-super :init-ending)
(dolist (l (send self :links)) (send self :make-detail-collision-model-from-glvertices-for-one-link l))
(send self :make-collision-model-for-links)

;;
(dolist (j (mapcan #'(lambda (x) (if (and (derivedp (cdr x) joint)
Expand Down Expand Up @@ -53,25 +53,6 @@
))
args)
))
;; make collision model from gl-vertices
(:make-detail-collision-model-from-glvertices-for-one-link
(ll &key (fat 0) (collision-func 'pqp-collision-check))
(unless (send ll :get (read-from-string (format nil ":~Amodel"
(string-right-trim "-COLLISION-CHECK" (string collision-func)))))
(send-message ll cascaded-coords
(read-from-string
(format nil ":make-~Amodel"
(string-right-trim "-COLLISION-CHECK" (string collision-func))))
:fat fat
:faces (flatten (mapcar #'(lambda (x)
(cond
((and (derivedp x collada-body)
(x . glvertices))
(send (x . glvertices) :convert-to-faces :wrt :world))
(t
(send x :faces))))
(send ll :bodies)))))
)
)

;; copy euscollada-body class definition from euscollada/src/euscollada-robot.l
Expand Down
21 changes: 1 addition & 20 deletions euscollada/src/euscollada-robot_urdfmodel.l
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
(defmethod euscollada-robot
(:init-ending ()
(send-super :init-ending)
(dolist (l (send self :links))
(send self :make-detail-collision-model-from-glvertices-for-one-link l))
(send self :make-collision-model-for-links)
;;
(dolist (j (mapcan #'(lambda (x) (if (and (derivedp (cdr x) joint)
(not (memq (cdr x) (send self :joint-list))))
Expand Down Expand Up @@ -43,24 +42,6 @@
))
args)
))
;; make collision model from gl-vertices
(:make-detail-collision-model-from-glvertices-for-one-link
(ll &key (fat 0) (collision-func 'pqp-collision-check))
(unless (send ll :get (read-from-string (format nil ":~Amodel"
(string-right-trim "-COLLISION-CHECK" (string collision-func)))))
(send-message ll cascaded-coords
(read-from-string
(format nil ":make-~Amodel"
(string-right-trim "-COLLISION-CHECK" (string collision-func))))
:fat fat
:faces (flatten (mapcar #'(lambda (x)
(cond
((derivedp x collada-body)
(send (x . glvertices) :convert-to-faces :wrt :world))
(t
(send x :faces))))
(send ll :bodies)))))
)
)

(defclass collada-body
Expand Down

0 comments on commit 7a23aca

Please sign in to comment.