Open paulwetzel opened 2 months ago
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.
Thanks so much @ammaraljodah
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!