Skip to content

Commit

Permalink
Fix values returned by getEmitterDirection (cyberbotics#6394)
Browse files Browse the repository at this point in the history
* Fix values returned by getEmitterDirection

* fixes cyberbotics#6392

* Update changelog (fix getEmitterDirection)

* Update changelog-r2023.md

* Update changelog-r2023.md

---------

Co-authored-by: Olivier Michel <[email protected]>
  • Loading branch information
Adman and omichel authored Sep 29, 2023
1 parent 0e1ab73 commit bb7062f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/reference/changelog-r2023.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Released on XXX XXth, 2023.
- Fixed translation, rotation and scale displayed in the Position tab of the Node viewer in the scene tree ([#6309](https://github.com/cyberbotics/webots/pull/6309)).
- Replaced the [Mesh](mesh.md) bounding object of the ROSbot XL by [Boxes](box.md) ([#6326](https://github.com/cyberbotics/webots/pull/6326)).
- Fixed a crash when [IndexedLineSet](indexedlineset.md) has `coord` but no `coordIndex` ([#6359](https://github.com/cyberbotics/webots/pull/6359)).
- Fixed values returned by the [Receiver.getEmitterDirection](https://cyberbotics.com/doc/reference/receiver?tab-language=python#wb_receiver_get_emitter_direction) Python method ([#6394](https://github.com/cyberbotics/webots/pull/6394)).

## Webots R2023b
Released on June 28th, 2023.
Expand Down
4 changes: 2 additions & 2 deletions lib/controller/python/controller/receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def signal_strength(self) -> float:
return wb.wb_receiver_get_signal_strength(self._tag)

@property
def emitter_direction(self):
return wb.wb_receiver_get_emitter_direction(self._tag)
def emitter_direction(self) -> List[float]:
return wb.wb_receiver_get_emitter_direction(self._tag)[:3]

@property
def channel(self) -> int:
Expand Down

0 comments on commit bb7062f

Please sign in to comment.