Skip to content

Commit

Permalink
add test-self-collision-check-pqp/bullet
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Jun 15, 2020
1 parent 5446753 commit f8f46f9
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions irteus/test/test-collision.l
Expand Up @@ -194,6 +194,22 @@
)
))

(load "models/darwin.l")
;; use add no-face link for euscollada-robot, use darwin-robot to override
(defmethod darwin-robot
;; make collision model from faces or gl-vertices
(:make-collision-model-for-links
(&key (fat 0) ((:links ls) (send self :links)))
;;
;; for append camera links for test code
(let (l)
(setq l (instance bodyset-link :init (make-cascoords) :name "dummy-link"))
(send (car links) :add-child-links l)
(setq links (append links (list l)))
(setq ls (send self :links)))
)
)

(when *collision-algorithm-pqp*

(deftest test-collision-sphere-analytical-pqp
Expand Down Expand Up @@ -249,6 +265,7 @@
(test-collision-distance-fat
(body+ (make-cube 200 200 100) (make-cube 100 100 300))
(body+ (make-cube 200 200 100) (make-cube 100 100 300))))

)

(when *collision-algorithm-bullet*
Expand Down Expand Up @@ -309,6 +326,24 @@

)

;; not sure why, but put this function within (when *collision-algorithm-pqp* causes errors...
(deftest test-self-collision-check-pqp
(when *collision-algorithm-pqp*
(setq *collision-algorithm* *collision-algorithm-pqp*)
(let (robot)
(setq robot (instance darwin-robot :init))
(send robot :self-collision-check)
)))


(deftest test-self-collision-check-bullet
(when *collision-algorithm-bullet*
(setq *collision-algorithm* *collision-algorithm-bullet*)
(let (robot)
(setq robot (instance darwin-robot :init))
(send robot :self-collision-check)
)))

(eval-when (load eval)
(run-all-tests)
(exit 0))

0 comments on commit f8f46f9

Please sign in to comment.