Functions | Variables
kelsey_sandbox::simple_grasp_learner Namespace Reference

Functions

def calc_false_pos
def calc_model
def change_projector_mode
def collect_grasp_data
def compute_sqr_diff_map
def create_goal_pose
def create_gripper_pose
def detect_tabletop_objects
def die
def display_grasp_data
def downward_grasp
def file_exists
def generate_space_models
def get_grasp_model
def get_gripper_pose
def get_laser_dclick
def get_xyr_list
def grasp_closest_object
def grasp_demo
def grasp_loader
def grasp_object
def hand_over_object
def is_obj_in_gripper
def laser_interface_demo
def load_current_zeros
def load_data_and_generate
def load_grasp
def load_grasp
def load_parameters
def load_pickle
def log
def main
def monitor_pressure
def move_to_grasp_pos
def move_to_setup
def normalize_rot
def open_gripper
def pauser
def perform_grasp
def point_head
def print_configs
def process_data
def random_grasp
def random_known_grasp
def resample_split_model_data
def save_current_zeros
def save_grasp
def save_grasp_configurations
def save_parameters
def save_pickle
def setup_package_loc
def split_model_data
def sqr_diff_viz
def test_num_samples
def test_random_grasps
def transform_in_frame
 Transforms the given position by the offset position in the given quaternion rotation frame.
def trim_bad_grasps
def trim_test_data
def upward_lift
def visualize_objs
def write_index_file

Variables

int ARM = 0
string armc = 'r'
float BIAS_RADIUS = 0.012
 collided
float DETECT_ERROR = 0.02
 grasp
string GRASP_CONFIGS_FILE = "grasp_configs.pickle"
string GRASP_DATA_FILE = "grasp_data.pickle"
string GRASP_DATA_INDEX_FILE = "data_indexed//grasp_data_index.pickle"
string GRASP_DATA_PREFIX = "data_indexed//grasp_data"
float GRASP_DIST = 0.30
string GRASP_IND_PREFIX = "model_indexed//grasp_model"
string GRASP_INDEX_FILE = "model_indexed//grasp_model_index.pickle"
string GRASP_MODELS_FILE = "grasp_models.pickle"
string GRASP_MODELS_TRIMMED_FILE = "grasp_models_trimmed.pickle"
float GRASP_TIME = 2.0
float GRASP_VELOCITY = 0.28
tuple GRIPPER_POINT = np.array([0.23, 0.0, 0.0])
float HOVER_Z = 0.10
list JOINTS_BIAS = [0., -.25, -1., 0., 0., 0.5, 0.]
int MONITOR_WINDOW = 50
 STD_DEV_DICT = None.
string node_name = "simple_grasp_learner"
float NOISE_DEV = 0.0
int NUM_N = 3
int NUM_ROT = 6
int NUM_X = 7
int NUM_Y = 11
 PERCEPT_GRASP_LIST = None
 PERCEPT_MON_LIST = None
string PICKLES_LOC = "//src//hrl_pr2_lib//pickles//"
list PRESSURE_LIST
tuple RECT = ((0.45, 0.25), (0.70, -0.25))
float SETUP_VELOCITY = 0.4
string SQR_DIFF_MAP = "sqr_diff_map.pickle"
float STD_DEV = 2.3
dictionary STD_DEV_DICT
string TEST_DATA_FILE = "test_data.pickle"
dictionary TOL_THRESH_DICT
string ZEROS_FILE = "current_zeros.pickle"

Function Documentation

def kelsey_sandbox.simple_grasp_learner.calc_false_pos (   test_data = None,
  xyr_index = None,
  apm = None 
)

Definition at line 1229 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.calc_model (   x,
  y,
  r,
  window_len = 200,
  samples = 50,
  xyr_index = None,
  resample = 10 
)

Definition at line 1125 of file simple_grasp_learner.py.

Definition at line 1393 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.collect_grasp_data (   ki,
  generate_models = False,
  skip_grasp = False 
)

Definition at line 313 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.compute_sqr_diff_map (   percept = "accelerometer")

Definition at line 1039 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.create_goal_pose (   x,
  y,
  z,
  gripper_pose 
)

Definition at line 213 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.create_gripper_pose (   x,
  y,
  z,
  quat 
)

Definition at line 198 of file simple_grasp_learner.py.

Definition at line 829 of file simple_grasp_learner.py.

Definition at line 805 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.display_grasp_data (   grasps,
  percept = "accelerometer",
  indicies = range(3),
  std_dev = STD_DEV,
  noise_dev_add = NOISE_DEV,
  monitor_data = [],
  std_dev_dict = STD_DEV_DICT,
  tol_thresh_dict = TOL_THRESH_DICT,
  model_zeros = None,
  monitor_zeros = None,
  plot_data = False,
  colors = None 
)

Definition at line 710 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.downward_grasp (   cm,
  goal_pose,
  block = True 
)

