model.py
def update(self, dt):
        """Given the current state of the robot (speeds of the wheels) and a time step (dt), 
        calculates the new position of the robot.
        The speed of the wheels are assumed constant during dt.
        
        Arguments:
            dt {float} -- Travel time in seconds
        """
        # Going from wheel speeds to robot speed
        linear_speed, rotation_speed = self.dk()
        dp= linear_speed*dt
        dtheta= rotation_speed*dt  #r/s * s

        if rotation_speed !=0 :
            dx= (linear_speed/rotation_speed) * math.sin(dtheta)
            dy= (linear_speed/rotation_speed) - ((linear_speed/rotation_speed) *math.cos(dtheta))
        else :
            dx= dp
            dy= 0
        

        x_m=dx*math.cos(self.theta) - dy*math.sin(self.theta)
        y_m=dx*math.sin(self.theta) + dy*math.cos(self.theta)
        
        # TODO  question 2
       
        # Updating the robot position
        self.x = self.x + x_m  # TODO  question 3
        self.y = self.y + y_m  # TODO
        self.theta = self.theta + dtheta
Given the current state of the robot (speeds of the wheels) and a time step (dt), 
        calculates the new position of the robot.
        The speed of the wheels are assumed constant during dt.
        
        Arguments:
            dt {float} -- Travel time in seconds
        
Given the current state of the robot (speeds of the wheels) and a time step (dt),
calculates the new position of the robot.
The speed of the wheels are assumed constant during dt.

dt {float} -- Travel time in seconds
Given the current state of the robot ( speeds of the wheels ) and a time step ( dt ) calculates the new position of the robot . The speed of the wheels are assumed constant during dt . dt { float } -- Travel time in seconds
def update(self, dt):
        linear_speed, rotation_speed = self.dk()
        dp= linear_speed*dt
        dtheta= rotation_speed*dt  
        if rotation_speed !=0 :
            dx= (linear_speed/rotation_speed) * math.sin(dtheta)
            dy= (linear_speed/rotation_speed) - ((linear_speed/rotation_speed) *math.cos(dtheta))
        else :
            dx= dp
            dy= 0
        x_m=dx*math.cos(self.theta) - dy*math.sin(self.theta)
        y_m=dx*math.sin(self.theta) + dy*math.cos(self.theta)
        self.x = self.x + x_m  
        self.y = self.y + y_m  
        self.theta = self.theta + dtheta
def update ( self , dt ) : linear_speed , rotation_speed = self . dk ( ) dp = linear_speed * dt dtheta = rotation_speed * dt if rotation_speed != 0 : dx = ( linear_speed / rotation_speed ) * math . sin ( dtheta ) dy = ( linear_speed / rotation_speed ) - ( ( linear_speed / rotation_speed ) * math . cos ( dtheta ) ) else : dx = dp dy = 0 x_m = dx * math . cos ( self . theta ) - dy * math . sin ( self . theta ) y_m = dx * math . sin ( self . theta ) + dy * math . cos ( self . theta ) self . x = self . x + x_m self . y = self . y + y_m self . theta = self . theta + dtheta
Given the current state of the robot (speeds of the wheels) and a time step (dt),
calculates the new position of the robot.
Given the current state of the robot ( speeds of the wheels ) and a time step ( dt ) calculates the new position of the robot .
"""Given the current state of the robot (speeds of the wheels) and a time step (dt), 
        calculates the new position of the robot.
        The speed of the wheels are assumed constant during dt.
        
        Arguments:
            dt {float} -- Travel time in seconds
        """ # Going from wheel speeds to robot speed #r/s * s # TODO  question 2 # Updating the robot position # TODO  question 3 # TODO
self
dt