Mihotel

Basic operation of the Webot object

Usage of the distance sensor

Basic usage of camera

Usage of the Opencv package in the Webot

  1. The default type of the picture get by the Webot camera is int32, which could not be processed by the opencv. In that case, we need to set dtype="uint8" so that the opencv could process without error.
  2. The channel need to be changed.

Basic Usage of the Compass Sensor

Basic Usage of the Accelerometer Sensor

from controller import Accelerometer
Accelerometer1=Accelerometer("accelerometer")
Accelerometer1.enable(1)
print(Accelerometer1.getValues())

could directly return a list with shape=[3], dtype=float64. The return shows the acceleration along each axis.

Usage of the GPS Sensor