Interface
HardwareInterface
Bases: ABC
Abstract base class for hardware interfaces.
This class provides a template for creating hardware interfaces that can control robots or other hardware devices.
Source code in mbodied/hardware/interface.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 |
|
__init__(**kwargs)
abstractmethod
Initializes the hardware interface.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kwargs
|
Additional arguments to pass to the hardware interface. |
{}
|
Source code in mbodied/hardware/interface.py
26 27 28 29 30 31 32 33 |
|
async_do(*args, **kwargs)
async
Asynchronously executes motion.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args
|
Arguments to pass to the hardware interface. |
()
|
|
kwargs
|
Additional arguments to pass to the hardware interface. |
{}
|
Source code in mbodied/hardware/interface.py
45 46 47 48 49 50 51 52 |
|
capture(*args, **kwargs)
Captures continuous data from the hardware.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args
|
Arguments to pass to the hardware interface. |
()
|
|
kwargs
|
Additional arguments to pass to the hardware interface. |
{}
|
Source code in mbodied/hardware/interface.py
63 64 65 66 67 68 69 70 |
|
do(*args, **kwargs)
abstractmethod
Executes motion.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args
|
Arguments to pass to the hardware interface. |
()
|
|
kwargs
|
Additional arguments to pass to the hardware interface. |
{}
|
Source code in mbodied/hardware/interface.py
35 36 37 38 39 40 41 42 43 |
|
fetch(*args, **kwargs)
Fetches data from the hardware.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args
|
Arguments to pass to the hardware interface. |
()
|
|
kwargs
|
Additional arguments to pass to the hardware interface. |
{}
|
Source code in mbodied/hardware/interface.py
54 55 56 57 58 59 60 61 |
|