Sensor Commands
rv.ranger_measurement()
Command: |
.ranger_measurment() |
---|---|
Command |
.ranger_measurement() |
Python |
r = rv.ranger_measurement() |
Range: |
N/A |
Describe: |
The front-facing ultrasonic distance sensor. Returns measurements in meters. ~10.00 meters means no obstacle was detected. |
Result: |
Returns value in Meters. |
Type or |
Sensor Note: This Rover sensor command is executed immediately. |
rv.color_measurement():
Command: |
.color_measurement() |
||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Command |
.color_measurement() |
||||||||||||||||||||
Python |
c = rv.color_measurement() |
||||||||||||||||||||
Range: |
1 thru 9 |
||||||||||||||||||||
Describe: |
Bottom-mounted color sensor detects the color of the surface. Can also detect gray-level scale of black (0) to white (255). |
||||||||||||||||||||
Result: |
Returns current color sensor information. The return value is in the 1 – 9 range which maps to the colors below:
|
||||||||||||||||||||
Type or |
Sensor Note: This Rover sensor command is executed immediately. |
rv.red_measurement()
Command: |
.red_measurement() |
---|---|
Command |
.red_measurement() |
Python |
r = rv.red_measurement() |
Range: |
0 - 255 |
Describe: |
Detect intensity of individual red components of surface. The results are in 0-255 range. |
Result: |
Returns current color sensor "red" value. |
Type or |
Sensor Note: This Rover sensor command is executed immediately. |
rv.green_measurement()
Command: |
.green_measurement() |
---|---|
Command |
.green_measurement() |
Python |
g = rv.green_measurement() |
Range: |
0 - 255 |
Describe: |
Detect intensity of individual green components of surface. The results are in 0-255 range. |
Result: |
Returns current color sensor "green" value. |
Error: |
|
Type or |
Sensor Note: This Rover sensor command is executed immediately. |
rv.blue_measurement():
Command: |
.blue_measurement() |
---|---|
Command |
.blue_measurement() |
Python |
b = rv.blue_measurement() |
Range: |
0 - 255 |
Describe: |
Detect intensity of individual blue components of surface. The results are in 0-255 range. |
Result: |
Returns current color sensor "blue" value. |
Error: |
|
Type or |
Sensor Note: This Rover sensor command is executed immediately. |
rv.gray_measurement():
Command: |
.gray_measurement() |
---|---|
Command |
.gray_measurement() |
Python |
gray = rv.gray_measurement() |
Range: |
0 - 255 |
Describe: |
Detect intensity of individual gray components of surface. The results are in 0-255 range. |
Result: |
Returns current color sensor "gray" value. |
Error: |
|
Type or |
Sensor Note: This Rover sensor command is executed immediately. |
rv.encoders_gyro_measurement()
Command: |
.encoders_gyro_measurement() |
---|---|
Command |
.encoders_gyro_measurement() |
Python |
L1 = rv.encoders_gyro_measurement() |
Range: |
N/A |
Describe: |
The left and right encoder, coupled with the gyro and operating time information. |
Result: |
List of values of current left and right encoder, coupled with gyro and operating time information. |
Type or |
Control Note: This Rover READ command is executed immediately. |
rv.gyro_measurement
Command: |
.gyro_measurement() |
---|---|
Command |
.gyro_measurement() |
Python |
rv.gyro_measurement() |
Range: |
N/A |
Describe: |
The gyroscope is used to maintain the heading of Rover while it’s in motion. It can also be used to measure the change in angle during turns. The gyroscope is ready to use after the CONNECT RV command is processed. The GYRO object shall be usable even when the RV is not in motion.
|
Result: |
Returns current gyro sensor angular deviation from 0.0, reading partially drift-offset compensated. |
Type or |
Control Note: This Rover READ command is executed immediately. |