forked from jsk-ros-pkg/jsk_roseus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] add test code for jsk-ros-pkg#508
- Loading branch information
Showing
5 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
roseus/StringStamped name |
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
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)) | ||
|
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
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) | ||
|
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
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> |