# Revision history [back]

### Epos_hardware write output error when running example.launch

Hello,

I am working with EPOS2 70/10 and a maxon EC motor whose shaft is already attached to load. I am using epos_hardware indigo-devel branch package in UBuntu 14.04 x86 4.4.0-38-generic and ROS indigo. I am trying to use the epos_hardware package in order to control velocity on motor. After dealing with the usb rights problems (further info solved in other questions), now I am able to detect the motor using list_devices node. I just adapted the example's launch, urdf and yaml files in order to match my motor settings.

The problem is than when running the launch file (which loads motor settings and enables velocity and position controller) loads the controllers (joint_state and velocity_controller), starts them (look at info message below), the green led is running continously (which means that is properly working) and then the following message appears:

[INFO] [WallTime: 1475677663.913912] Started controllers: joint_state_controller1, velocity_controller1

Write processed successfully, but number of bytes written is 0: Operation now in progress
Write processed successfully, but number of bytes written is 0: Operation now in progress
Write processed successfully, but number of bytes written is 0: Operation now in progress


When trying to set a velocity (rostopic pub /velocity_controller/command std_msgs/Float64 '##'; #:Number between my motor velocity range) the /diagnosis topic shows me this:

---
seq: 501
stamp:
secs: 1475678169
nsecs: 978535919
frame_id: ''
status:
-
level: 0
name: epos_hardware: my_joint_actuator1: Motor
message: Enabled
hardware_id: 662080006194
values:
-
key: Actuator Name
value: test_joint_actuator1
-
key: Enabled
value: True
-
key: Fault
value: False
-
key: Voltage Enabled
value: True
-
key: Quickstop
value: True
-
key: Warning
value: False
-
level: 1
name: epos_hardware: my_joint_actuator1: Motor Output
message: Nominal Current Exceeded (Current: 10.506000 A)
hardware_id: 662080006194
values:
-
key: Commanded Velocity
value: 250 rpm
-
key: Operation Mode
value: Profile Velocity Mode
-
key: Nominal Current
value: 9.8399999999999999 A
-
key: Max Current
value: 10.5 A
-
key: Position
value: 0 rotations
-
key: Velocity
value: 0 rpm
-
key: Torque
value: 10.506 Nm
-
key: Current
value: 10.506 A
-
key: Target Reached
value: True
-
key: Current Limit Active
value: False


So, velocity and position tells me that the shaft is not moving but torque is supposedly not zero (no access to see shaft as is already installed on the machine) and current is even sometimes exceeding my nominal values. From this I take that the problem may be that:

• The load is too much for the motor torque to even move.
• There might be a problem with the epos_library function when accessing to the parameters or a problem with communication.
• Kernel compatibility problem
• Combination of both or other random issue (because former team members were able to run the motor free shaft with this package).

From what I have read, the command library functions return 0 in case that they are unsuccessful so this is the main reason why I am focusing the problem of not moving the load on this error instead of the overload case. Yet, I do not know any way to check which function is returning such an output (should be related with epos_hardware_node).

I would thank you if any of you can make any guess on which may be the problem or how to solve it. Also if there is any other reliable package to control epos2 in ROS. If any further detail is needed I will update the information given.