src/conntact/assembly_tools.py
def spiral_search_motion(self, frequency = .15, min_amplitude = .002, max_cycles = 62.83185):
        """Generates position, orientation offset vectors which describe a plane spiral about z; 
        Adds this offset to the current approach vector to create a searching pattern. Constants come from Init;
        x,y vector currently comes from x_ and y_pos_offset variables.
        """
        curr_time = rospy.get_rostime() - self._start_time
        curr_time_numpy = np.double(curr_time.to_sec())
        curr_amp = min_amplitude + self.safe_clearance * np.mod(2.0 * np.pi * frequency *curr_time_numpy, max_cycles);

        x_pos = curr_amp * np.cos(2.0 * np.pi * frequency * curr_time_numpy)

        y_pos = curr_amp * np.sin(2.0 * np.pi * frequency * curr_time_numpy)
        
        x_pos = x_pos + self.x_pos_offset
        y_pos = y_pos + self.y_pos_offset
        z_pos = self.current_pose.transform.translation.z #0.104 is the approximate height of the hole itself. TODO:Assume the part needs to be inserted here. Update once I know the real value

        pose_position = [x_pos, y_pos, z_pos]

        pose_orientation = [0, 1, 0, 0] # w, x, y, z

        return [pose_position, pose_orientation]
Generates position, orientation offset vectors which describe a plane spiral about z; 
        Adds this offset to the current approach vector to create a searching pattern. Constants come from Init;
        x,y vector currently comes from x_ and y_pos_offset variables.
        
Generates position, orientation offset vectors which describe a plane spiral about z;
Adds this offset to the current approach vector to create a searching pattern. Constants come from Init;
x,y vector currently comes from x_ and y_pos_offset variables.
Generates position orientation offset vectors which describe a plane spiral about z ; Adds this offset to the current approach vector to create a searching pattern . Constants come from Init ; x y vector currently comes from x_ and y_pos_offset variables .
def spiral_search_motion(self, frequency = .15, min_amplitude = .002, max_cycles = 62.83185):
        curr_time = rospy.get_rostime() - self._start_time
        curr_time_numpy = np.double(curr_time.to_sec())
        curr_amp = min_amplitude + self.safe_clearance * np.mod(2.0 * np.pi * frequency *curr_time_numpy, max_cycles);
        x_pos = curr_amp * np.cos(2.0 * np.pi * frequency * curr_time_numpy)
        y_pos = curr_amp * np.sin(2.0 * np.pi * frequency * curr_time_numpy)
        x_pos = x_pos + self.x_pos_offset
        y_pos = y_pos + self.y_pos_offset
        z_pos = self.current_pose.transform.translation.z 
        pose_position = [x_pos, y_pos, z_pos]
        pose_orientation = [0, 1, 0, 0] 
        return [pose_position, pose_orientation]
def spiral_search_motion ( self , frequency = .15 , min_amplitude = .002 , max_cycles = 62.83185 ) : curr_time = rospy . get_rostime ( ) - self . _start_time curr_time_numpy = np . double ( curr_time . to_sec ( ) ) curr_amp = min_amplitude + self . safe_clearance * np . mod ( 2.0 * np . pi * frequency * curr_time_numpy , max_cycles ) ; x_pos = curr_amp * np . cos ( 2.0 * np . pi * frequency * curr_time_numpy ) y_pos = curr_amp * np . sin ( 2.0 * np . pi * frequency * curr_time_numpy ) x_pos = x_pos + self . x_pos_offset y_pos = y_pos + self . y_pos_offset z_pos = self . current_pose . transform . translation . z pose_position = [ x_pos , y_pos , z_pos ] pose_orientation = [ 0 , 1 , 0 , 0 ] return [ pose_position , pose_orientation ]
Generates position, orientation offset vectors which describe a plane spiral about z;
Adds this offset to the current approach vector to create a searching pattern.
Generates position orientation offset vectors which describe a plane spiral about z ; Adds this offset to the current approach vector to create a searching pattern .
"""Generates position, orientation offset vectors which describe a plane spiral about z; 
        Adds this offset to the current approach vector to create a searching pattern. Constants come from Init;
        x,y vector currently comes from x_ and y_pos_offset variables.
        """ #0.104 is the approximate height of the hole itself. TODO:Assume the part needs to be inserted here. Update once I know the real value # w, x, y, z
self
frequency
min_amplitude
max_cycles