def main(): if len(sys.argv) < 2: usage() return # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if sys.argv[1] == "--from-file": file_mode(sys.argv[2]) return # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sentence = " ".join([word for word in sys.argv[2:] if word[0] != '_']) if sentence: sentence_mode(sentence) else: rospy.init_node("gpsr_test_recognition") robot = get_robot_from_argv(index=1) speech_mode(robot)
#! /usr/bin/env python import rospy from robot_skills import get_robot_from_argv rospy.init_node("audio_test") robot = get_robot_from_argv(index=1) e = robot.ears s = robot.speech robot.head.look_at_standing_person() # data print(e.recognize("one", {})) print(e.recognize("two", {})) print(e.recognize("three", {})) print(e.recognize("four", {})) print(e.recognize("five", {})) print(e.recognize("six", {}))
#!/usr/bin/python import roslib; roslib.load_manifest('robot_smach_states') import rospy import sys import robot_skills import robot_smach_states.util.designators as ds from robot_smach_states.navigation import NavigateToPose, NavigateToObserve, NavigateToSymbolic, NavigateToWaypoint, \ NavigateToRoom if __name__ == "__main__": rospy.init_node('simple_navigate') robot = robot_skills.get_robot_from_argv(index=1) if len(sys.argv) > 2: room = sys.argv[2] else: room = "kitchen" rospy.sleep(2) # wait for tf cache to be filled #nav_state = NavigateToPose(robot, 1, 0, 0) #nav_state.execute() #nav_state = NavigateToObserve(robot, ds.EntityByIdDesignator(robot=robot, id="dinnertable")) #nav_state.execute() # nav_state = NavigateToSymbolic(robot, { # ds.EntityByIdDesignator(robot, id=room):"in"},