diff --git a/docs/reference/changelog-r2024.md b/docs/reference/changelog-r2024.md index de3c204627d..2567e763664 100644 --- a/docs/reference/changelog-r2024.md +++ b/docs/reference/changelog-r2024.md @@ -17,3 +17,4 @@ Released on December **th, 2023. - Fixed crashes (with some graphics cards) caused by references to unused GLSL uniforms ([#6587](https://github.com/cyberbotics/webots/pull/6587)). - Fixed `Brake`s added to the second axis of a `Hinge2Joint` being applied to the non-transformed axis ([#6584](https://github.com/cyberbotics/webots/pull/6584)). - Fixed invalid absolute sound file path resulted in crash ([#6593](https://github.com/cyberbotics/webots/pull/6593)) + - Fixed the bug that when the language is Python, getTargets() cannot correctly obtain the multi-target data detected by the radar ([#6606](https://github.com/cyberbotics/webots/pull/6606)) diff --git a/lib/controller/python/controller/radar.py b/lib/controller/python/controller/radar.py index 68d83e49f29..6a27c656235 100644 --- a/lib/controller/python/controller/radar.py +++ b/lib/controller/python/controller/radar.py @@ -51,7 +51,7 @@ def getTargets(self) -> List[RadarTarget]: data = wb.wb_radar_get_targets(self._tag) list = [] for i in range(number_of_targets): - list.append(RadarTarget(data[0], data[1], data[2], data[3])) + list.append(RadarTarget(data[0 + 4*i], data[1 + 4*i], data[2 + 4*i], data[3 + 4*i])) return list @property