Go to the documentation of this file.00001
00002 import numpy as np
00003
00004 DANGEROUS_CB_COOLDOWN = 5.0
00005 CONTACT_CB_COOLDOWN = 0.5
00006 TIMEOUT_CB_COOLDOWN = 20.0
00007
00008 APPROACH_VELOCITY = 0.0025
00009 GLOBAL_VELOCITY = 0.0025
00010 HEIGHT_STEP = 0.17
00011 LATITUDE_STEP = 0.12
00012 LOCAL_VELOCITY = 0.0025
00013 LONGITUDE_STEP = 0.06
00014 RETREAT_HEIGHT = 1.65
00015 SAFETY_RETREAT_HEIGHT = 2.5
00016 SAFETY_RETREAT_VELOCITY = 0.0150
00017 SLOW_RETREAT_VELOCITY = 0.0200
00018 SHAVE_HEIGHT = 0.8
00019 TIMEOUT_TIME = 30.0
00020 HEIGHT_CLOSER_ADJUST = 0.5
00021 TRIM_RETREAT_LATITUDE = 1.9
00022
00023 LAT_BOUNDS = {'r' : (np.pi/8, 7*np.pi/8), 'l' : (np.pi/8, 7*np.pi/8)}
00024
00025 LON_BOUNDS = {'r' : (-5*np.pi/8, np.pi/8), 'l' : (-np.pi/8, 5*np.pi/8)}
00026 HEIGHT_BOUNDS = {'r' : (0.2, 3.5), 'l' : (0.2, 3.5)}
00027
00028 outcomes_spa = ['succeeded','preempted','aborted']
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 class Messages:
00047 ENABLE_CONTROLLER = "Enabling ellipsoidal controller. Arm may twitch as it switches controllers."
00048 NO_PARAMS_LOADED = "Cannot enable ellipsoidal controller. Must first register head."
00049 ARM_AWAY_FROM_HEAD = "Cannot enable ellipsoidal controller. Tool must be setup near head."
00050 DISABLE_CONTROLLER = "Disabling ellipsoidal controller. You must reenable to give more commands."
00051 DANGEROUS_FORCE = "Dangerous force over %.1f N detected, retreating from face."
00052 TIMEOUT_RETREAT = "Timeout from lack of contact over %.0f s, retreating from face."
00053 CONTACT_FORCE = "Arm stopped due to sensing contact force over %.1f N."
00054 GLOBAL_START = "Global ellipsoid move to pose %s running."
00055 GLOBAL_PREEMPT = "Global ellipsoid move to pose %s preempted."
00056 GLOBAL_SUCCESS = "Global ellipsoid move to pose %s successful."
00057 LOCAL_START = "Local ellipsoid move %s running."
00058 ROT_RESET_START = "Running reset rotation movement. The tool should rotate perpendicular to the head."
00059 LOCAL_PREEMPT = "Local ellipsoid move %s preempted."
00060 LOCAL_SUCCESS = "Local ellipsoid move %s successful."
00061
00062
00063 button_names_dict = {
00064 'translate_up' : "translate up",
00065 'translate_down' : "translate down",
00066 'translate_left' : "translate left",
00067 'translate_right' : "translate right",
00068 'translate_in' : "translate in",
00069 'translate_out' : "translate out",
00070
00071 'rotate_y_neg' : "rotate down",
00072 'rotate_y_pos' : "rotate up",
00073 'rotate_z_neg' : "rotate left",
00074 'rotate_z_pos' : "rotate right",
00075 'rotate_x_neg' : "rotate clockwise",
00076 'rotate_x_pos' : "rotate counter clockwise",
00077
00078 'reset_rotation' : "reset rotation",
00079 }