forked from jsk-ros-pkg/jsk_robot
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[jsk_spot_startup] add sample_eye_rotation app
- Loading branch information
1 parent
a0a214c
commit 55ab219
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample-eye-rotation.l
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,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*) | ||
) |
4 changes: 4 additions & 0 deletions
4
jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample_eye_rotation.app
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,4 @@ | ||
display: Sample Eye Rotation | ||
platform: spot | ||
launch: jsk_spot_startup/sample_eye_rotation.xml | ||
interface: jsk_spot_startup/sample_eye_rotation.interface |
3 changes: 3 additions & 0 deletions
3
jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample_eye_rotation.interface
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,3 @@ | ||
published_topics: {} | ||
subscribed_topics: {} | ||
|
3 changes: 3 additions & 0 deletions
3
jsk_spot_robot/jsk_spot_startup/apps/sample_eye_rotation/sample_eye_rotation.xml
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,3 @@ | ||
<launch> | ||
<node pkg="jsk_spot_startup" type="sample-eye-rotation.l" name="sample_eye_rotation"/> | ||
</launch> |