Skip to content

Commit 352f9e7

Browse files
authored
Fix Typo in OSM Importer (#6935)
* fix variable name in osm importer * update changelog * fix another instance of this
1 parent 37ec938 commit 352f9e7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/reference/changelog-r2025.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
- Fixed detection of physics plugins in extra projects ([#6880](https://github.com/cyberbotics/webots/pull/6880)).
2424
- Fixed `addForceWithOffset` and `addTorque` doing the same thing as `addForce` in Python ([#6881](https://github.com/cyberbotics/webots/pull/6881)).
2525
- Fixed Python controllers on Windows ([#6933](https://github.com/cyberbotics/webots/pull/6933)).
26+
- OSM importer no longer crashes when run in 3d mode ([#6935](https://github.com/cyberbotics/webots/pull/6935)).
2627

2728
## Webots R2025a
2829
Released on January 31st, 2025.

resources/osm_importer/webots_objects/webots_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def add_intermediate_point_where_needed(cls, refs, offset=1):
7676
# need to add an intermediate point if none of the points are already very close from the border
7777
newCoordX = (d2y / (d1y + d2y)) * OSMCoord.coordDictionnary[refs[i]].x +\
7878
(d1y / (d1y + d2y)) * OSMCoord.coordDictionnary[refs[i - 1]].x
79-
newCoordy = (d2y / (d1y + d2y)) * OSMCoord.coordDictionnary[refs[i]].y +\
79+
newCoordY = (d2y / (d1y + d2y)) * OSMCoord.coordDictionnary[refs[i]].y +\
8080
(d1y / (d1y + d2y)) * OSMCoord.coordDictionnary[refs[i - 1]].y
8181
newOSMID = OSMCoord.add_new_coord_to_list(newCoordX, newCoordY)
8282
newRefs.insert(i, newOSMID)
@@ -92,7 +92,7 @@ def add_intermediate_point_where_needed(cls, refs, offset=1):
9292
WebotsObject.elevation.elevationArray[currentYGridIndex]['y'] +
9393
WebotsObject.elevation.yStep)
9494
if newCoordX is not None and newCoordY is not None: # add point if intersect the triangle
95-
newOSMID = OSMCoord.add_new_coord_to_list(newCoordX, newCoordy)
95+
newOSMID = OSMCoord.add_new_coord_to_list(newCoordX, newCoordY)
9696
newRefs.insert(i, newOSMID)
9797
return cls.add_intermediate_point_where_needed(newRefs, i + 2)
9898
previousXGridIndex = currentXGridIndex

0 commit comments

Comments
 (0)