leggedrobotics / elmo_ethercat_sdk

GNU General Public License v3.0
80 stars 37 forks source link

TxPDO size mismatch: The slave 'rw' expects a size of 0 bytes but the slave found at its address 4 requests 22 bytes). #7

Open MrCCaesar opened 1 year ago

MrCCaesar commented 1 year ago

I tried ros2 run ethercat_device_configurator standalone /home/ros/test_ws/src/wlrzj_description/config/elmo_config/setup.yaml and got

[INFO] [1683983825.952728621] []: Configuration Sanity Check of Elmo 'lw': ✓ drive_state_change_min_timeout ≤ drive_state_change_max_timeout ✓ motor_constant > 0 ✓ motor_rated_current > 0 ✓ max_current > 0 ✓ position_encoder_resolution > 0 ✓ gear_ratio > 0 ✓ direction ∈ {1, -1} ✓ encoder_position ∈ {"motor", "joint"} ✓ mode_of_operation ∈ {"CyclicSynchronousVelocityMode", "CyclicSynchronounsTorqueMode"}

[INFO] [1683983825.953523327] []: Configuration Sanity Check of Elmo 'rw': ✓ drive_state_change_min_timeout ≤ drive_state_change_max_timeout ✓ motor_constant > 0 ✓ motor_rated_current > 0 ✓ max_current > 0 ✓ position_encoder_resolution > 0 ✓ gear_ratio > 0 ✓ direction ∈ {1, -1} ✓ encoder_position ∈ {"motor", "joint"} ✓ mode_of_operation ∈ {"CyclicSynchronousVelocityMode", "CyclicSynchronounsTorqueMode"}

[ INFO] The following 4 slaves have been found and configured: [ INFO] Address: 1 - Name: '? M:0000009a I:00030924' [ INFO] Address: 2 - Name: '? M:0000009a I:00030924' [ INFO] Address: 3 - Name: '? M:0000009a I:00030924' [ INFO] Address: 4 - Name: '? M:0000009a I:00030924' [ INFO] [SOEM_Interface] Slave: 0: State 2 has been reached after 0 tries [ INFO] [SOEM_Interface] Slave: 3: State 2 has been reached after 0 tries [ INFO] Bus 'enp5s0', slave 3: Activating distributed clock synchronization... [ INFO] Bus 'enp5s0', slave 3: Activated distributed clock synchronization. [ INFO] [SOEM_Interface] Slave: 4: State 2 has been reached after 0 tries [ INFO] Bus 'enp5s0', slave 4: Activating distributed clock synchronization... [ INFO] Bus 'enp5s0', slave 4: Activated distributed clock synchronization. [ERROR] [enp5s0] RxPDO size mismatch: The slave 'lw' expects a size of 0 bytes but the slave found at its address 3 requests 18 bytes). [ERROR] [enp5s0] TxPDO size mismatch: The slave 'lw' expects a size of 0 bytes but the slave found at its address 3 requests 22 bytes). [ERROR] [enp5s0] RxPDO size mismatch: The slave 'rw' expects a size of 0 bytes but the slave found at its address 4 requests 18 bytes). [ERROR] [enp5s0] TxPDO size mismatch: The slave 'rw' expects a size of 0 bytes but the slave found at its address 4 requests 22 bytes). Startup not successful.

And this is my setup.yaml

ethercat_master: time_step: 0.001 update_rate_too_low_warn_threshold: 50

ethercat_devices:

Reading: force_append_equal_error: true force_append_equal_fault: false error_storage_capacity: 312 fault_storage_capacity: 412

Hardware: rx_pdo_type: "RxPdoStandard" tx_pdo_type: "TxPdoStandard" mode_of_operation: "CyclicSynchronousVelocityMode" use_multiple_modes_of_operation: true position_encoder_resolution: 8192 # Encoder 'ticks' per encoder revolution gear_ratio: [10,1] # [input revolutions, output revolutions] motor_constant: 0.25 max_current: 25.0 motor_rated_current: 20.0 direction: 1 encoder_position: motor

Where did i do srong? and how can i fix it, thanks

tfabi commented 1 year ago

In EthercatMaster.cpp change the size check flag to false:


bool EthercatMaster::startup(){
  bool success = true;

  success &= bus_->startup(**false**); 

the size check will be a parameter in the next version.