blueye.sdk.guestport
guestport
Classes:
-
GenericServo–Represents a servo connected to a guest port on the Blueye drone.
-
Gripper–Represents a gripper connected to a guest port on the Blueye drone.
-
GuestPortCamera–Represents a camera connected to a guest port on the Blueye drone.
-
GuestPortLight–Represents a light connected to a guest port on the Blueye drone.
-
Laser–Represents a laser connected to a guest port on the Blueye drone.
-
Peripheral–Represents a peripheral device connected to a guest port on the Blueye drone.
-
SkidServo–Represents the servo on the skid (typically used for multibeams)
Functions:
-
device_to_peripheral–Convert a device to its corresponding peripheral class.
GenericServo
GenericServo(
parent_drone: Drone,
port_number: GuestPortNumber,
device: GuestPortDevice,
)
Represents a servo connected to a guest port on the Blueye drone.
Parameters:
-
parent_drone(Drone) –The parent drone instance.
-
port_number(GuestPortNumber) –The guest port number.
-
device(GuestPortDevice) –The guest port device.
Methods:
Source code in blueye/sdk/guestport.py
226 227 228 229 230 231 232 233 234 235 236 237 238 239 | |
get_angle
get_angle() -> float | None
Get the current angle of the servo.
Returns:
-
float | None–The current angle of the servo in degrees. None if telemetry is not available.
Source code in blueye/sdk/guestport.py
256 257 258 259 260 261 262 263 264 265 266 | |
set_angle
set_angle(angle: float) -> None
Set the angle of the servo.
Parameters:
-
angle(float) –The angle to set for the servo (-90 to 90 degrees).
Raises:
-
ValueError–If the angle is not within the allowed range.
Source code in blueye/sdk/guestport.py
241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |
Gripper
Gripper(
parent_drone: Drone,
port_number: GuestPortNumber,
device: GuestPortDevice,
)
Represents a gripper connected to a guest port on the Blueye drone.
Parameters:
-
parent_drone(Drone) –The parent drone instance.
-
port_number(GuestPortNumber) –The guest port number.
-
device(GuestPortDevice) –The guest port device.
Methods:
-
get_grip_velocity–Get the current grip velocity of the Gripper.
-
get_rotation_velocity–Get the current rotation velocity of the Gripper.
-
set_grip_velocity–Set the current grip velocity of the Gripper.
-
set_rotation_velocity–Set the current rotation velocity of the Gripper.
Source code in blueye/sdk/guestport.py
108 109 110 111 112 113 114 115 116 117 118 119 120 | |
get_grip_velocity
get_grip_velocity() -> float
Get the current grip velocity of the Gripper.
Returns:
-
float–The current grip velocity of the Gripper.
Source code in blueye/sdk/guestport.py
122 123 124 125 126 127 128 | |
get_rotation_velocity
get_rotation_velocity() -> float
Get the current rotation velocity of the Gripper.
Returns:
-
float–The current rotation velocity of the Gripper.
Source code in blueye/sdk/guestport.py
148 149 150 151 152 153 154 | |
set_grip_velocity
set_grip_velocity(value: float)
Set the current grip velocity of the Gripper.
Parameters:
-
value(float) –The new grip velocity to set. Must be a float between -1.0 and 1.0.
Raises:
-
ValueError–If the grip velocity is not between -1.0 and 1.0.
Source code in blueye/sdk/guestport.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
set_rotation_velocity
set_rotation_velocity(value: float)
Set the current rotation velocity of the Gripper.
Parameters:
-
value(float) –The new rotation velocity to set. Must be a float between -1.0 and 1.0.
Raises:
-
ValueError–If the rotation velocity is not between -1.0 and 1.0.
Source code in blueye/sdk/guestport.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
GuestPortCamera
GuestPortCamera(
parent_drone: Drone,
port_number: GuestPortNumber,
device: GuestPortDevice,
)
Represents a camera connected to a guest port on the Blueye drone.
Parameters:
-
parent_drone(Drone) –The parent drone instance.
-
port_number(GuestPortNumber) –The guest port number.
-
device(GuestPortDevice) –The guest port device.
Methods:
-
configure–Return a context manager for batching camera parameter changes.
-
enable_ehdr–Enable or disable the eHDR mode.
-
get_backlight_compensation–Get the camera backlight compensation.
-
get_bitrate–Get the video stream bitrate.
-
get_bitrate_still_picture–Get the bitrate for the still picture stream.
-
get_brightness–Get the camera brightness.
-
get_contrast–Get the camera contrast.
-
get_denoise–Get the camera noise reduction.
-
get_ehdr_exposure_max_number–Get the maximum number of eHDR frames.
-
get_ehdr_exposure_min_number–Get the minimum number of eHDR frames.
-
get_exposure–Get the camera exposure.
-
get_framerate–Get the camera frame rate.
-
get_gain–Get the camera gain.
-
get_gamma–Get the camera gamma.
-
get_hue–Get the camera hue.
-
get_mtu_size–Get the network MTU size used for video streaming.
-
get_record_time–Get the duration of the current camera recording.
-
get_recording_bitrate–Get the recording bitrate in bits per second.
-
get_recording_codec–Get the recording video codec.
-
get_recording_resolution–Get the camera recording resolution.
-
get_resolution–Get the camera resolution.
-
get_saturation–Get the camera saturation.
-
get_sharpness–Get the camera sharpness.
-
get_stream_resolution–Get the camera stream resolution.
-
get_streaming_protocol–Get the streaming protocol (codec used for the RTSP stream).
-
get_whitebalance–Get the camera white balance.
-
is_ehdr_enabled–Get the state of the eHDR mode.
-
is_recording_active–Get the camera recording state.
-
set_backlight_compensation–Set the camera backlight compensation.
-
set_bitrate–Set the video stream bitrate.
-
set_bitrate_still_picture–Set the bitrate for the still picture stream.
-
set_brightness–Set the camera brightness.
-
set_contrast–Set the camera contrast.
-
set_denoise–Set the camera noise reduction.
-
set_ehdr_exposure_max_number–Set the maximum number of eHDR frames.
-
set_ehdr_exposure_min_number–Set the minimum number of eHDR frames.
-
set_exposure–Set the camera exposure.
-
set_framerate–Set the camera frame rate.
-
set_gain–Set the camera gain.
-
set_gamma–Set the camera gamma.
-
set_hue–Set the camera hue.
-
set_mtu_size–Set the network MTU size used for video streaming.
-
set_recording–Set the camera recording state.
-
set_recording_bitrate–Set the recording bitrate in bits per second.
-
set_recording_codec–Set the recording video codec.
-
set_recording_resolution–Set the camera recording resolution.
-
set_resolution–Set the camera resolution.
-
set_saturation–Set the camera saturation.
-
set_sharpness–Set the camera sharpness.
-
set_stream_resolution–Set the camera stream resolution.
-
set_streaming_protocol–Set the streaming protocol (codec used for the RTSP stream).
-
set_whitebalance–Set the camera white balance.
-
take_picture–Take a still picture and store it locally on the drone.
Source code in blueye/sdk/guestport.py
55 56 57 58 59 60 61 62 63 64 65 66 | |
configure
configure(timeout: float = 0.5) -> _ParamsBatch
Return a context manager for batching camera parameter changes.
All attribute assignments on the returned object are accumulated and sent as a single
set_camera_parameters request when the with block exits. If an exception is
raised inside the block the changes are discarded.
Parameters take the same names and values as the corresponding setters; the protobuf field names and enums are accepted as well.
Parameters:
-
timeout(float, default:0.5) –Timeout in seconds for the request. Increase when changing parameters that trigger pipeline restarts (e.g. codec, resolution).
Raises:
-
ValueError–If a value is not valid for the parameter being set.
-
RuntimeError–If a parameter requires a newer Blunux version than the drone runs.
Usage::
with drone.camera.configure() as params:
params.recording_codec = bp.RecordingCodec.RECORDING_CODEC_H265
params.recording_bitrate = 20_000_000
# sent here
Source code in blueye/sdk/camera.py
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 | |
enable_ehdr
enable_ehdr(enable_ehdr: bool)
Enable or disable the eHDR mode.
Only available on Ultra.
Parameters:
-
enable_ehdr(bool) –True to enable eHDR mode, False to disable it. Enabled by default.
Raises:
-
RuntimeError–If the connected drone is running a Blunux version older than 5.0.0.
Source code in blueye/sdk/camera.py
1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 | |
get_backlight_compensation
get_backlight_compensation() -> int
Get the camera backlight compensation.
Only available on Ultra.
Returns:
-
int–The camera backlight compensation.
Source code in blueye/sdk/camera.py
1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 | |
get_bitrate
get_bitrate() -> int
Get the video stream bitrate.
Returns:
-
int–The H264 video stream bitrate.
Source code in blueye/sdk/camera.py
1058 1059 1060 1061 1062 1063 1064 1065 | |
get_bitrate_still_picture
get_bitrate_still_picture() -> int
Get the bitrate for the still picture stream.
Returns:
-
int–The still picture stream bitrate.
Source code in blueye/sdk/camera.py
1081 1082 1083 1084 1085 1086 1087 1088 | |
get_brightness
get_brightness() -> int
Get the camera brightness.
Only available on Ultra.
Returns:
-
int–The camera brightness.
Source code in blueye/sdk/camera.py
1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 | |
get_contrast
get_contrast() -> int
Get the camera contrast.
Only available on Ultra.
Returns:
-
int–The camera contrast.
Source code in blueye/sdk/camera.py
1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 | |
get_denoise
get_denoise() -> int
Get the camera noise reduction.
Only available on Ultra.
Returns:
-
int–The camera noise reduction.
Source code in blueye/sdk/camera.py
1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 | |
get_ehdr_exposure_max_number
get_ehdr_exposure_max_number() -> int
Get the maximum number of eHDR frames.
Only available on Ultra.
Returns:
-
int–The maximum number of eHDR frames.
Source code in blueye/sdk/camera.py
1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 | |
get_ehdr_exposure_min_number
get_ehdr_exposure_min_number() -> int
Get the minimum number of eHDR frames.
Only available on Ultra.
Returns:
-
int–The minimum number of eHDR frames.
Source code in blueye/sdk/camera.py
1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 | |
get_exposure
get_exposure() -> int
Get the camera exposure.
Returns:
-
int–The camera exposure.
Source code in blueye/sdk/camera.py
1106 1107 1108 1109 1110 1111 1112 1113 | |
get_framerate
get_framerate() -> int
Get the camera frame rate.
Raises:
-
RuntimeError–If the drone reports a frame rate the SDK does not recognize.
Returns:
-
int–The camera frame rate.
Source code in blueye/sdk/camera.py
1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 | |
get_gain
get_gain() -> float
Get the camera gain.
Only available on Pioneer/Pro/X1/X3.
Returns:
-
float–The camera ISO gain.
Source code in blueye/sdk/camera.py
1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 | |
get_gamma
get_gamma() -> int
Get the camera gamma.
Only available on Ultra.
Returns:
-
int–The camera gamma.
Source code in blueye/sdk/camera.py
1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 | |
get_hue
get_hue() -> int
Get the camera hue.
Returns:
-
int–The camera hue.
Source code in blueye/sdk/camera.py
1153 1154 1155 1156 1157 1158 1159 1160 | |
get_mtu_size
get_mtu_size() -> int
Get the network MTU size used for video streaming.
Returns:
-
int–The MTU size in bytes (0 if the drone default is used).
Source code in blueye/sdk/camera.py
1760 1761 1762 1763 1764 1765 1766 1767 | |
get_record_time
get_record_time() -> Optional[int]
Get the duration of the current camera recording.
Returns:
-
Optional[int]–The length in seconds of the current recording, -1 if the camera is not currently recording. Returns None if the SDK hasn't received a RecordState telemetry message.
Source code in blueye/sdk/camera.py
1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 | |
get_recording_bitrate
get_recording_bitrate() -> int
Get the recording bitrate in bits per second.
A value of 0 means the drone will auto-compute a default bitrate based on the current resolution, framerate, and codec.
Returns:
-
int–The current recording bitrate in bits per second (0 if automatic).
Source code in blueye/sdk/camera.py
1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 | |
get_recording_codec
get_recording_codec() -> RecordingCodec
Get the recording video codec.
Returns:
-
RecordingCodec–The current recording codec setting.
Source code in blueye/sdk/camera.py
1670 1671 1672 1673 1674 1675 1676 1677 | |
get_recording_resolution
get_recording_resolution() -> Resolution
Get the camera recording resolution.
For drones running Blunux version < 4.4.1 this is the same as the
get_resolution method.
Returns:
-
Resolution–The camera recording resolution.
Source code in blueye/sdk/camera.py
1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 | |
get_resolution
get_resolution() -> int
Get the camera resolution.
Deprecated
Drones running Blunux 4.4 or newer take the resolution from the stream and recording
resolution fields. Use
get_stream_resolution and
get_recording_resolution
instead.
Raises:
-
RuntimeError–If the drone reports a resolution the SDK does not recognize.
Returns:
-
int–The camera resolution.
Source code in blueye/sdk/camera.py
1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 | |
get_saturation
get_saturation() -> int
Get the camera saturation.
Only available on Ultra.
Returns:
-
int–The camera saturation.
Source code in blueye/sdk/camera.py
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 | |
get_sharpness
get_sharpness() -> int
Get the camera sharpness.
Only available on Ultra.
Returns:
-
int–The camera sharpness.
Source code in blueye/sdk/camera.py
1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 | |
get_stream_resolution
get_stream_resolution() -> Resolution
Get the camera stream resolution.
For drones running blunux version < 4.4.1 this is the same as the
get_resolution method.
Returns:
-
Resolution–The camera stream resolution
Source code in blueye/sdk/camera.py
1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 | |
get_streaming_protocol
get_streaming_protocol() -> StreamingProtocol
Get the streaming protocol (codec used for the RTSP stream).
Returns:
-
StreamingProtocol–The current streaming protocol.
Source code in blueye/sdk/camera.py
1733 1734 1735 1736 1737 1738 1739 1740 | |
get_whitebalance
get_whitebalance() -> int
Get the camera white balance.
Returns:
-
int–The camera white balance.
Source code in blueye/sdk/camera.py
1130 1131 1132 1133 1134 1135 1136 1137 | |
is_ehdr_enabled
is_ehdr_enabled() -> bool
Get the state of the eHDR mode.
Only available on Ultra.
Returns:
-
bool–The current state of the eHDR mode.
Source code in blueye/sdk/camera.py
1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 | |
is_recording_active
is_recording_active() -> Optional[bool]
Get the camera recording state.
Returns:
-
Optional[bool]–True if the camera is currently recording, False if not. Returns None if the SDK hasn't received a RecordState telemetry message.
Source code in blueye/sdk/camera.py
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 | |
set_backlight_compensation
set_backlight_compensation(compensation: int)
Set the camera backlight compensation.
Only available on Ultra.
Parameters:
-
compensation(int) –Set the backlight compensation (-150..150), 10 is the default.
Raises:
-
RuntimeError–If the connected drone is running a Blunux version older than 5.0.0.
Source code in blueye/sdk/camera.py
1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 | |
set_bitrate
set_bitrate(bitrate: int)
Set the video stream bitrate.
Parameters:
-
bitrate(int) –Set the video stream bitrate in bits, valid values are in range (1 000 000 .. 16 000 000).
Source code in blueye/sdk/camera.py
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 | |
set_bitrate_still_picture
set_bitrate_still_picture(bitrate: int)
Set the bitrate for the still picture stream.
Parameters:
-
bitrate(int) –Set the still picture stream bitrate in bits, valid values are in range (1 000 000 .. 300 000 000). Default value is 100 000 000.
Source code in blueye/sdk/camera.py
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 | |
set_brightness
set_brightness(brightness: int)
Set the camera brightness.
Only available on Ultra.
Parameters:
-
brightness(int) –Set the brightness (-10..10), 0 is the default.
Raises:
-
RuntimeError–If the connected drone is running a Blunux version older than 5.0.0.
Source code in blueye/sdk/camera.py
1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 | |
set_contrast
set_contrast(contrast: int)
Set the camera contrast.
Only available on Ultra.
Parameters:
-
contrast(int) –Set the contrast (-50..50), 0 is the default.
Raises:
-
RuntimeError–If the connected drone is running a Blunux version older than 5.0.0.
Source code in blueye/sdk/camera.py
1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 | |
set_denoise
set_denoise(denoise: int)
Set the camera noise reduction.
Only available on Ultra.
Parameters:
-
denoise(int) –Set the noise reduction (-20..20), -20 is the default.
Raises:
-
RuntimeError–If the connected drone is running a Blunux version older than 5.0.0.
Source code in blueye/sdk/camera.py
1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 | |
set_ehdr_exposure_max_number
set_ehdr_exposure_max_number(number: int)
Set the maximum number of eHDR frames.
Only available on Ultra.
Parameters:
-
number(int) –Set the maximum number of eHDR frames (1..4), 2 is the default. Setting it higher than 2 can reduce the frame rate.
Raises:
-
RuntimeError–If the connected drone is running a Blunux version older than 5.0.0.
Source code in blueye/sdk/camera.py
1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 | |
set_ehdr_exposure_min_number
set_ehdr_exposure_min_number(number: int)
Set the minimum number of eHDR frames.
Only available on Ultra.
Parameters:
-
number(int) –Set the minimum number of eHDR frames (1..4), 1 is the default.
Raises:
-
RuntimeError–If the connected drone is running a Blunux version older than 5.0.0.
Source code in blueye/sdk/camera.py
1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 | |
set_exposure
set_exposure(exposure: int)
Set the camera exposure.
Parameters:
-
exposure(int) –Set the camera exposure time. Unit is thousandths of a second, ie. 5 = 5s/1000. Valid values are in the range (1 .. 5000) or -1 for auto exposure.
Source code in blueye/sdk/camera.py
1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 | |
set_framerate
set_framerate(framerate: int)
Set the camera frame rate.
Parameters:
-
framerate(int) –Set the camera frame rate in frames per second. Valid values are 25, 30 or 60. 25 fps is only supported on Pioneer/Pro/X1/X3, and 60 fps only on the Ultra at 1440p or lower. If the requested frame rate is not supported at the current resolution the drone reduces it while respecting the resolution.
Raises:
-
ValueError–If the frame rate is not 25, 30 or 60.
Source code in blueye/sdk/camera.py
1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 | |
set_gain
set_gain(gain: float)
Set the camera gain.
Only available on Pioneer/Pro/X1/X3.
Parameters:
-
gain(float) –Set the ISO gain (0..1).
Source code in blueye/sdk/camera.py
1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 | |
set_gamma
set_gamma(gamma: int)
Set the camera gamma.
Only available on Ultra.
Parameters:
-
gamma(int) –Set the gamma (4..79), 22 is the default.
Raises:
-
RuntimeError–If the connected drone is running a Blunux version older than 5.0.0.
Source code in blueye/sdk/camera.py
1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 | |
set_hue
set_hue(hue: int)
Set the camera hue.
Parameters:
-
hue(int) –Set the camera hue. Valid values are in the range (-40..40).
Source code in blueye/sdk/camera.py
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 | |
set_mtu_size
set_mtu_size(mtu_size: int)
Set the network MTU size used for video streaming.
Parameters:
-
mtu_size(int) –Set the MTU size in bytes (68..65535). The Blueye app allows values between 500 and 1460. A value of 0 means the drone uses its default of 1400.
Raises:
-
RuntimeError–If the connected drone is running a Blunux version older than 5.1.0.
Source code in blueye/sdk/camera.py
1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 | |
set_recording
set_recording(start_recording: bool)
Set the camera recording state.
Parameters:
-
start_recording(bool) –Set to True to start a recording, set to False to stop the current recording.
Warns:
-
RuntimeWarning–If no recording state telemetry data is received.
Source code in blueye/sdk/camera.py
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 | |
set_recording_bitrate
set_recording_bitrate(bitrate: int)
Set the recording bitrate in bits per second.
A value of 0 means the drone will auto-compute a default bitrate based on the current resolution, framerate, and codec.
Parameters:
-
bitrate(int) –Set the recording bitrate in bits per second. Use 0 for automatic.
Raises:
-
RuntimeError–If the connected drone is running Blunux older than 5.0.0.
Source code in blueye/sdk/camera.py
1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 | |
set_recording_codec
set_recording_codec(codec: RecordingCodec)
Set the recording video codec.
Parameters:
-
codec(RecordingCodec) –Set the recording codec. RECORDING_CODEC_UNSPECIFIED uses the platform default (H.264). RECORDING_CODEC_H265 is only available on Ultra.
Raises:
-
ValueError–If the codec is not a valid
blueye.protocol.RecordingCodectype. -
RuntimeError–If the connected drone is running Blunux older than 5.0.0.
Source code in blueye/sdk/camera.py
1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 | |
set_recording_resolution
set_recording_resolution(resolution: Resolution)
Set the camera recording resolution.
For drones running Blunux version < 4.4.1 this is the same as the
set_resolution method.
Parameters:
-
resolution(Resolution) –Set the camera recording resolution.
Raises:
-
ValueError–If the resolution is not a valid
blueye.protocol.Resolutiontype
Source code in blueye/sdk/camera.py
1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 | |
set_resolution
set_resolution(resolution: int)
Set the camera resolution.
Deprecated
Drones running Blunux 4.4 or newer ignore this field when camera parameters are set,
so calling this method has no effect on them. Use
set_stream_resolution and
set_recording_resolution
instead.
Parameters:
-
resolution(int) –Set the camera in vertical pixels. Valid values are 480, 720, 1080, 1440 or 2160.
Raises:
-
ValueError–If the resolution is not one of the valid values.
Source code in blueye/sdk/camera.py
1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 | |
set_saturation
set_saturation(saturation: int)
Set the camera saturation.
Only available on Ultra.
Parameters:
-
saturation(int) –Set the saturation (0..50), 8 is the default.
Raises:
-
RuntimeError–If the connected drone is running a Blunux version older than 5.0.0.
Source code in blueye/sdk/camera.py
1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 | |
set_sharpness
set_sharpness(sharpness: int)
Set the camera sharpness.
Only available on Ultra.
Parameters:
-
sharpness(int) –Set the sharpness (-20..20), -20 is the default.
Raises:
-
RuntimeError–If the connected drone is running a Blunux version older than 5.0.0.
Source code in blueye/sdk/camera.py
1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 | |
set_stream_resolution
set_stream_resolution(resolution: Resolution)
Set the camera stream resolution.
For drones running blunux version < 4.4.1 this is the same as the
set_resolution method.
Parameters:
-
resolution(Resolution) –Set the camera stream resolution.
Raises:
-
ValueError–If the resolution is not a valid
blueye.protocol.Resolutiontype
Source code in blueye/sdk/camera.py
1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 | |
set_streaming_protocol
set_streaming_protocol(protocol: StreamingProtocol)
Set the streaming protocol (codec used for the RTSP stream).
Parameters:
-
protocol(StreamingProtocol) –Set the streaming protocol.
Raises:
-
ValueError–If the protocol is not a valid
blueye.protocol.StreamingProtocoltype.
Source code in blueye/sdk/camera.py
1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 | |
set_whitebalance
set_whitebalance(white_balance: int)
Set the camera white balance.
Parameters:
-
white_balance(int) –Set the camera white balance. Valid values are in the range (2800..9300) or -1 for auto white balance.
Source code in blueye/sdk/camera.py
1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 | |
take_picture
take_picture()
Take a still picture and store it locally on the drone.
These pictures can be downloaded with the Blueye App, or by any WebDAV compatible client.
Source code in blueye/sdk/camera.py
1802 1803 1804 1805 1806 1807 | |
GuestPortLight
GuestPortLight(
parent_drone: Drone,
port_number: GuestPortNumber,
device: GuestPortDevice,
)
Represents a light connected to a guest port on the Blueye drone.
Parameters:
-
parent_drone(Drone) –The parent drone instance.
-
port_number(GuestPortNumber) –The guest port number.
-
device(GuestPortDevice) –The guest port device.
Methods:
-
get_intensity–Get the intensity of the guest port light.
-
set_intensity–Set the intensity of the guest port light.
Source code in blueye/sdk/guestport.py
74 75 76 77 78 79 80 81 82 83 84 | |
get_intensity
get_intensity() -> Optional[float]
Get the intensity of the guest port light.
Returns:
-
Optional[float]–The intensity of the light (0..1).
Source code in blueye/sdk/guestport.py
94 95 96 97 98 99 100 | |
set_intensity
set_intensity(intensity: float)
Set the intensity of the guest port light.
Parameters:
-
intensity(float) –The intensity of the light (0..1).
Source code in blueye/sdk/guestport.py
86 87 88 89 90 91 92 | |
Laser
Laser(
parent_drone: Drone,
port_number: GuestPortNumber,
device: GuestPortDevice,
)
Represents a laser connected to a guest port on the Blueye drone.
Parameters:
-
parent_drone(Drone) –The parent drone instance.
-
port_number(GuestPortNumber) –The guest port number.
-
device(GuestPortDevice) –The guest port device.
Methods:
-
get_intensity–Get the current intensity of the laser.
-
set_intensity–Set the intensity of the laser.
Source code in blueye/sdk/guestport.py
180 181 182 183 184 185 186 187 188 189 190 | |
get_intensity
get_intensity() -> Optional[float]
Get the current intensity of the laser.
Returns:
-
Optional[float]–The current intensity of the laser.
Source code in blueye/sdk/guestport.py
208 209 210 211 212 213 214 215 216 217 218 | |
set_intensity
set_intensity(intensity: float)
Set the intensity of the laser.
If the laser does not support dimming but only on and off, a value of 0 turns the laser off, and any value above 0 turns the laser on.
Parameters:
-
intensity(float) –The intensity of the laser (0..1).
Raises:
-
ValueError–If the intensity is not between 0 and 1.
Source code in blueye/sdk/guestport.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
Peripheral
Peripheral(
parent_drone: Drone,
port_number: GuestPortNumber,
device: GuestPortDevice,
)
Represents a peripheral device connected to a guest port on the Blueye drone.
Parameters:
-
parent_drone(Drone) –The parent drone instance.
-
port_number(GuestPortNumber) –The guest port number.
-
device(GuestPortDevice) –The guest port device.
Source code in blueye/sdk/guestport.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
SkidServo
SkidServo(
parent_drone: Drone,
port_number: GuestPortNumber,
device: GuestPortDevice,
)
Represents the servo on the skid (typically used for multibeams)
Parameters:
-
parent_drone(Drone) –The parent drone instance.
-
port_number(GuestPortNumber) –The guest port number.
-
device(GuestPortDevice) –The guest port device.
Methods:
Source code in blueye/sdk/guestport.py
274 275 276 277 278 279 280 281 282 283 284 285 286 | |
get_angle
get_angle() -> float | None
Get the current angle of the skid servo.
Returns:
-
float | None–The current angle of the skid servo in degrees. None if telemetry is not available.
Source code in blueye/sdk/guestport.py
303 304 305 306 307 308 309 310 311 312 313 | |
set_angle
set_angle(angle: float) -> None
Set the angle of the skid servo.
Parameters:
-
angle(float) –The angle to set for the servo (-28 to 28 degrees).
Raises:
-
ValueError–If the angle is not within the allowed range.
Source code in blueye/sdk/guestport.py
288 289 290 291 292 293 294 295 296 297 298 299 300 301 | |
device_to_peripheral
device_to_peripheral(
parent_drone: Drone,
port_number: GuestPortNumber,
device: GuestPortDevice,
) -> Peripheral
Convert a device to its corresponding peripheral class.
Parameters:
-
parent_drone(Drone) –The parent drone instance.
-
port_number(GuestPortNumber) –The guest port number.
-
device(GuestPortDevice) –The guest port device.
Returns:
-
Peripheral–The corresponding peripheral class instance.
Source code in blueye/sdk/guestport.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | |