Replies: 2 comments 2 replies
-
I am not sure what you mean here. Why would your python code terminate? Robot controllers in Webots are supposed to run an endless loop, they never terminate by themselves. They will terminate only when Webots orders them to do so by returning |
Beta Was this translation helpful? Give feedback.
-
I'm trying to reproduce the error described here. @chrikatz, could you please confirm that your controller is terminating correctly? |
Beta Was this translation helpful? Give feedback.
-
Hello,
I added a vehicle to my world and placed a rotating lidar in the sensorSlot and set the controller to "extern". After that I use the Python API commands:
lidar.enable(1)
lidar.enablePointCloud()
ranges = lidar.getLayerRangeImage(0)
Everything is working fine when the simulation is started the first time. After my python code terminates, the ranges result to None in the restarts.
The only thing that fixes the problem is to reset the simulation (Ctrl+Shift+T), before starting the python code.
But my intent is to restart my code without any changes in Webots.
Troubleshooting:
I tried to disable the device before closing, using
self.lidar.disable()
self.lidar.disablePointCloud()
and I tried to reset the simulation using the simulationReset() command. This only resets the time and does not fix my problem.
Screenshots
System
Ubuntu 18.04
NVIDIA Corporation TU106GLM [Quadro RTX 3000 Mobile / Max-Q] (rev a1)
Beta Was this translation helpful? Give feedback.
All reactions