src/conntact/assembly_tools.py
def read_peg_hole_dimensions(self):
        """Read peg and hole data from YAML configuration file.
        """
        peg_diameter         = rospy.get_param('/objects/'+self.target_peg+'/dimensions/diameter')/1000 #mm
        peg_tol_plus         = rospy.get_param('/objects/'+self.target_peg+'/tolerance/upper_tolerance')/1000
        peg_tol_minus        = rospy.get_param('/objects/'+self.target_peg+'/tolerance/lower_tolerance')/1000
        hole_diameter        = rospy.get_param('/objects/'+self.target_hole+'/dimensions/diameter')/1000 #mm
        hole_tol_plus        = rospy.get_param('/objects/'+self.target_hole+'/tolerance/upper_tolerance')/1000
        hole_tol_minus       = rospy.get_param('/objects/'+self.target_hole+'/tolerance/lower_tolerance')/1000    
        self.hole_depth      = rospy.get_param('/objects/'+self.target_peg+'/dimensions/min_insertion_depth')/1000
        
        #setup, run to calculate useful values based on params:
        self.clearance_max = hole_tol_plus - peg_tol_minus #calculate the total error zone;
        self.clearance_min = hole_tol_minus + peg_tol_plus #calculate minimum clearance;     =0
        self.clearance_avg = .5 * (self.clearance_max- self.clearance_min) #provisional calculation of "wiggle room"
        self.safe_clearance = (hole_diameter-peg_diameter + self.clearance_min)/2;
Read peg and hole data from YAML configuration file.
        
Read peg and hole data from YAML configuration file.
Read peg and hole data from YAML configuration file .
def read_peg_hole_dimensions(self):
        peg_diameter         = rospy.get_param('/objects/'+self.target_peg+'/dimensions/diameter')/1000 
        peg_tol_plus         = rospy.get_param('/objects/'+self.target_peg+'/tolerance/upper_tolerance')/1000
        peg_tol_minus        = rospy.get_param('/objects/'+self.target_peg+'/tolerance/lower_tolerance')/1000
        hole_diameter        = rospy.get_param('/objects/'+self.target_hole+'/dimensions/diameter')/1000 
        hole_tol_plus        = rospy.get_param('/objects/'+self.target_hole+'/tolerance/upper_tolerance')/1000
        hole_tol_minus       = rospy.get_param('/objects/'+self.target_hole+'/tolerance/lower_tolerance')/1000    
        self.hole_depth      = rospy.get_param('/objects/'+self.target_peg+'/dimensions/min_insertion_depth')/1000
        self.clearance_max = hole_tol_plus - peg_tol_minus 
        self.clearance_min = hole_tol_minus + peg_tol_plus 
        self.clearance_avg = .5 * (self.clearance_max- self.clearance_min) 
        self.safe_clearance = (hole_diameter-peg_diameter + self.clearance_min)/2;
def read_peg_hole_dimensions ( self ) : peg_diameter = rospy . get_param ( '/objects/' + self . target_peg + '/dimensions/diameter' ) / 1000 peg_tol_plus = rospy . get_param ( '/objects/' + self . target_peg + '/tolerance/upper_tolerance' ) / 1000 peg_tol_minus = rospy . get_param ( '/objects/' + self . target_peg + '/tolerance/lower_tolerance' ) / 1000 hole_diameter = rospy . get_param ( '/objects/' + self . target_hole + '/dimensions/diameter' ) / 1000 hole_tol_plus = rospy . get_param ( '/objects/' + self . target_hole + '/tolerance/upper_tolerance' ) / 1000 hole_tol_minus = rospy . get_param ( '/objects/' + self . target_hole + '/tolerance/lower_tolerance' ) / 1000 self . hole_depth = rospy . get_param ( '/objects/' + self . target_peg + '/dimensions/min_insertion_depth' ) / 1000 self . clearance_max = hole_tol_plus - peg_tol_minus self . clearance_min = hole_tol_minus + peg_tol_plus self . clearance_avg = .5 * ( self . clearance_max - self . clearance_min ) self . safe_clearance = ( hole_diameter - peg_diameter + self . clearance_min ) / 2 ;
Read peg and hole data from YAML configuration file.
Read peg and hole data from YAML configuration file .
"""Read peg and hole data from YAML configuration file.
        """ #mm #mm #setup, run to calculate useful values based on params: #calculate the total error zone; #calculate minimum clearance;     =0 #provisional calculation of "wiggle room"
self