diff --git a/Co-Simulation/Sumo/sumo_integration/bridge_helper.py b/Co-Simulation/Sumo/sumo_integration/bridge_helper.py index e4a14d946..4485d56e3 100644 --- a/Co-Simulation/Sumo/sumo_integration/bridge_helper.py +++ b/Co-Simulation/Sumo/sumo_integration/bridge_helper.py @@ -51,10 +51,9 @@ class BridgeHelper(object): # (http://sumo.sourceforge.net/userdoc/Purgatory/Vehicle_Values.html#angle) yaw = -1 * in_rotation.yaw + 90 pitch = in_rotation.pitch - length = 2.0 * extent.x - out_location = (in_location.x - math.cos(math.radians(yaw)) * (length / 2.0), - in_location.y - math.sin(math.radians(yaw)) * (length / 2.0), - in_location.z - math.sin(math.radians(pitch)) * (length / 2.0)) + out_location = (in_location.x - math.cos(math.radians(yaw)) * extent.x, + in_location.y - math.sin(math.radians(yaw)) * extent.x, + in_location.z - math.sin(math.radians(pitch)) * extent.x) out_rotation = (in_rotation.pitch, in_rotation.yaw, in_rotation.roll) # Applying offset sumo-carla net. @@ -79,10 +78,9 @@ class BridgeHelper(object): # From center to front-center-bumper (carla reference system). yaw = -1 * in_rotation.yaw pitch = in_rotation.pitch - length = 2.0 * extent.x - out_location = (in_location.x + math.cos(math.radians(yaw)) * (length / 2.0), - in_location.y - math.sin(math.radians(yaw)) * (length / 2.0), - in_location.z - math.sin(math.radians(pitch)) * (length / 2.0)) + out_location = (in_location.x + math.cos(math.radians(yaw)) * extent.x, + in_location.y - math.sin(math.radians(yaw)) * extent.x, + in_location.z - math.sin(math.radians(pitch)) * extent.x) out_rotation = (in_rotation.pitch, in_rotation.yaw, in_rotation.roll) # Applying offset carla-sumo net