@@ -129,9 +129,14 @@ def get_position_deviation(experiment_metrics, checkpoints, map_waypoints, exper
129129 map_waypoints_tuples_x = []
130130 map_waypoints_tuples_y = []
131131 for waypoint in map_waypoints :
132- map_waypoints_tuples_x .append (waypoint .transform .location .x )
133- map_waypoints_tuples_y .append (waypoint .transform .location .y )
134- map_waypoints_tuples .append ((waypoint .transform .location .x , waypoint .transform .location .y ))
132+ if (experiment_metrics ['carla_map' ] != 'Carla/Maps/Town06' ):
133+ map_waypoints_tuples_x .append (waypoint .transform .location .x )
134+ map_waypoints_tuples_y .append (waypoint .transform .location .y )
135+ map_waypoints_tuples .append ((waypoint .transform .location .x , waypoint .transform .location .y ))
136+ else :
137+ map_waypoints_tuples_x .append (waypoint .transform .location .x )
138+ map_waypoints_tuples_y .append (- waypoint .transform .location .y )
139+ map_waypoints_tuples .append ((waypoint .transform .location .x , - waypoint .transform .location .y ))
135140
136141 checkpoints_tuples = []
137142 checkpoints_tuples_x = []
@@ -141,7 +146,7 @@ def get_position_deviation(experiment_metrics, checkpoints, map_waypoints, exper
141146 if (experiment_metrics ['carla_map' ] == 'Carla/Maps/Town01' or experiment_metrics ['carla_map' ] == 'Carla/Maps/Town02' ):
142147 checkpoint_x = (max (map_waypoints_tuples_x ) + min (map_waypoints_tuples_x ))- current_checkpoint [0 ]
143148 checkpoint_y = - point ['pose.pose.position.y' ]
144- elif (experiment_metrics ['carla_map' ] == 'Carla/Maps/Town07 ' or experiment_metrics ['carla_map' ] == 'Carla/Maps/Town06 ' ):
149+ elif (experiment_metrics ['carla_map' ] == 'Carla/Maps/Town04 ' or experiment_metrics ['carla_map' ] == 'Carla/Maps/Town07 ' ):
145150 checkpoint_x = current_checkpoint [0 ]
146151 checkpoint_y = - current_checkpoint [1 ]
147152 else :
0 commit comments