parameters: (self, xOffset, yOffset)
return_statement: return position
docstring: Get the position of the vehicle in SUMO coordinate frame.
docstring_summary: Get the position of the vehicle in SUMO coordinate frame.
docstring_tokens: Get the position of the vehicle in SUMO coordinate frame .
function: def get_position(self, xOffset, yOffset):
          """Get the position of the vehicle in SUMO coordinate frame."""
          # get position
          position = self.node.getPosition()
          matrix = self.node.getOrientation()
          angle1 = math.asin(matrix[0])
          angle2 = math.atan(-matrix[3] / abs(matrix[0]))
          if angle2 < 0:
              angle1 = math.pi - angle1
          # compute position in sumo coordinate frame
          position[0] = position[0] - xOffset + 0.5 * self.vehicleLength * math.sin(angle1)
          position[1] = position[1] - yOffset - 0.5 * self.vehicleLength * math.cos(angle1)
          position[2] = position[2] - self.vehicleHeight
          return position
function_tokens: def get_position ( self , xOffset , yOffset ) : # get position position = self . node . getPosition ( ) matrix = self . node . getOrientation ( ) angle1 = math . asin ( matrix [ 0 ] ) angle2 = math . atan ( - matrix [ 3 ] / abs ( matrix [ 0 ] ) ) if angle2 < 0 : angle1 = math . pi - angle1 # compute position in sumo coordinate frame position [ 0 ] = position [ 0 ] - xOffset + 0.5 * self . vehicleLength * math . sin ( angle1 ) position [ 1 ] = position [ 1 ] - yOffset - 0.5 * self . vehicleLength * math . cos ( angle1 ) position [ 2 ] = position [ 2 ] - self . vehicleHeight return position