From 555752f3c70680618bdbd8a634fc9a1a60e710ef Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Wed, 1 Mar 2017 13:33:51 +0900 Subject: [PATCH] [WIP] add test code for #508 --- roseus/msg/TestName.msg | 1 + roseus/test/test-name-pub.l | 16 ++++++++++++++++ roseus/test/test-name-sub.l | 8 ++++++++ roseus/test/test-name.test | 6 ++++++ 4 files changed, 31 insertions(+) create mode 100644 roseus/msg/TestName.msg create mode 100755 roseus/test/test-name-pub.l create mode 100755 roseus/test/test-name-sub.l create mode 100644 roseus/test/test-name.test diff --git a/roseus/msg/TestName.msg b/roseus/msg/TestName.msg new file mode 100644 index 000000000..dce4ea5d0 --- /dev/null +++ b/roseus/msg/TestName.msg @@ -0,0 +1 @@ +roseus/StringStamped name diff --git a/roseus/test/test-name-pub.l b/roseus/test/test-name-pub.l new file mode 100755 index 000000000..c0367dbb4 --- /dev/null +++ b/roseus/test/test-name-pub.l @@ -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)) + diff --git a/roseus/test/test-name-sub.l b/roseus/test/test-name-sub.l new file mode 100755 index 000000000..b7d300a22 --- /dev/null +++ b/roseus/test/test-name-sub.l @@ -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) + diff --git a/roseus/test/test-name.test b/roseus/test/test-name.test new file mode 100644 index 000000000..e427428fa --- /dev/null +++ b/roseus/test/test-name.test @@ -0,0 +1,6 @@ + + + +