python_scripts/subProgramFunctions.py
def haptic_rendering_2(self, delta_dist_actual):
        '''
        ADMITTANCE-type device algorithm (mass-spring-damper)
            1. read force of the user
            2. calculate target position
            3. send corresponding position to low level controller
                (in other words, send how much 
                delta position the motor must move)
            4. CHANGE virtual environment STATE 

            Args:
                NA
        '''
        # Step 3
        # this is done outside the object
        
        # Step 4   
        self.set_current_position(delta_dist_actual)
        self.position_data.append(self.pos_now)
                
        # save temporary state 
        self.force_in1 = self.force_in0
        self.pos_out1 = self.pos_now
        
        # sysModel is now @ t = n (new state)

        ADMITTANCE-type device algorithm (mass-spring-damper)
            1. read force of the user
            2. calculate target position
            3. send corresponding position to low level controller
                (in other words, send how much 
                delta position the motor must move)
            4. CHANGE virtual environment STATE 

            Args:
                NA
        
ADMITTANCE-type device algorithm (mass-spring-damper)
1. read force of the user
2. calculate target position
3. send corresponding position to low level controller
(in other words, send how much
delta position the motor must move)
4. CHANGE virtual environment STATE

NA
ADMITTANCE - type device algorithm ( mass - spring - damper ) 1 . read force of the user 2 . calculate target position 3 . send corresponding position to low level controller ( in other words send how much delta position the motor must move ) 4 . CHANGE virtual environment STATE NA
def haptic_rendering_2(self, delta_dist_actual):
        self.set_current_position(delta_dist_actual)
        self.position_data.append(self.pos_now)
        self.force_in1 = self.force_in0
        self.pos_out1 = self.pos_now
def haptic_rendering_2 ( self , delta_dist_actual ) : self . set_current_position ( delta_dist_actual ) self . position_data . append ( self . pos_now ) self . force_in1 = self . force_in0 self . pos_out1 = self . pos_now
ADMITTANCE-type device algorithm (mass-spring-damper)
1. read force of the user
2. calculate target position
3. send corresponding position to low level controller
(in other words, send how much
delta position the motor must move)
4.
ADMITTANCE - type device algorithm ( mass - spring - damper ) 1 . read force of the user 2 . calculate target position 3 . send corresponding position to low level controller ( in other words send how much delta position the motor must move ) 4 .
'''
        ADMITTANCE-type device algorithm (mass-spring-damper)
            1. read force of the user
            2. calculate target position
            3. send corresponding position to low level controller
                (in other words, send how much 
                delta position the motor must move)
            4. CHANGE virtual environment STATE 

            Args:
                NA
        ''' # Step 3 # this is done outside the object # Step 4    # save temporary state  # sysModel is now @ t = n (new state)
self
delta_dist_actual