diff --git a/jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample-eye-rotation.l b/jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample-eye-rotation.l new file mode 100755 index 0000000000..8cb0fe26f8 --- /dev/null +++ b/jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample-eye-rotation.l @@ -0,0 +1,28 @@ +#!/usr/bin/env roseus + +(ros::load-ros-manifest "geometry_msgs") +(load "package://spoteus/spot-interface.l") +(spot-init) + +(setq *pi* 3.14159265358979) + +(setq *right-eye-topic* "/right_eye/look_at") +(setq *left-eye-topic* "/left_eye/look_at") + +(setq *right-eye-target* (instance geometry_msgs::Point :init)) +(setq *left-eye-target* (instance geometry_msgs::Point :init)) + +(ros::advertise *right-eye-topic* geometry_msgs::Point 1) +(ros::advertise *left-eye-topic* geometry_msgs::Point 1) + +(setq index 0) +(ros::rate 10) +(while (ros::ok) + (ros::sleep) + (send *right-eye-target* :x (cos (/ (* 2 *pi* index) 10))) + (send *right-eye-target* :y (sin (/ (* 2 *pi* index) 10))) + (send *left-eye-target* :x (cos (/ (* 2 *pi* index) 10))) + (send *left-eye-target* :y (sin (/ (* 2 *pi* index) 10))) + (ros::publish *right-eye-topic* *right-eye-target*) + (ros::publish *left-eye-topic* *left-eye-target*) + ) diff --git a/jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample_eye_rotation.app b/jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample_eye_rotation.app new file mode 100644 index 0000000000..a40a8065c1 --- /dev/null +++ b/jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample_eye_rotation.app @@ -0,0 +1,4 @@ +display: Sample Eye Rotation +platform: spot +launch: jsk_spot_startup/sample_eye_rotation.xml +interface: jsk_spot_startup/sample_eye_rotation.interface diff --git a/jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample_eye_rotation.interface b/jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample_eye_rotation.interface new file mode 100644 index 0000000000..c27c9c296e --- /dev/null +++ b/jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample_eye_rotation.interface @@ -0,0 +1,3 @@ +published_topics: {} +subscribed_topics: {} + diff --git a/jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample_eye_rotation.xml b/jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample_eye_rotation.xml new file mode 100644 index 0000000000..5d9a754f10 --- /dev/null +++ b/jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample_eye_rotation.xml @@ -0,0 +1,3 @@ + + +