Error: wb_lidar_get_range_image() called for a disabled device! Please use: wb_lidar_enable(). #6173
Closed
hardik-a62
started this conversation in
General
Replies: 1 comment 1 reply
-
Did you try to call |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Webots version: 2023a
I am writing a custom controller for our robot in the webot simulator. Previously I have written the controller for our robot on 2022b version with Lidar, Camera and other sensors. Now I am migrating these things to a newer version of webots and facing some issues.
The issue is when I am accessing the devices like (lidar and camera) I am following this order of function call:
lidar = robot.getDevice('lidar')
lidar.enable(robot.getBasicTimeStep())
lidar.getLayerRangeImage(0)
The last function throws me this error:
Error: wb_lidar_get_range_image() called for a disabled device! Please use: wb_lidar_enable().
According to error it seems like the devices is not enabled, but I have called a function to enable the device.
Same thing is happning with camera as well.
I have tested the same robot model and controller on older version of webots 2022b, there this steps are working and I am able to get the data out of sensors.
Beta Was this translation helpful? Give feedback.
All reactions