@ -278,8 +278,8 @@ class CollectHeadCalibrationDataNode:
max_pan_angle_rad = 1.3
if collect_check_data:
number_of_tilt_steps = 2 #4
number_of_pan_steps = 3 #7
number_of_tilt_steps = 1
number_of_pan_steps = 3
else:
number_of_tilt_steps = 3 #4
number_of_pan_steps = 5 #7
@ -320,37 +320,33 @@ class CollectHeadCalibrationDataNode:
rospy.loginfo('COLLECT GLOBAL HEAD LOOKING UP DATA')
rospy.loginfo('*************************************')
rospy.loginfo('')
if collect_check_data:
tilt_angles_rad = [-0.38]
pan_angles_rad = [-3.8, 1.33]
else:
if not collect_check_data:
tilt_angles_rad = [-0.3, 0.38]
pan_angles_rad = [-3.8, -1.66, 1.33]
rospy.loginfo('Move to a new arm pose.')
lift_m = 0.92
lift_pose = {'joint_lift': lift_m}
self.move_to_pose(lift_pose)
wrist_extension = 0.29
wrist_pose = {'wrist_extension': wrist_extension}
self.move_to_pose(wrist_pose)
rospy.loginfo('Move to a new arm pose.')
lift_m = 0.92
lift_pose = {'joint_lift': lift_m}
self.move_to_pose(lift_pose)
wrist_extension = 0.29
wrist_pose = {'wrist_extension': wrist_extension}
self.move_to_pose(wrist_pose)
# wait for the joints and sensors to settle
rospy.loginfo('Wait {0} seconds for the robot to settle after motion of the arm.'.format(wrist_motion_settle_time))
rospy.sleep(wrist_motion_settle_time)
# wait for the joints and sensors to settle
rospy.loginfo('Wait {0} seconds for the robot to settle after motion of the arm.'.format(wrist_motion_settle_time))
rospy.sleep(wrist_motion_settle_time)
rospy.loginfo('Starting to collect global head looking up data (expect to collect {0} samples).'.format(len(pan_angles_rad) * len(tilt_angles_rad)))
first_pan_tilt = True
for pan_angle in pan_angles_rad:
for tilt_angle in tilt_angles_rad:
observation = self.get_samples(pan_angle, tilt_angle, wrist_extension, number_of_samples_per_head_pose, first_move=first_pan_tilt)
first_pan_tilt = False
calibration_data.extend(observation)
n = len(calibration_data)
if (n % 10) == 0:
rospy.loginfo('{0} samples collected so far.'.format(n))
rospy.loginfo('Starting to collect global head looking up data (expect to collect {0} samples).'.format(len(pan_angles_rad) * len(tilt_angles_rad)))
first_pan_tilt = True
for pan_angle in pan_angles_rad:
for tilt_angle in tilt_angles_rad:
observation = self.get_samples(pan_angle, tilt_angle, wrist_extension, number_of_samples_per_head_pose, first_move=first_pan_tilt)
first_pan_tilt = False
calibration_data.extend(observation)
n = len(calibration_data)
if (n % 10) == 0:
rospy.loginfo('{0} samples collected so far.'.format(n))
#######################################
##