-
Notifications
You must be signed in to change notification settings - Fork 22
Improve HRIM module error management #57
Comments
A quick fix could be to have a bigger error field. Instead of 8 bits use 32. Using the first 8 bits for the HRIM error and the rest for the specific error code. But it's true that probably we need to add a |
IMO it fits better with a service. The error could be signaled in a subfield of a topic, for example as boolean |
As a quick pitch, how about conveying the state (like the F1 you mention @carlossvg) in a general way in state (not just a boolean), and have the specific error information as a service? Might not be necessary and maybe just indicating there is an error, as you say, is enough. I'd say whether we include this into Meaning, if we'll specify possible error codes the list could probably get long quite quickly for a single interface (unless we are going to specify a couple and the rest are implementation-specific), and it would make sense to break that up into components, or at the very least into component types (sensor, actuator...). Alternatively, if we are going to leave it open to be implementation-specific, we could just add it as a generic service. I do have a question with this: wouldn't it being a service instead of a continuously published topic affect logging to some extent? I might be overthinking it, but wouldn't the operator want to know the moment of the error with as much precision as possible? I guess a "logger" node could react to that state change and call the service itself... |
Describe the feature that you would like to include:
This is an open discussion on order to extend HRIM error management.
Additional context
Currently errors in HRIM are just a subfield on certain topics. There is not a common way to deal with errors for all the components. For instance, in the case of HRIM/models/actuator/servo/topics/state.xml the error are specified in field called fault with the following faults:
"FAULT_NONE": 0
"FAULT_CURRENT": 1
"FAULT_TEMPERATURE": 2
"FAULT_BUS_VOLTAGE": 3
"FAULT_BRIDGE_DRIVER": 4
It would be good to have a common definition of error that can be shared by all modules. In this way, error management could be consistent for different types of modules. The error semantic would be different for each component, but not the structure. That means that I can call the same function in order to retrieve the error for an actuator or a gripper.
I propose to follow a structure similar to the one used in CMM machine standard language (I++ DME (Dimensional Measurement Equipment) | NIST) (chapter 8 Error Handling):
In this implementation the error is composed by:
Apart from the message structure we would need to define an error classification for each component type. Some error codes could be common for all modules (i.e: communications failure, generic, wrong parameter, etc..) and other specific for each module type.
The text was updated successfully, but these errors were encountered: