Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting ModeOfOperation based on claimed interfaces #88

Open
CaPlasberg opened this issue Oct 30, 2023 · 1 comment
Open

Setting ModeOfOperation based on claimed interfaces #88

CaPlasberg opened this issue Oct 30, 2023 · 1 comment

Comments

@CaPlasberg
Copy link

Hi,
I'm currently using a setup with several drives using the generic CiA402 drive plugin. Each of these drives has an incremental encoder, so homing is an essential procedure during the startup of the robot. This rises two problems: a) I need to change the mode_of_operation while the ros2_ethercat_driver is already running and b) homing requires (at least on the Nanotec PD4-E I'm using) a rising edge of specific bits in the controlword.
I can see two solutions:

  • By creating a command interface for control_word and mode_of_operation, as homing (at least on the drives I use) requires a change to homing mode followed by a rising edge on a special bit of the control word. This also requires several ROS 2 controllers for several operations, e.g., a special homing controller that can be activated and later deactivated as well as a mode_of_operation controller. From my PoV this is bending it for my specific problem but not a proper ROS 2 control approach.
  • My preferred solution includes some more logic inside the hardware interface, which would also require some more advanced configuration. Having a Homing interface that can not be claimed when a position (or velocity / effort) interface is claimed and handles the homing procedure in the hardware interface itself. This, combined with a configuration of which mode to choose based on the claimed interfaces, would be great. Do you have any hints on how to properly implement that with the current plugin interface? Is there a community interest in such a solution?
@mcbed
Copy link
Member

mcbed commented Oct 31, 2023

Hi,
From my perspective, homing operations should be rather handled by a dedicated controller based on the use case, as there are many ways to do it (inside the drive, pure controller, hybrid).
To do what you need, there are 2 options that do not require a dedicated controller :

  • There is a controller (beta) here that, I think, allows you to do what you want: handle mode-of-operation and control-word
  • You can use the services provided by the ethercat_manager package to perform drive homing using SDO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants