Replies: 1 comment
-
A
#include <webots/robot.h>
#include <webots/camera.h>
#include <webots/distance_sensor.h>
#define TIME_STEP 32
int main() {
wb_robot_init();
WbDeviceTag camera = wb_robot_get_device("camera");
wb_camera_enable(camera, TIME_STEP);
...
double value = wb_distance_sensor_get_value(camera); // WRONG!
...
}
#include <webots/robot.h>
#include <webots/camera.h>
#include <webots/distance_sensor.h>
#define TIME_STEP 32
int main() {
wb_robot_init();
WbDeviceTag distance_sensor, camera = wb_robot_get_device("camera");
wb_camera_enable(camera, TIME_STEP);
wb_distance_sensor_enable(distance_sensor, TIME_STEP); // WRONG!
...
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This warning is popping up in the Webots console when I execute my controller program, what is the problem?
Beta Was this translation helpful? Give feedback.
All reactions