parameters: (in_vissim_transform, extent=None)
return_statement: return out_transform
docstring: Returns carla transform based on vissim transform.
docstring_summary: Returns carla transform based on vissim transform.
docstring_tokens: Returns carla transform based on vissim transform .
function: def get_carla_transform(in_vissim_transform, extent=None):
          """
          Returns carla transform based on vissim transform.
          """
          in_location = in_vissim_transform.location
          in_rotation = in_vissim_transform.rotation
  
          # From front-center-bumper to center (vissim reference system).
          if extent is not None:
              out_location = (in_location.x - math.cos(math.radians(in_rotation.yaw)) * extent.x,
                              in_location.y - math.sin(math.radians(in_rotation.yaw)) * extent.x,
                              in_location.z - math.sin(math.radians(in_rotation.pitch)) * extent.x)
          else:
              out_location = (in_location.x, in_location.y, in_location.z)
          out_rotation = (in_rotation.pitch, in_rotation.yaw, in_rotation.roll)
  
          # Transform to carla reference system (left-handed system).
          out_transform = carla.Transform(
              carla.Location(out_location[0], -out_location[1], out_location[2]),
              carla.Rotation(out_rotation[0], -out_rotation[1], out_rotation[2]))
  
          return out_transform
function_tokens: def get_carla_transform ( in_vissim_transform , extent = None ) : in_location = in_vissim_transform . location in_rotation = in_vissim_transform . rotation # From front-center-bumper to center (vissim reference system). if extent is not None : out_location = ( in_location . x - math . cos ( math . radians ( in_rotation . yaw ) ) * extent . x , in_location . y - math . sin ( math . radians ( in_rotation . yaw ) ) * extent . x , in_location . z - math . sin ( math . radians ( in_rotation . pitch ) ) * extent . x ) else : out_location = ( in_location . x , in_location . y , in_location . z ) out_rotation = ( in_rotation . pitch , in_rotation . yaw , in_rotation . roll ) # Transform to carla reference system (left-handed system). out_transform = carla . Transform ( carla . Location ( out_location [ 0 ] , - out_location [ 1 ] , out_location [ 2 ] ) , carla . Rotation ( out_rotation [ 0 ] , - out_rotation [ 1 ] , out_rotation [ 2 ] ) ) return out_transform