test_fiducial.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 import roslib
3 roslib.load_manifest('turtlebot_actions')
4 
5 import rospy
6 
7 import os
8 import sys
9 import time
10 
11 from turtlebot_actions.msg import *
12 from actionlib_msgs.msg import *
13 
14 
15 import actionlib
16 
17 
18 def main():
19  rospy.init_node("find_fiducial_pose_test")
20 
21  # Construct action ac
22  rospy.loginfo("Starting action client...")
23  action_client = actionlib.SimpleActionClient('find_fiducial_pose', FindFiducialAction)
24  action_client.wait_for_server()
25  rospy.loginfo("Action client connected to action server.")
26 
27  # Call the action
28  rospy.loginfo("Calling the action server...")
29  action_goal = FindFiducialGoal()
30  action_goal.camera_name = "/camera/rgb"
31  action_goal.pattern_width = 7
32  action_goal.pattern_height = 6
33  action_goal.pattern_size = 0.027
34  action_goal.pattern_type = 1 # CHESSBOARD
35 
36  if action_client.send_goal_and_wait(action_goal, rospy.Duration(50.0), rospy.Duration(50.0)) == GoalStatus.SUCCEEDED:
37  rospy.loginfo('Call to action server succeeded')
38  else:
39  rospy.logerr('Call to action server failed')
40 
41 
42 if __name__ == "__main__":
43  main()


turtlebot_actions
Author(s): Helen Oleynikova, Melonee Wise
autogenerated on Mon Jun 10 2019 15:43:57