Reference
BaseKevinbotSubsystem
The base subsystem class.
Not to be used directly
Source code in src/kevinbotlib/core.py
29 30 31 32 33 34 35 36 37 |
|
BaseKevinbot
The base robot class.
Not to be used directly
Source code in src/kevinbotlib/core.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
auto_disconnect: bool
property
writable
Getter for auto disconnect state.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Whether to disconnect on application exit |
auto_disable: bool
property
writable
Getter for auto disable state.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Whether to disconnect on application exit |
get_state()
Gets the current state of the robot
Returns:
Name | Type | Description |
---|---|---|
KevinbotState |
KevinbotState
|
State class |
Source code in src/kevinbotlib/core.py
54 55 56 57 58 59 60 |
|
disconnect()
Basic robot disconnect
Source code in src/kevinbotlib/core.py
62 63 64 65 66 |
|
send(data)
Null implementation of the send method
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
str
|
Data to send nowhere |
required |
Raises:
Type | Description |
---|---|
NotImplementedError
|
Always raised |
Source code in src/kevinbotlib/core.py
108 109 110 111 112 113 114 115 116 117 118 |
|
request_enable()
Request the core to enable
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Always 1 |
Source code in src/kevinbotlib/core.py
120 121 122 123 124 125 126 127 |
|
request_disable()
Request the core to disable
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Always 1 |
Source code in src/kevinbotlib/core.py
129 130 131 132 133 134 135 136 |
|
e_stop()
Attempt to send and E-Stop signal to the Core
Source code in src/kevinbotlib/core.py
138 139 140 141 |
|
SerialKevinbot
Bases: BaseKevinbot
The main serial robot class
Source code in src/kevinbotlib/core.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 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 357 358 359 360 361 362 363 |
|
connect(port, baud, timeout, tick_interval, ser_timeout=0.5, *, tick_thread=True)
Start a connection with Kevinbot Core
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port
|
str
|
Serial port to use ( |
required |
baud
|
int
|
Baud rate to use ( |
required |
timeout
|
float
|
Timeout for handshake |
required |
tick_interval
|
float
|
How often a heartbeat should be produced |
required |
ser_timeout
|
float
|
Readline timeout, should be lower than |
0.5
|
tick_thread
|
bool
|
Whether a tick thread should be started. Defaults to True. |
True
|
Raises:
Type | Description |
---|---|
HandshakeTimeoutException
|
Core didn't respond to the connection handshake before the timeout |
Source code in src/kevinbotlib/core.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
disconnect()
Disconnect core gracefully
Source code in src/kevinbotlib/core.py
216 217 218 219 220 221 222 223 224 |
|
tick_loop(interval=1)
Send ticks indefinetely
Parameters:
Name | Type | Description | Default |
---|---|---|---|
interval
|
float
|
Interval between ticks in seconds. Defaults to 1. |
1
|
Source code in src/kevinbotlib/core.py
234 235 236 237 238 239 240 241 242 |
|
send(data)
Send a string through serial.
Automatically adds a newline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
str
|
Data to send |
required |
Source code in src/kevinbotlib/core.py
244 245 246 247 248 249 250 251 252 |
|
raw_tx(data)
Send raw bytes over serial.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
bytes
|
Raw data |
required |
Source code in src/kevinbotlib/core.py
254 255 256 257 258 259 260 261 262 263 |
|
MqttKevinbot
Bases: BaseKevinbot
KevinbotLib interface over MQTT
Source code in src/kevinbotlib/core.py
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 |
|
__init__(cid=None)
Instansiate a new KevinbotLib interface over MQTT
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cid
|
str | None
|
MQTT Client id. Defaults to an auto-generated uuid. |
None
|
Source code in src/kevinbotlib/core.py
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
|
connect(root_topic='kevinbot', host='localhost', port=1883, keepalive=60)
Connect to MQTT Broker
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root_topic
|
str
|
Root communication topic. Defaults to "kevinbot". |
'kevinbot'
|
host
|
str
|
KevinbotLib server host. Defaults to "localhost". |
'localhost'
|
port
|
int
|
Kevinbot MQTT Broker port. Defaults to 1883. |
1883
|
keepalive
|
int
|
Maximum period in seconds between communications with the broker. Defaults to 60. |
60
|
Returns:
Name | Type | Description |
---|---|---|
MQTTErrorCode |
MQTTErrorCode
|
Connection error |
Source code in src/kevinbotlib/core.py
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
|
send(data)
Determine topic and publish data. Compatible with send of SerialKevinbot
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
str
|
Data to parse and publish |
required |
Source code in src/kevinbotlib/core.py
420 421 422 423 424 425 426 427 428 429 430 431 432 |
|
disconnect()
Disconnect from server
Source code in src/kevinbotlib/core.py
434 435 436 437 |
|
request_enable()
Request the core to enable
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Always 1 |
Source code in src/kevinbotlib/core.py
439 440 441 442 443 444 445 446 |
|
request_disable()
Request the core to disable
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Always 1 |
Source code in src/kevinbotlib/core.py
448 449 450 451 452 453 454 455 |
|
e_stop()
Attempt to send and E-Stop signal to the Core
Source code in src/kevinbotlib/core.py
457 458 459 |
|
Drivebase
Bases: BaseKevinbotSubsystem
Drivebase subsystem for Kevinbot
Source code in src/kevinbotlib/core.py
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 |
|
get_amps()
Get the amps being used by the drivebase
Returns:
Type | Description |
---|---|
list[float]
|
list[float]: Amps |
Source code in src/kevinbotlib/core.py
484 485 486 487 488 489 490 |
|
get_watts()
Get the watts being used by the drivebase
Returns:
Type | Description |
---|---|
list[float]
|
list[float]: Watts |
Source code in src/kevinbotlib/core.py
492 493 494 495 496 497 498 |
|
get_powers()
Get the currently set wheel speeds in percent
Returns:
Type | Description |
---|---|
tuple[int, int]
|
tuple[int, int]: Percent values from 0 to 100 |
Source code in src/kevinbotlib/core.py
500 501 502 503 504 505 506 |
|
get_states()
Get the wheels states
Returns:
Type | Description |
---|---|
list[MotorDriveStatus]
|
list[MotorDriveStatus]: States |
Source code in src/kevinbotlib/core.py
508 509 510 511 512 513 514 |
|
drive_at_power(left, right)
Set the drive power for wheels. 0 to 1
Parameters:
Name | Type | Description | Default |
---|---|---|---|
left
|
float
|
Left motor power |
required |
right
|
float
|
Right motor power |
required |
Source code in src/kevinbotlib/core.py
516 517 518 519 520 521 522 523 524 525 526 |
|
stop()
Set all wheel powers to 0
Source code in src/kevinbotlib/core.py
528 529 530 531 532 533 |
|
Servo
Individually controllable servo
Source code in src/kevinbotlib/core.py
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 |
|
bank: int
property
Get the bank the servo is in
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Bank number |
angle: int
property
writable
Get the optimistic current servo angle
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Angle in degrees |
Servos
Bases: BaseKevinbotSubsystem
Servo subsystem for Kevinbot
Source code in src/kevinbotlib/core.py
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 |
|
__len__()
Length will always be 32 since the P2 Kevinbot Board can only control 32
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Number of servos in the subsystem |
Source code in src/kevinbotlib/core.py
581 582 583 584 585 586 587 |
|
get_servo(channel)
Get an individual servo in the subsystem
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
int
|
PWM Port |
required |
Returns:
Name | Type | Description |
---|---|---|
Servo |
Servo
|
Individual servo |
Source code in src/kevinbotlib/core.py
602 603 604 605 606 607 608 609 610 611 612 613 614 |
|
Lighting
Bases: BaseKevinbotSubsystem
Lighting subsystem for Kevinbot
Source code in src/kevinbotlib/core.py
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 |
|
Channel
Bases: Enum
Lighting segment identifier
Source code in src/kevinbotlib/core.py
631 632 633 634 635 636 |
|
get_state()
Get the state of the robot's light segments
Returns:
Name | Type | Description |
---|---|---|
LightingState |
LightingState
|
State |
Source code in src/kevinbotlib/core.py
638 639 640 641 642 643 644 |
|
set_cam_brightness(brightness)
Set brightness of camera illumination
Parameters:
Name | Type | Description | Default |
---|---|---|---|
brightness
|
int
|
Brightness from 0 to 255 |
required |
Source code in src/kevinbotlib/core.py
646 647 648 649 650 651 652 653 |
|
set_brightness(channel, brightness)
Set the brightness of a lighting segment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
Channel
|
Base, Body, or Head |
required |
brightness
|
int
|
Brightness from 0 to 255 |
required |
Source code in src/kevinbotlib/core.py
655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 |
|
set_color1(channel, color)
Set the Color 1 of a lighting segment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
Channel
|
Base, Body, or Head |
required |
color
|
Iterable[int]
|
RGB Color values. Must have a length of 3 |
required |
Source code in src/kevinbotlib/core.py
671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 |
|
set_color2(channel, color)
Set the Color 2 of a lighting segment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
Channel
|
Base, Body, or Head |
required |
color
|
Iterable[int]
|
RGB Color values. Must have a length of 3 |
required |
Source code in src/kevinbotlib/core.py
687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 |
|
set_effect(channel, effect)
Set the animation of a lighting segment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
Channel
|
Base, Body, or Head |
required |
effect
|
str
|
Animation ID |
required |
Source code in src/kevinbotlib/core.py
703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 |
|
set_update(channel, update)
Set the animation of a lighting segment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
Channel
|
Base, Body, or Head |
required |
update
|
int
|
Update rate (no fixed unit) |
required |
Source code in src/kevinbotlib/core.py
719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 |
|
BaseKevinbotEyes
The base Kevinbot Eyes class.
Not to be used directly
Source code in src/kevinbotlib/eyes.py
19 20 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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
auto_disconnect: bool
property
writable
Getter for auto disconnect state.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Whether to disconnect on application exit |
get_state()
Gets the current state of the eyes
Returns:
Name | Type | Description |
---|---|---|
KevinbotEyesState |
KevinbotEyesState
|
State class |
Source code in src/kevinbotlib/eyes.py
31 32 33 34 35 36 37 |
|
disconnect()
Basic disconnect
Source code in src/kevinbotlib/eyes.py
39 40 41 |
|
send(data)
Null implementation of the send method
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
str
|
Data to send nowhere |
required |
Raises:
Type | Description |
---|---|
NotImplementedError
|
Always raised |
Source code in src/kevinbotlib/eyes.py
65 66 67 68 69 70 71 72 73 74 75 |
|
SerialEyes
Bases: BaseKevinbotEyes
The main serial Kevinbot Eyes class
Source code in src/kevinbotlib/eyes.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
|
connect(port, baud, timeout, ser_timeout=0.5)
Start a connection with Kevinbot Eyes
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port
|
str
|
Serial port to use ( |
required |
baud
|
int
|
Baud rate to use ( |
required |
timeout
|
float
|
Timeout for handshake |
required |
ser_timeout
|
float
|
Readline timeout, should be lower than |
0.5
|
Raises:
Type | Description |
---|---|
HandshakeTimeoutException
|
Eyes didn't respond to the connection handshake before the timeout |
Source code in src/kevinbotlib/eyes.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
send(data)
Send a string through serial.
Automatically adds a newline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
str
|
Data to send |
required |
Source code in src/kevinbotlib/eyes.py
145 146 147 148 149 150 151 152 153 |
|
raw_tx(data)
Send raw bytes over serial.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
bytes
|
Raw data |
required |
Source code in src/kevinbotlib/eyes.py
155 156 157 158 159 160 161 162 163 164 |
|
set_skin(skin)
Set the current skin
Parameters:
Name | Type | Description | Default |
---|---|---|---|
skin
|
int
|
Skin index |
required |
Source code in src/kevinbotlib/eyes.py
249 250 251 252 253 254 255 256 |
|
WirelessRadio
Bases: BaseKevinbotSubsystem
Source code in src/kevinbotlib/xbee.py
13 14 15 16 17 18 19 20 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 |
|
__init__(robot, port, baud, api, timeout)
Initialize Kevinbot Wireless Radio (XBee)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
robot
|
Kevinbot
|
The main robot class |
required |
port
|
str
|
Serial port to connect to |
required |
baud
|
int
|
Baud rate for serial interface |
required |
api
|
int
|
API mode for xbee interface |
required |
timeout
|
float
|
Timeout for serial operations |
required |
Source code in src/kevinbotlib/xbee.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
get()
Get the latest packet (blocking)
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
Data packet |
Source code in src/kevinbotlib/xbee.py
35 36 37 38 39 40 41 |
|
disconnect()
Disconnect robot radio, and halt processing
Source code in src/kevinbotlib/xbee.py
43 44 45 46 |
|
CoreErrors
Bases: Enum
Kevinbot Core Error States
Source code in src/kevinbotlib/states.py
10 11 12 13 14 15 16 17 18 19 20 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 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
OK = 0
class-attribute
instance-attribute
No errors are present
UNKNOWN = 1
class-attribute
instance-attribute
Error state unknown
OW_SHORT = 2
class-attribute
instance-attribute
One-Wire bus is shorted
OW_ERROR = 3
class-attribute
instance-attribute
One-Wire bus error
OW_DNF = 4
class-attribute
instance-attribute
One-Wire device not found
LCD_INIT_FAIL = 5
class-attribute
instance-attribute
LCD Init failed
PCA_INIT_FAIL = 6
class-attribute
instance-attribute
PCA9685 (servos) init fail
TICK_FAIL = 7
class-attribute
instance-attribute
Failure to recieve core tick
QUEUE_OVERRUN = 8
class-attribute
instance-attribute
Serial queue overrun
ESTOP = 9
class-attribute
instance-attribute
Core is in E-Stop state
BME_CHIP_ID = 10
class-attribute
instance-attribute
Error getting environment sensor chip id
BME_CALIB_NVM = 11
class-attribute
instance-attribute
Error with environment sensor calibration
BME_CALIB_TP = 12
class-attribute
instance-attribute
Error with environment sensor calibration
BME_CALIB_HUM = 13
class-attribute
instance-attribute
Error with environment sensor calibration
BME_THP = 14
class-attribute
instance-attribute
Error with environment sensor
BME_MEAS_TIMEOUT = 15
class-attribute
instance-attribute
Timeout with environment sensor measurement
BME_NOT_NORMAL_MODE = 16
class-attribute
instance-attribute
Environemnt sensor is not in normal mode
BATT1_UV = 17
class-attribute
instance-attribute
Battery #1 Undervoltage
BATT1_OV = 18
class-attribute
instance-attribute
Battery #1 Overvoltage
BATT2_UV = 19
class-attribute
instance-attribute
Battery #2 Undervoltage
BATT2_OV = 20
class-attribute
instance-attribute
Battery #2 Overvoltage
BATT_UV = 21
class-attribute
instance-attribute
Battery Undervoltage (single battery mode)
BATT_OV = 22
class-attribute
instance-attribute
Battery Overvoltage (single battery mode)
MotorDriveStatus
Bases: Enum
The status of each motor in the drivebase
Source code in src/kevinbotlib/states.py
63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
UNKNOWN = 10
class-attribute
instance-attribute
Motor status is unknown
MOVING = 11
class-attribute
instance-attribute
Motor is rotating
HOLDING = 12
class-attribute
instance-attribute
Motor is holding at position
OFF = 13
class-attribute
instance-attribute
Motor is off
BmsBatteryState
Bases: Enum
The status of a single battery attached to the BMS
Source code in src/kevinbotlib/states.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
UNKNOWN = 0
class-attribute
instance-attribute
State is unknown (usually at bootup)
NORMAL = 1
class-attribute
instance-attribute
Battery is normal
UNDER = 2
class-attribute
instance-attribute
Battery is undervoltage
OVER = 3
class-attribute
instance-attribute
Battery is overvoltage
STOPPED = 4
class-attribute
instance-attribute
BMS has crashed or stopped
DrivebaseState
Bases: BaseModel
The state of the drivebase as a whole
Source code in src/kevinbotlib/states.py
95 96 97 98 99 100 101 102 103 104 105 106 107 |
|
left_power: int = 0
class-attribute
instance-attribute
Current power of the left motor
right_power: int = 0
class-attribute
instance-attribute
Current power of the right motor
amps: list[float] = Field(default_factory=lambda: [0, 0])
class-attribute
instance-attribute
Current amps for both motors
watts: list[float] = Field(default_factory=lambda: [0, 0])
class-attribute
instance-attribute
Current watts for both motors
status: list[MotorDriveStatus] = Field(default_factory=lambda: [MotorDriveStatus.UNKNOWN, MotorDriveStatus.UNKNOWN])
class-attribute
instance-attribute
Current status for both motors
ServoState
Bases: BaseModel
The state of the servo subsystem
Source code in src/kevinbotlib/states.py
110 111 112 113 |
|
BMState
Bases: BaseModel
The state of the BMS (Battery Management System)
Source code in src/kevinbotlib/states.py
116 117 118 119 120 121 |
|
IMUState
Bases: BaseModel
The state of the IMU (Inertial Measurement System)
Source code in src/kevinbotlib/states.py
124 125 126 127 128 |
|
ThermometerState
Bases: BaseModel
The state of the DS18B20 Thermometers (does not include BME280)
Source code in src/kevinbotlib/states.py
131 132 133 134 135 136 |
|
EnviroState
Bases: BaseModel
The state of the BME280 Envoronmental sensor
Source code in src/kevinbotlib/states.py
139 140 141 142 143 144 |
|
LightingState
Bases: BaseModel
The state of Kevinbot's led segments
Source code in src/kevinbotlib/states.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
|
KevinbotState
Bases: BaseModel
The state of the robot as a whole
Source code in src/kevinbotlib/states.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
|
KevinbotEyesState
Bases: BaseModel
The state of the eye system
Source code in src/kevinbotlib/states.py
263 264 265 266 267 |
|
KevinbotServerState
Bases: BaseModel
The state system used internally in the Kevinbot Server
Source code in src/kevinbotlib/states.py
270 271 272 273 274 275 276 277 |
|
HandshakeTimeoutException
Bases: BaseException
Exception that is produced when the connection handshake times out
Source code in src/kevinbotlib/exceptions.py
6 7 |
|
Configuration manager for KevinbotLib
ConfigLocation
Bases: Enum
Enum to represent the location of the config file
Source code in src/kevinbotlib/config.py
14 15 16 17 18 19 20 21 |
|
KevinbotConfig
Source code in src/kevinbotlib/config.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
|
dump()
Dump configuration
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
YAML |
Source code in src/kevinbotlib/config.py
250 251 252 253 254 255 256 |
|