parameters: (self,twistCommand)
docstring: Handle movement requests.
docstring_summary: Handle movement requests.
docstring_tokens: Handle movement requests .
function: def _HandleVelocityCommand(self,twistCommand):
  
  		""" Handle movement requests. """
  		v = twistCommand.linear.x        # m/s
  		omega = twistCommand.angular.z      # rad/s
  		rospy.logwarn("Handling twist command: " + str(v) + "," + str(omega))
  
  
  #		omega= omega * 1000
  
  		
  
  #		message = 's %.3f %.3f\r' % (v, omega)
  		message = 's %.3f %.3f\r' % (v, omega)
  #		rospy.logwarn(str(v)+str(omega))
  #		rospy.logwarn("Sending speed command message: " + message)
  
  		angularVelocityOffset = 0.5 * omega * self.trackwidth
  		speed_limit = 100
  
  
  
                  if (v > 0):
                  	if ((speed_limit * self.distance_per_count) - math.fabs(angularVelocityOffset) < v):
                  	    	v = (speed_limit * self.distance_per_count) - math.fabs(angularVelocityOffset)
                  elif(v < 0):
                  	if (-((speed_limit * self.distance_per_count) - math.fabs(angularVelocityOffset)) > v):
                  	    	v = -((speed_limit * self.distance_per_count) - math.fabs(angularVelocityOffset))
  
                      
                  expectedLeftSpeed = v - angularVelocityOffset
  		expectedRightSpeed = v + angularVelocityOffset
  
  		expectedLeftSpeed = expectedLeftSpeed / self.distance_per_count
  		expectedRightSpeed = expectedRightSpeed / self.distance_per_count
  
  
  		NormalizedLeftCV = expectedLeftSpeed
  		NormalizedRightCV = expectedRightSpeed
  	
  		rospy.logwarn("Actual speed")
  
  
  #		rospy.loginfo(NormalizedLeftCV)
  #		rospy.loginfo(NormalizedRightCV)
  
  		old_max = 1
  		old_min = -1
  
  		new_max = 1023
  		new_min = -1023
  		
  		old_left_value = NormalizedLeftCV 
  		old_right_value = NormalizedRightCV
  
  		
  		actual_left_speed = ( (old_left_value - old_min) / (old_max - old_min) ) * (new_max - new_min) + new_min
  
  		actual_right_speed = ( (old_left_value - old_min) / (old_max - old_min) ) * (new_max - new_min) + new_min
  
  
  		rospy.logwarn("Actual speed")
  		rospy.logwarn(actual_left_speed)
  		rospy.logwarn(actual_right_speed)
  
  		
  #Path for turning
  		self.Publish_Speed(actual_left_speed ,actual_right_speed,v,omega)
function_tokens: def _HandleVelocityCommand ( self , twistCommand ) : v = twistCommand . linear . x # m/s omega = twistCommand . angular . z # rad/s rospy . logwarn ( "Handling twist command: " + str ( v ) + "," + str ( omega ) ) #		omega= omega * 1000 #		message = 's %.3f %.3f\r' % (v, omega) message = 's %.3f %.3f\r' % ( v , omega ) #		rospy.logwarn(str(v)+str(omega)) #		rospy.logwarn("Sending speed command message: " + message) angularVelocityOffset = 0.5 * omega * self . trackwidth speed_limit = 100 if ( v > 0 ) : if ( ( speed_limit * self . distance_per_count ) - math . fabs ( angularVelocityOffset ) < v ) : v = ( speed_limit * self . distance_per_count ) - math . fabs ( angularVelocityOffset ) elif ( v < 0 ) : if ( - ( ( speed_limit * self . distance_per_count ) - math . fabs ( angularVelocityOffset ) ) > v ) : v = - ( ( speed_limit * self . distance_per_count ) - math . fabs ( angularVelocityOffset ) ) expectedLeftSpeed = v - angularVelocityOffset expectedRightSpeed = v + angularVelocityOffset expectedLeftSpeed = expectedLeftSpeed / self . distance_per_count expectedRightSpeed = expectedRightSpeed / self . distance_per_count NormalizedLeftCV = expectedLeftSpeed NormalizedRightCV = expectedRightSpeed rospy . logwarn ( "Actual speed" ) #		rospy.loginfo(NormalizedLeftCV) #		rospy.loginfo(NormalizedRightCV) old_max = 1 old_min = - 1 new_max = 1023 new_min = - 1023 old_left_value = NormalizedLeftCV old_right_value = NormalizedRightCV actual_left_speed = ( ( old_left_value - old_min ) / ( old_max - old_min ) ) * ( new_max - new_min ) + new_min actual_right_speed = ( ( old_left_value - old_min ) / ( old_max - old_min ) ) * ( new_max - new_min ) + new_min rospy . logwarn ( "Actual speed" ) rospy . logwarn ( actual_left_speed ) rospy . logwarn ( actual_right_speed ) #Path for turning self . Publish_Speed ( actual_left_speed , actual_right_speed , v , omega )