Skip to content

Commit

Permalink
Merge pull request #305 from tue-robotics/fix/remove-entrance-number-…
Browse files Browse the repository at this point in the history
…from-gpsr

Fix/remove entrance number from gpsr
  • Loading branch information
rokusottervanger committed May 30, 2017
2 parents 17db533 + 41d40b4 commit 1ecfa00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
12 changes: 3 additions & 9 deletions challenge_gpsr/src/gpsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,12 @@ def main():
skip = rospy.get_param('~skip', False)
restart = rospy.get_param('~restart', False)
robot_name = rospy.get_param('~robot_name')
entrance_no = rospy.get_param('~entrance_number', 0)
no_of_tasks = rospy.get_param('~number_of_tasks', 0)

rospy.loginfo("[GPSR] Parameters:")
rospy.loginfo("[GPSR] robot_name = {}".format(robot_name))
if skip:
rospy.loginfo("[GPSR] skip = {}".format(skip))
if entrance_no not in [1]:
rospy.logerr("[GPSR] entrance_number should be 1. You set it to {}".format(entrance_no))
else:
rospy.loginfo("[GPSR] entrance_number = {}".format(entrance_no))
entrance_no -= 1 # to transform to a 0-based index
if no_of_tasks:
rospy.loginfo("[GPSR] number_of_tasks = {}".format(no_of_tasks))
if restart:
Expand Down Expand Up @@ -83,7 +77,7 @@ def main():
if not skip and not restart:

# Wait for door, enter arena
s = StartChallengeRobust(robot, knowledge.initial_pose[entrance_no])
s = StartChallengeRobust(robot, knowledge.initial_pose)
s.execute()

# Move to the start location
Expand All @@ -105,7 +99,7 @@ def main():
robot.speech.speak("Moving to the meeting point.", block=False)
nwc = NavigateToWaypoint(robot=robot,
waypoint_designator=EntityByIdDesignator(robot=robot,
id=knowledge.starting_pose[entrance_no]),
id=knowledge.starting_pose),
radius=0.3)
nwc.execute()
# Report to the user and ask for a new task
Expand Down Expand Up @@ -190,7 +184,7 @@ def main():
if finished and not skip:
nwc = NavigateToWaypoint(robot=robot,
waypoint_designator=EntityByIdDesignator(robot=robot,
id=knowledge.exit_waypoint[entrance_no]),
id=knowledge.exit_waypoint),
radius = 0.3)
nwc.execute()
robot.speech.speak("Thank you very much, and goodbye!", block=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@
"All this noise is messing with my audio. Try again"
]

initial_pose = ["initial_pose",
"initial_pose_2"] # initial pose
starting_pose = ["gpsr_meeting_point_1",
"gpsr_meeting_point_2"] # Designated pose to wait for commands
exit_waypoint = ["gpsr_exit_door_1",
"gpsr_exit_door_2"] # Door through which to exit the arena
initial_pose = "initial_pose"
starting_pose = "gpsr_meeting_point"
exit_waypoint = "gpsr_exit_door"

grammar_target = "T"

Expand Down

0 comments on commit 1ecfa00

Please sign in to comment.