ICube-Robotics / ethercat_driver_ros2

Hardware Interface for EtherCAT module integration with ros2_control
https://icube-robotics.github.io/ethercat_driver_ros2/
Apache License 2.0
125 stars 32 forks source link

only can read state_interface, cannot write to command_interface #124

Open gitzhangomc opened 3 weeks ago

gitzhangomc commented 3 weeks ago

My servo drive is a 1-to-3 type, with one ECAT slave controlling three servo motors. Currently, the ROS2 EtherCAT driver I configured can read all joints state_interface but cannot write to the command_interface. What could be the issue? This is my Ethercat slave configuration file:

Configuration file for Maxon EPOS3 drive

vendor_id: 0x00000748 product_id: 0x0000000B assign_activate: 0x0300 # DC Synch register auto_fault_reset: false # true = automatic fault reset, false = fault reset on rising edge command interface "reset_fault" auto_state_transitions: true

rpdo: # RxPDO = receive PDO Mapping

wei1224hf commented 3 weeks ago

1600 and 1a00 , these 2 channels are enough , delete others 1a00 is TPDO mapping ,not rpdo, your yaml config file is wrong ,

wei1224hf commented 3 weeks ago

here is the right format :

`

Configuration file for Maxon EPOS3 drive

vendor_id: 0x000000fb product_id: 0x64400000 assign_activate: 0x0300 # DC Synch register auto_fault_reset: false # true = automatic fault reset, false = fault reset on rising edge command interface "reset_fault" sdo: # sdo data to be transferred at drive startup

gaiyi7788 commented 3 weeks ago

I have a similar confusion. Because in a one-to-many slave, each motor has a corresponding address to control the quantities position and speed respectively. If the command_interface has the same name, I don't know which motor to control.

dpflexvn commented 2 weeks ago

Hi @gitzhangomc , I think you should try with 1 servo motor first. I tried with EtherCAT 1.5.2 & Tsino Dynatron, but same issue as you. I will try EtherCAT 1.6 in next week and share. What is your OS ?. kernel version ? ROS version ?.

JensVanhooydonck commented 3 days ago

You could try to add 3 different config files. one with index: 0x1600 and 0x1a00, one with 0x1610 and 0x1a10 and the last one with 0x1620 and 0x1a20. So you can select the config file for one specific joint.