caroline.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import roslib
00004 roslib.load_manifest('pr2_simple_interface')
00005 roslib.load_manifest('sound_play')
00006 #import rospy
00007 
00008 #rospy.init_node('steve_demo')
00009 from pr2_simple_interface import *
00010 from sound_play.msg import SoundRequest
00011 from sound_play.libsoundplay import SoundClient
00012 start()
00013 #############################################################
00014 # HowTo:
00015 # 
00016 # Look around:
00017 # head.look_at( 1.0, [left+/right-], [ up>1, down <1 ])
00018 #
00019 # Open grippers:
00020 # gripper.rel( [LEFT | RIGHT | BOTH] )
00021 #
00022 # Close grippers
00023 # gripper.close( [LEFT | RIGHT | BOTH] )
00024 #
00025 # Wait for slap on gripper
00026 # gripper.wait_for_slap( [LEFT | RIGHT | BOTH] )
00027 #
00028 # Move torso up/down
00029 # torso.set( [height] )
00030 #
00031 # Move arms
00032 # arm.move_to([-1.42, 0.640, 0.647, -1.925, 30.931, -0.521, -16.642], RIGHT)
00033 #             [ position ], [ LEFT | RIGHT | BOTH] )
00034 # arm.move_to([shoulder_pan,shoulder_life
00035 #
00036 # Speech:
00037 # sound.say("Something")
00038 
00039 
00040 gripper = Gripper()
00041 arm = RobotArm()
00042 head = Head()
00043 torso = Torso()
00044 sound = SoundClient()
00045 
00046 rospy.sleep(1.)
00047 
00048 head.look_at(1.0, 0.0, 1.0)
00049 head.wait_for()
00050 
00051 while True:
00052     head.random_look_at_face()
00053     head.wait_for()
00054     rospy.sleep(3.)
00055 
00056 


pr2_simple_interface
Author(s): Austin Hendrix
autogenerated on Wed Aug 26 2015 15:37:23