Definition at line 236 of file simple_grasp_learner.py.

Definition at line 121 of file simple_grasp_learner.py.

Definition at line 412 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.get_grasp_model (   x,
  y,
  r,
  xyr_index = None,
  grasp_data = None,
  no_wait = True 
)

Definition at line 1003 of file simple_grasp_learner.py.

Definition at line 206 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.get_laser_dclick (   tf_listener,
  frame = "/torso_lift_link",
  delay_time = 3.0 
)

Definition at line 1323 of file simple_grasp_learner.py.

Definition at line 189 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.grasp_closest_object (   x,
  y,
  grasp = None,
  collide = True,
  repeat = True,
  zeros = None,
  cm = None,
  apm = None 
)

Definition at line 864 of file simple_grasp_learner.py.

Definition at line 917 of file simple_grasp_learner.py.

Definition at line 985 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.grasp_object (   obj,
  grasp = None,
  collide = True,
  is_place = False,
  zeros = None,
  cm = None,
  apm = None 
)

Definition at line 856 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.hand_over_object (   x,
  y,
  z,
  cm,
  apm,
  offset = 0.2,
  blocking = True 
)

Definition at line 1368 of file simple_grasp_learner.py.

Definition at line 507 of file simple_grasp_learner.py.

Definition at line 1408 of file simple_grasp_learner.py.

Definition at line 504 of file simple_grasp_learner.py.

Definition at line 399 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.load_grasp (   xyr,
  xyr_index = GRASP_DATA_INDEX_FILE 
)

Definition at line 1000 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.load_grasp (   x,
  y,
  r,
  xyr_index = None 
)

Definition at line 1031 of file simple_grasp_learner.py.

Definition at line 163 of file simple_grasp_learner.py.

Definition at line 113 of file simple_grasp_learner.py.

Definition at line 110 of file simple_grasp_learner.py.

Definition at line 1484 of file simple_grasp_learner.py.

Definition at line 1426 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.move_to_grasp_pos (   cm,
  grasp_pose,
  block = True 
)

Definition at line 221 of file simple_grasp_learner.py.

Definition at line 1403 of file simple_grasp_learner.py.

Definition at line 978 of file simple_grasp_learner.py.

Definition at line 512 of file simple_grasp_learner.py.

Definition at line 294 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.perform_grasp (   x,
  y,
  z = None,
  gripper_rot = np.pi / 2.,
  grasp = None,
  is_place = False,
  is_grasp = True,
  collide = True,
  return_pose = True,
  zeros = None,
  grasp_data = None,
  cm = None,
  apm = None 
)

Definition at line 519 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.point_head (   point,
  velocity = 0.6,
  frame = "/torso_lift_link",
  block = True 
)

Definition at line 1347 of file simple_grasp_learner.py.

Definition at line 277 of file simple_grasp_learner.py.

Definition at line 1112 of file simple_grasp_learner.py.

Definition at line 1184 of file simple_grasp_learner.py.

Definition at line 1192 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.resample_split_model_data (   apm,
  models = None,
  sampling_rate = 4 
)

Definition at line 969 of file simple_grasp_learner.py.

Definition at line 498 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.save_grasp (   grasp,
  prefix 
)

Definition at line 952 of file simple_grasp_learner.py.

Definition at line 245 of file simple_grasp_learner.py.

Definition at line 131 of file simple_grasp_learner.py.

Definition at line 117 of file simple_grasp_learner.py.

Definition at line 125 of file simple_grasp_learner.py.

Definition at line 957 of file simple_grasp_learner.py.

Definition at line 1096 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.test_num_samples (   percept = "accelerometer")

Definition at line 808 of file simple_grasp_learner.py.

Definition at line 1197 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.transform_in_frame (   pos,
  quat,
  off_point 
)

Transforms the given position by the offset position in the given quaternion rotation frame.

Parameters:
posthe current positions
quatquaternion representing the rotation of the frame
off_pointoffset to move the position inside the quat's frame
Returns:
the new position as a matrix column

Definition at line 176 of file simple_grasp_learner.py.

Definition at line 284 of file simple_grasp_learner.py.

Definition at line 943 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.upward_lift (   cm,
  grasp_pose,
  block = True 
)

Definition at line 228 of file simple_grasp_learner.py.

Definition at line 1303 of file simple_grasp_learner.py.

def kelsey_sandbox.simple_grasp_learner.write_index_file (   prefix = GRASP_DATA_PREFIX,
  index = GRASP_DATA_INDEX_FILE 
)

Definition at line 304 of file simple_grasp_learner.py.


Variable Documentation

Definition at line 51 of file simple_grasp_learner.py.

Definition at line 53 of file simple_grasp_learner.py.

Definition at line 61 of file simple_grasp_learner.py.

Definition at line 519 of file simple_grasp_learner.py.

Definition at line 68 of file simple_grasp_learner.py.

