Skip to content

Commit 5470771

Browse files
songyangZhaoomichelygoumaz
authored
Fix Motor setAcceleration bug in Python. (#6036)
* Fix Motor setAcceleration bug in Python. * Add an entry in changelog about fix #6036 * Update changelog-r2023.md * Update docs/reference/changelog-r2023.md Co-authored-by: Yannick Goumaz <[email protected]> --------- Co-authored-by: Olivier Michel <[email protected]> Co-authored-by: Yannick Goumaz <[email protected]>
1 parent c68b8b6 commit 5470771

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/reference/changelog-r2023.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Released on ??
2323
- Field getters sometimes returning an invalid Field object ([#5633](https://github.com/cyberbotics/webots/pull/5633)).
2424
- `Field.enableSFTracking` and `Field.disableSFTracking` which were failing ([#5640](https://github.com/cyberbotics/webots/pull/5640)).
2525
- `Motor.enableForceFeedback` where the `sampling_period` argument was missing ([#5797](https://github.com/cyberbotics/webots/pull/5797)).
26+
- `Motor.setAcceleration` was missing the device tag parameter ([#6036](https://github.com/cyberbotics/webots/pull/6036)).
2627
- Fixed crash resulting from requesting pose tracking of unsuitable nodes ([#5620](https://github.com/cyberbotics/webots/pull/5620)).
2728
- Fixed memory leaks, particularly when in no-rendering mode and spawning/deleting nodes ([#5639](https://github.com/cyberbotics/webots/pull/5639)).
2829
- Fixed crashes resulting from streaming pose, SF field values or contact points after deleting the tracked nodes ([#5638](https://github.com/cyberbotics/webots/pull/5638)).
@@ -50,7 +51,7 @@ Released on ??
5051
- Fixed bug causing Webots to hang when requesting multiple poses while pose-tracking multiple nodes ([#5952](https://github.com/cyberbotics/webots/pull/5952)).
5152
- Fixed physics state updates of [Solid](solid.md) nodes added to a descendant [`Joint.endPoint`](joint.md) during simulation ([#5961](https://github.com/cyberbotics/webots/pull/5961)).
5253
- Fixed unwanted altitude change when reaching a target waypoint in `mavic2pro_patrol.c` ([#5981](https://github.com/cyberbotics/webots/pull/5981)).
53-
- Fixed the extern controller connection to a target Webots instance when a snap one is running. ([#6002](https://github.com/cyberbotics/webots/pull/6002)).
54+
- Fixed the extern controller connection to a target Webots instance when a snap one is running ([#6002](https://github.com/cyberbotics/webots/pull/6002)).
5455

5556
## Webots R2023a
5657
Released on November 29th, 2022.

lib/controller/python/controller/motor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def target_acceleration(self) -> float:
216216

217217
@target_acceleration.setter
218218
def target_acceleration(self, acceleration: float):
219-
wb.wb_motor_set_acceleration(acceleration)
219+
wb.wb_motor_set_acceleration(self._tag, ctypes.c_double(acceleration))
220220

221221
force = property(fset=setForce)
222222
torque = property(fset=setTorque)

0 commit comments

Comments
 (0)