Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bridge functions are not working as expectation #73

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Bridges/carla_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,16 @@ def convert_vector3d_from_agent_to_source(

def convert_location_from_agent_to_source(self, source: Location) -> carla.Location:
"""Convert Agent's Location to a Carla.Location."""
return carla.Location(x=source.x, y=-source.z, z=source.y)
return carla.Location(x=source.x, y=source.z, z=source.y)

def convert_rotation_from_agent_to_source(self, source: Rotation) -> carla.Rotation:
"""Convert Agent's Rotation to a Carla.Rotation."""
return carla.Rotation(pitch=source.yaw, yaw=source.pitch, roll=source.roll)
roll, pitch, yaw = source.roll, source.pitch, -source.yaw
if yaw <= 0:
yaw = yaw + 270
else:
yaw = yaw - 90
return carla.Rotation(roll=roll, pitch=pitch, yaw=yaw)

def convert_transform_from_agent_to_source(
self, source: Transform
Expand Down