Definition at line 985 of file simple_grasp_learner.py.

Definition at line 96 of file simple_grasp_learner.py.

Definition at line 97 of file simple_grasp_learner.py.

string kelsey_sandbox::simple_grasp_learner::GRASP_DATA_INDEX_FILE = "data_indexed//grasp_data_index.pickle"

Definition at line 104 of file simple_grasp_learner.py.

string kelsey_sandbox::simple_grasp_learner::GRASP_DATA_PREFIX = "data_indexed//grasp_data"

Definition at line 105 of file simple_grasp_learner.py.

Definition at line 57 of file simple_grasp_learner.py.

string kelsey_sandbox::simple_grasp_learner::GRASP_IND_PREFIX = "model_indexed//grasp_model"

Definition at line 102 of file simple_grasp_learner.py.

string kelsey_sandbox::simple_grasp_learner::GRASP_INDEX_FILE = "model_indexed//grasp_model_index.pickle"

Definition at line 103 of file simple_grasp_learner.py.

Definition at line 98 of file simple_grasp_learner.py.

Definition at line 99 of file simple_grasp_learner.py.

Definition at line 63 of file simple_grasp_learner.py.

Definition at line 58 of file simple_grasp_learner.py.

Definition at line 59 of file simple_grasp_learner.py.

Definition at line 56 of file simple_grasp_learner.py.

list kelsey_sandbox::simple_grasp_learner::JOINTS_BIAS = [0., -.25, -1., 0., 0., 0.5, 0.]

Definition at line 60 of file simple_grasp_learner.py.

STD_DEV_DICT = None.

Definition at line 93 of file simple_grasp_learner.py.

string kelsey_sandbox::simple_grasp_learner::node_name = "simple_grasp_learner"

Definition at line 108 of file simple_grasp_learner.py.

Definition at line 67 of file simple_grasp_learner.py.

Definition at line 46 of file simple_grasp_learner.py.

Definition at line 47 of file simple_grasp_learner.py.

Definition at line 44 of file simple_grasp_learner.py.

Definition at line 45 of file simple_grasp_learner.py.

Definition at line 86 of file simple_grasp_learner.py.

Definition at line 85 of file simple_grasp_learner.py.

string kelsey_sandbox::simple_grasp_learner::PICKLES_LOC = "//src//hrl_pr2_lib//pickles//"

Definition at line 95 of file simple_grasp_learner.py.

Initial value:
00001 ["r_finger_periph_pressure", 
00002                 "r_finger_pad_pressure", 
00003                 "l_finger_periph_pressure",
00004                 "l_finger_pad_pressure"]

Definition at line 87 of file simple_grasp_learner.py.

tuple kelsey_sandbox::simple_grasp_learner::RECT = ((0.45, 0.25), (0.70, -0.25))

Definition at line 49 of file simple_grasp_learner.py.

Definition at line 64 of file simple_grasp_learner.py.

Definition at line 101 of file simple_grasp_learner.py.

Definition at line 66 of file simple_grasp_learner.py.

Initial value:
00001 { "accelerometer" : np.array([2.4, 2.9, 2.9]),
00002                  "joint_angles" : np.array([2.8, 2.8, 3.8, 2.8, 400.0, 1.25, 400.0]),
00003                  "joint_efforts" : np.array([30.0, 15.0, 11.0, 16.0, 12.0, 3.0, 125.0]),
00004                  "joint_velocities" : np.array([3.4, 6.4, 18.4, 3.4, 3.4, 3.4, 3.4]),
00005                  "r_finger_periph_pressure" : np.array([60.0]*6), 
00006                  "r_finger_pad_pressure" : np.array([60.0]*15), 
00007                  "l_finger_periph_pressure" : np.array([60.0]*6), 
00008                  "l_finger_pad_pressure" : np.array([60.0]*15) }

Definition at line 69 of file simple_grasp_learner.py.

Definition at line 106 of file simple_grasp_learner.py.

Initial value:
00001 { "accelerometer" : np.array([0.3, 0.3, 0.3]),
00002                     "joint_velocities" : np.array([0.45]*7),
00003                     "joint_angles" : np.array([0.05, 0.05, 0.05, 0.05, 0.05, 0.04, 0.05]),
00004                     "joint_efforts" : np.array([3.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]),
00005                     "r_finger_periph_pressure" : np.array([10.0]*6), 
00006                     "r_finger_pad_pressure" : np.array([10.0]*15), 
00007                     "l_finger_periph_pressure" : np.array([10.0]*6), 
00008                     "l_finger_pad_pressure" : np.array([10.0]*15) }

Definition at line 77 of file simple_grasp_learner.py.

string kelsey_sandbox::simple_grasp_learner::ZEROS_FILE = "current_zeros.pickle"

Definition at line 100 of file simple_grasp_learner.py.



kelsey_sandbox
Author(s): kelsey
autogenerated on Wed Nov 27 2013 11:52:04