Skip to content

Commit

Permalink
[WIP] add test code for jsk-ros-pkg#508
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Mar 1, 2017
1 parent 2e89c48 commit 555752f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions roseus/msg/TestName.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
roseus/StringStamped name
16 changes: 16 additions & 0 deletions roseus/test/test-name-pub.l
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env roseus

(ros::load-ros-manifest "roseus")

(ros::roseus "test_name_pub")
(ros::advertise "test_name" roseus::TestName)
(ros::rate 1)
(setq i 0)
(while (ros::ok)
(setq ss (instance roseus::StringStamped :init :data (format nil "test ~A" (incf i))))
(setq msg (instance roseus::TestName :init :name ss))
(ros::ros-info "pub ~A" msg)
(ros::publish "test_name" msg)
(ros::sleep)
(ros::spin-once))

8 changes: 8 additions & 0 deletions roseus/test/test-name-sub.l
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env roseus

(ros::load-ros-manifest "roseus")

(ros::roseus "test_name_sub")
(ros::subscribe "test_name" roseus::TestName #'(lambda (msg) (ros::ros-info "sub ~A" msg)))
(ros::spin)

6 changes: 6 additions & 0 deletions roseus/test/test-name.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<launch>
<node name="test_name_pub" pkg="roseus" type="test-name-pub.l"
output="screen" />
<node name="test_name_sub" pkg="roseus" type="test-name-sub.l"
output="screen" />
</launch>

0 comments on commit 555752f

Please sign in to comment.