Sensors
- 1 Minute to read
Sensors
- 1 Minute to read
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:
Group | Sensor | Available in simulator | Magnitude | Unit | Path | Example |
---|---|---|---|---|---|---|
Temperature | Thermometer | Yes | Temperature | °C | /thermometer | 31.0 |
Environment | Temperature | Yes | Temperature | °C | /environment/temperature | 22.0 |
Altitude | Yes | Distance | m | /environment/altitude | 824.0 | |
Humidity | Yes | milli % | /environment/humidity | 12.2 | ||
Pressure | Yes | Pressure | Pa | /environment/pressure | 101.325 | |
Sonar | 1 | - | Distance | m | /sonar/1 | 10.0 |
2 | - | Distance | m | /sonar/2 | 2.4 | |
... | - | ... | ... | ... | ||
11 | - | Distance | m | /sonar/11 | 5.2 | |
12 | - | Distance | m | /sonar/12 | 7.8 | |
Air quality | Volatile Organic Compounds (VOC) | - | /airq/voc | |||
CO | - | /airq/co | ||||
Smoke | - | /airq/smoke | ||||
LPG | - | /airq/lpg | ||||
IMU | Magnetometer X | - | Magnetic Field | /imu/mag/x | ||
Magnetometer Y | - | Magnetic Field | /imu/mag/y | |||
Magnetometer Z | - | Magnetic Field | /imu/mag/z | |||
Accelerometer X | - | Acceleration | m/s² | /imu/lin_acc/x | 0.22 | |
Accelerometer Y | - | Acceleration | m/s² | /imu/lin_acc/y | 0.12 | |
Accelerometer Z | - | Acceleration | m/s² | /imu/lin_acc/z | 9.78 | |
Gyro X | - | Angular Velocity | rad/s | /imu/rot_vel/x | 0.002 | |
Gyro Y | - | Angular Velocity | rad/s | /imu/rot_vel/y | 0.003 | |
Gyro Z | - | Angular Velocity | rad/s | /imu/rot_vel/z | 0.152 | |
Compass bearing X | - | Angle | degrees | /imu/bearing/x | ||
Pitch | - | Angle | degrees | /imu/pitch | ||
Health parameters | Pulse Rate | - | beat/minute | /health/pulse | 82 | |
Oxygen | - | % | /health/oxygen | 94 | ||
Smoke | - | /health/smoke |
Boolean Sensors:
Group | Sensor | Path | Example |
---|---|---|---|
Line Sensor | 1 | /line_sensor/1 | False |
2 | /line_sensor/2 | True | |
3 | /line_sensor/3 | False |
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?