resibots/dynamixel_control_hw

Servo not recognised when using dynamixel_control_hw

bdenoun opened this issue · 6 comments

Hi guys,

I installed both libdynamixel and dynamixel_control_hw, and when running my launch file I so have this error message:
1 servo was declared to the hardware interface but could not be found
However when I try it using the command line you provide (./build/src/tools/dynamixel -p /dev/ttyUSB0 -b 57600 list) it finds my MX64.
I also changed the communication time to 4 as stated in the doc!
Any ideas why?

Hi @bdenoun,

Could you share the configuration file you use for this launch file, as well as the ID of the servo you are trying to connect to? I suspect a configuration error.

Hey,
Here is the configuration file I am using:

dynamixel_controllers:
  joint_state_controller:
    type: joint_state_controller/JointStateController
    publish_rate: 10

dynamixel_robot:
    type: dynamixel/hardware_interface_p1
    serial_interface: /dev/ttyUSB0
    loop_frequency: 500
    baudrate: 57600
    read_timeout: 0.01
    scan_timeout: 0.01
    servos:
        dynamixel_1:
            id: 1
            command_interface: position
    default_command_interface: position

Thank you for your help!

Can you confirm that the id of the MX64 that is found by ./build/src/tools/dynamixel -p /dev/ttyUSB0 -b 57600 list is 1?

Besides, what is the parameter dynamixel_robot/type for? This is not how you choose which protocol is used, at least for the launch files I used to write. Maybe you could also share your launch file ?

Yes the output of ./build/src/tools/dynamixel -p /dev/ttyUSB0 -b 57600 list shows that the dynamixel found is a MX64 which id is 1!
The dynamixel_robot/type is used because I am using the robot_hardware_combined interface. But I found out why it is not working! The MX64 provided inside the gripper was set to multi-turn and not joint so apparently it was not able to communicate with it.

Well, I'm sorry not having been able to help you, but happy that you found the solution to your issue.

Indeed, the control mode of an actuator needs to match between the hardware interface's configuration and the actuator. However, I expect that an error or at least a warning would be displayed if there is a mismatch 1. Did you get no error but the one you reported?

No, it was the only message I got... I had a look at the code and saw this line so I did not check the mode set on the servo motor... my bad! Thank you anyway! 👍