You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there!
We are currently experiencing problems with setting a control_word on our motor drives via 'ethercat_driver_ros2'. For context: We want to control a set of actuators, controlled by Synapticon Circulo 9 (CiA402 conform) motor drives using position control from within ROS2 to playback predefined trajectorys. In order to configure some functions on the drive we need to set the control_word to some specific value, at some point in time, transmitting the control_word using ethercat.
We defined the ethercat slave in a .yaml file, that looks like this:
#Configuration file for Synapticon Circulo Motor Drivevendor_id: 0x000022d2product_id: 0x00000302# assign_activate: 0x0300 # DC Synch registerauto_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# # - {index: 0x60C2, sub_index: 1, type: int8, value: 10} # Set interpolation time for cyclic modes to 10 ms#- {index: 0x60C2, sub_index: 2, type: int8, value: -3} # Set base 10-3srpdo: # RxPDO = receive PDO Mapping
- index: 0x1600channels:
- {index: 0x6040, sub_index: 0, type: uint16, command_interface: controlword, default: 0} # Control word
- {index: 0x607a, sub_index: 0, type: int32, command_interface: position, default: .nan} # Target position
- {index: 0x60ff, sub_index: 0, type: int32, default: 0} # Target velocity
- {index: 0x6071, sub_index: 0, type: int16, default: 0} # Target torque
- {index: 0x60b2, sub_index: 0, type: int16, default: 0} # Offset torque
- {index: 0x6060, sub_index: 0, type: int8, command_interface: modeOfOperation, default: 8} # Mode of operation
- {index: 0x2701, sub_index: 0, type: uint32, default: 0} # Tuning command
- index: 0x1601channels:
- {index: 0x60fe, sub_index: 1, type: uint32, default: 0} # Digital Outputs: Physical Outputs
- {index: 0x60fe, sub_index: 2, type: uint32, default: 0} # Digital Outputs: Bit Mask
- index: 0x1602channels:
- {index: 0x60b1, sub_index: 0, type: int32, default: 0} # Offset velocity
- {index: 0x2703, sub_index: 0, type: uint32, default: 0} # User MOSItpdo: # TxPDO = transmit PDO Mapping
- index: 0x1a00channels:
- {index: 0x6041, sub_index: 0, type: uint16, state_interface: statusword} # Status word
- {index: 0x6064, sub_index: 0, type: int32, state_interface: position} # Position actual value
- {index: 0x606c, sub_index: 0, type: int32, state_interface: velocity} # Velocity actual value
- {index: 0x6077, sub_index: 0, type: int16, state_interface: effort} # Torque actual value
- {index: 0x6061, sub_index: 0, type: int8} # Mode of operation display
- {index: 0x60f4, sub_index: 0, type: int32} # Following error actual value
- index: 0x1a01channels:
- {index: 0x2401, sub_index: 0, type: uint16} # Analog input 1
- {index: 0x2402, sub_index: 0, type: uint16} # Analog input 2
- {index: 0x2403, sub_index: 0, type: uint16} # Analog input 3
- {index: 0x2404, sub_index: 0, type: uint16} # Analog input 4
- {index: 0x2702, sub_index: 0, type: uint32} # Tuning status
- index: 0x1a02channels:
- {index: 0x60fd, sub_index: 0, type: uint32} # Digital Inputs
- index: 0x1a03channels:
- {index: 0x2704, sub_index: 0, type: uint32} # User MISO
- {index: 0x20f0, sub_index: 0, type: uint32} # Timestamp
- {index: 0x60fc, sub_index: 0, type: int32} # Position demand internal value
- {index: 0x606b, sub_index: 0, type: int32} # Velocity demand value
- {index: 0x6074, sub_index: 0, type: int16} # Torque demand
We already checked the indicies, they are fine, data types work as well. The xacro file therefore looks like this, it's much longer as it obviously includes multiple drives, this is an example. We also check positions and order in the ethercat signal chain, this is fine as well.
While building the ROS2 control codebase, we roughly followed the tutorial here. Control of the drive works great from here, however we can't figure out if there is a way to set values to the control_word or other registers on the drive that are part of the standard CiA402 set, using the configuration from the aforementioned tutorial.
We tried configuring the drive both as a joint and as a gpio module, but seemingly this doesn't work. The ROS2 node we used in testing looks like this:
We are somewhat clueless as to how we can set the control_word value from a drive configured as a joint, if that is even possible at all and if not if there is any recommended workaround.
We already tried:
Setting the drive up as both a joint and a GPIO
Sending the message to different topics
If someone gives us a hint as to how this can be implemented, we are more than happy to work on this in a pull request and submit it to the project.
Thanks a million in advance!
The text was updated successfully, but these errors were encountered:
You need ros2 controller that claims the control command interface and subscribe to your topic "/gpio_controller/commands" and forward the command to the hardware plugin.
There is a cia402 controller in a PR to this git repo that you can adapt for this purpose.
Hey there!
We are currently experiencing problems with setting a control_word on our motor drives via 'ethercat_driver_ros2'. For context: We want to control a set of actuators, controlled by Synapticon Circulo 9 (CiA402 conform) motor drives using position control from within ROS2 to playback predefined trajectorys. In order to configure some functions on the drive we need to set the control_word to some specific value, at some point in time, transmitting the control_word using ethercat.
We defined the ethercat slave in a .yaml file, that looks like this:
We already checked the indicies, they are fine, data types work as well. The xacro file therefore looks like this, it's much longer as it obviously includes multiple drives, this is an example. We also check positions and order in the ethercat signal chain, this is fine as well.
While building the ROS2 control codebase, we roughly followed the tutorial here. Control of the drive works great from here, however we can't figure out if there is a way to set values to the control_word or other registers on the drive that are part of the standard CiA402 set, using the configuration from the aforementioned tutorial.
We tried configuring the drive both as a joint and as a gpio module, but seemingly this doesn't work. The ROS2 node we used in testing looks like this:
We are somewhat clueless as to how we can set the control_word value from a drive configured as a joint, if that is even possible at all and if not if there is any recommended workaround.
We already tried:
If someone gives us a hint as to how this can be implemented, we are more than happy to work on this in a pull request and submit it to the project.
Thanks a million in advance!
The text was updated successfully, but these errors were encountered: