39 import roslib; roslib.load_manifest(
'velma_task_cs_ros_interface')
43 from velma_common
import *
44 from rcprg_ros_utils
import exitError
46 if __name__ ==
"__main__":
48 rospy.init_node(
'test_init', anonymous=
False)
52 print "This test/tutorial executes initialization"\
53 " procedures required for robot operation.\n" 55 print "Running python interface for Velma..." 56 velma = VelmaInterface()
57 print "Waiting for VelmaInterface initialization..." 58 if not velma.waitForInit(timeout_s=10.0):
59 print "Could not initialize VelmaInterface\n" 61 print "Initialization ok!\n" 63 print "Motors must be enabled every time after the robot enters safe state." 64 print "If the motors are already enabled, enabling them has no effect." 65 print "Enabling motors..." 66 if velma.enableMotors() != 0:
69 print "Also, head motors must be homed after start-up of the robot." 70 print "Sending head pan motor START_HOMING command..." 72 if velma.waitForHP() != 0:
74 print "Head pan motor homing successful." 76 print "Sending head tilt motor START_HOMING command..." 78 if velma.waitForHT() != 0:
80 print "Head tilt motor homing successful."