Skip to content

Commit

Permalink
Merge pull request jsk-ros-pkg#168 from k-okada/add_objects_test
Browse files Browse the repository at this point in the history
[test/default-ri-test.l] add test for :objects methods
  • Loading branch information
k-okada committed Aug 28, 2015
2 parents 4c35189 + 1ddca5d commit 8b9c45e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis
Submodule .travis updated 5 files
+3 −1 .travis.yml
+10 −0 CHANGELOG.rst
+2 −0 README.md
+1 −1 package.xml
+12 −6 travis.sh
2 changes: 1 addition & 1 deletion pr2eus/robot-interface.l
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@
(setq viewer (instance x::irtviewer :create :title (format nil "~A Kinematics Simulator" (send robot :name)) :view-name (send robot :name) :draw-floor t)))
(send viewer :objects (list robot))
(send self :draw-objects)
(send self :objects objs)
(if old-viewer (setq user::*viewer* old-viewer)))
(send self :objects objs)
(ros::advertise (cond
(pub-joint-states-topic pub-joint-states-topic)
(namespace
Expand Down
13 changes: 13 additions & 0 deletions pr2eus/test/default-ri-test.l
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@
(assert (send *ri* :worldcoords))
)

(deftest test-objects
(load "models/room610-scene.l")
(room610)
(setq *ri* (instance sample-robot-interface :init :objects (send *room610* :objects)))
(assert (send *ri* :objects) "robot-interface :objects")
)

;; this should be run in the last
(deftest test-objects-no-display
(setq x::*display* nil)
(setq *ri* (instance sample-robot-interface :init :objects (send *room610* :objects)))
(assert (send *ri* :objects) "robot-interface :objects")
)

(run-all-tests)
(exit)
Expand Down

0 comments on commit 8b9c45e

Please sign in to comment.