arebgun/dynamixel_motor — pull request #22 by nnarayann (2014-10-14 11:18:34+00:00)
Title: Added motor error warning mechanism

Hi Anton,

We've added a mechanism to warn high level nodes if there is any errors with the servos (now just FatalErrorCodeErrors, such as an overload error).
We have created a new custom message named MotorError.msg and added the code necessary to publish the topic with the error info.

MotorError.msg
```
string error_type # error type
string error_message # error message
string extra_info # extra info such a joint number, port...
```

dynamixel_serial_proxy.py
```python
except dynamixel_io.FatalErrorCodeError, fece:
rospy.logerr(fece)
me = MotorError()
me.error_type = "FatalErrorCodeError"
me.error_message = fece.message
me.extra_info = fece.message.split(' ')[3][1:] # get the servo_id
pub = rospy.Publisher('dynamixel_motor_errors', MotorError, queue_size=None)
pub.publish(me)
```

Best,

Alberto.