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

Function main

PythonAPI/util/lane_explorer.py:97–201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95 pair_w[1].transform.location + carla.Location(z=0.75), 0.1, white, l_time, False)
96
97def main():
98 argparser = argparse.ArgumentParser()
99 argparser.add_argument(
100 '--host',
101 metavar='H',
102 default='127.0.0.1',
103 help='IP of the host server (default: 127.0.0.1)')
104 argparser.add_argument(
105 '-p', '--port',
106 metavar='P',
107 default=2000,
108 type=int,
109 help='TCP port to listen to (default: 2000)')
110 argparser.add_argument(
111 '-i', '--info',
112 action='store_true',
113 help='Show text information')
114 argparser.add_argument(
115 '-x',
116 default=0.0,
117 type=float,
118 help='X start position (default: 0.0)')
119 argparser.add_argument(
120 '-y',
121 default=0.0,
122 type=float,
123 help='Y start position (default: 0.0)')
124 argparser.add_argument(
125 '-z',
126 default=0.0,
127 type=float,
128 help='Z start position (default: 0.0)')
129 argparser.add_argument(
130 '-s', '--seed',
131 metavar='S',
132 default=os.getpid(),
133 type=int,
134 help='Seed for the random path (default: program pid)')
135 argparser.add_argument(
136 '-t', '--tick-time',
137 metavar='T',
138 default=0.2,
139 type=float,
140 help='Tick time between updates (forward velocity) (default: 0.2)')
141 args = argparser.parse_args()
142
143 try:
144 client = carla.Client(args.host, args.port)
145 client.set_timeout(2.0)
146
147 world = client.get_world()
148 m = world.get_map()
149 debug = world.debug
150
151 random.seed(args.seed)
152 print("Seed: ", args.seed)
153
154 loc = carla.Location(args.x, args.y, args.z)

Callers 1

lane_explorer.pyFile · 0.70

Calls 9

set_timeoutMethod · 0.95
draw_waypoint_infoFunction · 0.85
draw_waypoint_unionFunction · 0.85
draw_transformFunction · 0.85
draw_junctionFunction · 0.85
get_waypointMethod · 0.80
nextMethod · 0.80
ClientMethod · 0.45
LocationMethod · 0.45

Tested by

no test coverage detected