Skip to content

Gyro Sensor

Cort edited this page Jul 31, 2020 · 3 revisions

This simulates a gyro sensor, not unlike those found on a Lego EV3 robot. Note that the angle is cumulative and can go beyond 360 degrees.

Working Principles (Simulator)

This simply returns the heading of the sensor. A reset will set the current angle to zero.

Differences from a real sensor

  • A real sensor will experience a certain amount of drift. The simulated sensor will never drift.

  • Later models of the EV3 gyro contains a 3-Axis gyro internally and the other axis readings can be obtained through ev3dev (...but not through the Python API). The simulated sensor only have a single axis.

Configurations

Default values are shown below.

"type": "GyroSensor",
"options": {
}

* The Gyro Sensor has no options and you can only set position and not rotation.