MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / draw_transform

Function draw_transform

PythonAPI/util/lane_explorer.py:40–47  ·  view source on GitHub ↗
(debug, trans, col=carla.Color(255, 0, 0), lt=-1)

Source from the content-addressed store, hash-verified

38
39
40def draw_transform(debug, trans, col=carla.Color(255, 0, 0), lt=-1):
41 yaw_in_rad = math.radians(trans.rotation.yaw)
42 pitch_in_rad = math.radians(trans.rotation.pitch)
43 p1 = carla.Location(
44 x=trans.location.x + math.cos(pitch_in_rad) * math.cos(yaw_in_rad),
45 y=trans.location.y + math.cos(pitch_in_rad) * math.sin(yaw_in_rad),
46 z=trans.location.z + math.sin(pitch_in_rad))
47 debug.draw_arrow(trans.location, p1, thickness=0.05, arrow_size=0.1, color=col, life_time=lt)
48
49
50def draw_waypoint_union(debug, w0, w1, color=carla.Color(255, 0, 0), lt=5):

Callers 2

draw_junctionFunction · 0.85
mainFunction · 0.85

Calls 3

draw_arrowMethod · 0.80
ColorMethod · 0.45
LocationMethod · 0.45

Tested by

no test coverage detected