I would like to set the noise & resultion values on startup by code (instead the node viewer). I have been looking through the API for motor and position sensor, but can't find a function that allows to get or set those values.
Asked
Active
Viewed 88 times
1 Answers
1
You can't directly change these values from your controller using the position-sensor or motor API.
However, as a workaround, you can use the Supervisor API (https://cyberbotics.com/doc/reference/supervisor) to change the value of any field in the scene-tree (e.g. the noise and resolution fields).
Find here a very simple example changing the position field of a light: https://cyberbotics.com/doc/guide/samples-devices#supervisor-wbt

David Mansolino
- 1,713
- 7
- 13