Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
reverse_waypoints Namespace Reference

Functions

def main ()
 

Function Documentation

◆ main()

def reverse_waypoints.main ( )

Definition at line 25 of file reverse_waypoints.py.

25def main():
26 filepath = sys.argv[1]
27 waypoints = []
28 with open(filepath, 'r') as fp:
29 line = fp.readline()
30 counter = 0
31 while line:
32 if len(line) == 1:
33 counter += 1
34 waypoint = []
35 waypoint.append(line)
36 waypoints.append(waypoint)
37 else:
38 waypoints[counter - 1].append(line)
39 line = fp.readline()
40 print("Processed %d waypoints" % len(waypoints))
41 output_path = filepath + '_output'
42 with open(output_path, 'w') as fp:
43 for wp in reversed(waypoints):
44 for line in wp:
45 fp.write(line)
46 print("Done!")
47

References main().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function: