Skip to content

Commit b1ed652

Browse files
committed
typo
1 parent 20a572b commit b1ed652

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

GEMstack/onboard/perception/map_based_estimation.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,6 @@ def multi_scale_icp(source, target, voxel_sizes=[2.0, 1.0, 0.5], max_iterations=
225225
return current_transform
226226

227227

228-
def utm16n_to_wgs84(easting: float, northing: float):
229-
"""Convert UTM coordinates to WGS84 (latitude, longitude)"""
230-
lat, lon = utm.to_latlon(easting, northing, 16, True)
231-
return (lat, lon)
232228

233229
def transform_to_pose(transformation_matrix,origin):
234230
"""Convert transformation matrix to position and orientation (RPY)."""
@@ -249,7 +245,7 @@ def transform_to_pose(transformation_matrix,origin):
249245
northing = y + origin[1]
250246
height = z + origin[2]
251247

252-
lon_deg,lat_deg = utm16_to_wgs84(easting,northing)
248+
lon_deg,lat_deg = utm.to_latlon(easting, northing, 16, "N")
253249

254250
return lon_deg,lat_deg,height,roll,pitch,yaw
255251

@@ -360,9 +356,9 @@ def update(self) -> VehicleState:
360356
print("ICP", self.vehicle_interface.time() - scan_time)
361357

362358
# Extract position and orientation
363-
lat,lon, *_ = utm.from_latlon(0,90,16,'N')
364-
origin90w0s = [lat,lon,0]
365-
x, y, z, roll, pitch, yaw = transform_to_pose(final_transformation,origin90w0s)
359+
lat,lon, *_ = utm.from_latlon(0,-90,16,'N')
360+
origin90w0n = [lat,lon,0]
361+
x, y, z, roll, pitch, yaw = transform_to_pose(final_transformation,origin90w0n)
366362
# TODO: Estimate speed
367363
if self.map_based_pose != None:
368364
translation = np.array([x - self.map_based_pose.x, y - self.map_based_pose.y, z - self.map_based_pose.z])

0 commit comments

Comments
 (0)