MCPcopy Create free account
hub / github.com/OpenDriveLab/TCP / parse_transform

Function parse_transform

scenario_runner/srunner/metrics/tools/metrics_parser.py:37–57  ·  view source on GitHub ↗

Parses a list into a carla.Transform Args: info (list): list corresponding to a row of the recorder

(info)

Source from the content-addressed store, hash-verified

35
36
37def parse_transform(info):
38 """
39 Parses a list into a carla.Transform
40
41 Args:
42 info (list): list corresponding to a row of the recorder
43 """
44 transform = carla.Transform(
45 carla.Location(
46 float(info[3][1:-1]) / 100,
47 float(info[4][:-1]) / 100,
48 float(info[5][:-1]) / 100,
49 ),
50 carla.Rotation(
51 float(info[8][:-1]), # pitch
52 float(info[9][:-1]), # yaw
53 float(info[7][1:-1]) # roll
54 )
55 )
56
57 return transform
58
59
60def parse_control(info):

Callers 1

parse_recorder_infoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected