Sensors
  • 1 Minute to read

Sensors


Article Summary

1. Overview

This controller allows reading most of the Robot's sensors.

UR Robots have two types of sensors, according to the kind of data they output:

  • Continuous sensors: Read variable is a continuous decimal value.
  • Boolean sensors: Read variable is a binary state.

2. List of Sensors

Continuous sensors:

GroupSensorAvailable in simulatorMagnitudeUnitPathExample
Temperature
ThermometerYesTemperature°C
/thermometer31.0
Environment
TemperatureYesTemperature°C
/environment/temperature22.0

Altitude
YesDistancem/environment/altitude
824.0

Humidity
Yes
milli %
/environment/humidity
12.2

Pressure
YesPressure
Pa
/environment/pressure
101.325
Sonar1-Distancem/sonar/110.0

2-Distancem/sonar/22.4

...-.........

11-Distancem/sonar/115.2

12-Distancem/sonar/127.8
Air qualityVolatile Organic Compounds (VOC)-

/airq/voc

CO-

/airq/co

Smoke-

/airq/smoke

LPG-

/airq/lpg
IMUMagnetometer X-Magnetic Field
/imu/mag/x

Magnetometer Y-Magnetic Field
/imu/mag/y

Magnetometer Z-Magnetic Field
/imu/mag/z

Accelerometer X-Accelerationm/s²/imu/lin_acc/x0.22

Accelerometer Y-Accelerationm/s²/imu/lin_acc/y0.12

Accelerometer Z-Accelerationm/s²/imu/lin_acc/z9.78

Gyro X-Angular Velocityrad/s/imu/rot_vel/x0.002

Gyro Y-Angular Velocityrad/s/imu/rot_vel/y0.003

Gyro Z-Angular Velocityrad/s/imu/rot_vel/z0.152

Compass bearing X-Angledegrees/imu/bearing/x

Pitch-Angledegrees/imu/pitch
Health parametersPulse Rate-
beat/minute/health/pulse82

Oxygen-
%/health/oxygen94

Smoke-

/health/smoke

Boolean Sensors:

GroupSensorPathExample
Line Sensor1/line_sensor/1False

2/line_sensor/2True

3/line_sensor/3False

3. Sensors Arrangement

Sensors are arranged around the robot body:


4. Using the Controller

Creating the controller in your app:

from raya.application_base import RayaApplicationBase

class RayaApplication(RayaApplicationBase):
    async def setup(self):
        ...
        self.sensors = await self.enable_controller('sensors')
        ...

The controller class includes a set of methods to synchronously access the sensors:

It also includes the following methods to create listeners that trigger when different events are detected:

Each method page includes standalone examples of how to use them.

5. Full examples

The following full examples use this controller:



Was this article helpful?