dcs.robot.abb_config
A class to load the configuration parameters via given path json.
AbbConfig
AbbConfig is a class designed to load configuration parameters from a JSON file.
This class loads configuration parameters from a JSON file located in the project's config directory. It provides timeout settings for robot controller communication.
Attributes:
Name | Type | Description |
---|---|---|
TIMEOUT |
int
|
Timeout in seconds to avoid freezing the main thread if the controller is unavailable. |
TIMEOUT_LONG |
int
|
Extended timeout in seconds for time-consuming processes such as slow motions. |
__init__()
Initialize the ABB configuration by loading parameters from a JSON file.
Sets the following attributes based on the configuration file: - TIMEOUT: Standard timeout for robot communication - TIMEOUT_LONG: Extended timeout for slow operations
Raises:
Type | Description |
---|---|
KeyError
|
If required configuration keys are missing in the JSON file. |
ValueError
|
If the configuration values cannot be converted to integers. |
FileNotFoundError
|
If the configuration file cannot be found. |
JSONDecodeError
|
If the JSON file is malformed. |