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

Controller for cia402 drives #61

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

mcbed
Copy link
Member

@mcbed mcbed commented Apr 26, 2023

This PR resolves issue #46.

Controller features for ec_generic_cia402:

  • broadcast drive information based on the status_word
  • broadcast drive mode_of_operation
  • command drive mode_of_operation using services
  • trigger fault_reset service
  • documentation

@mcbed mcbed changed the title Controller for cia402 controlle Controller for cia402 drives Apr 26, 2023
@github-actions
Copy link

github-actions bot commented Apr 26, 2023

Test Results

263 tests  +1   217 ✔️ +1   0s ⏱️ ±0s
  86 suites +1     46 💤 ±0 
  72 files   +1       0 ±0 

Results for commit 7fa8477. ± Comparison against base commit b57675b.

♻️ This comment has been updated with latest results.

@hellantos
Copy link

@mcbed we had some success with using the perform-switch function in system interface in ros2_canopen. It switches the mode depending on the claimed interface. This has the advantage that you can achieve behavior similar to a robot driver (e.g. ur). Probably depends on the targeted use case.

@mcbed
Copy link
Member Author

mcbed commented Jun 13, 2023

@ipa-cmh thanks for the hint, we will try to add this feature in the near future together with lifecycle management in ros2_control

Copy link
Contributor

@JensVanhooydonck JensVanhooydonck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems there is a mismatch in amount of command interfaces and the offset when targeting each command interface

{
controller_interface::InterfaceConfiguration conf;
conf.type = controller_interface::interface_configuration_type::INDIVIDUAL;
conf.names.reserve(dof_names_.size() * 2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be * 3

}
}

command_interfaces_[2 * i + 1].set_value(mode_ops_[i]); // mode_of_operation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 *

}

command_interfaces_[2 * i + 1].set_value(mode_ops_[i]); // mode_of_operation
command_interfaces_[2 * i + 2].set_value(reset_faults_[i]); // reset_fault
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 *

@JensVanhooydonck
Copy link
Contributor

Works good for me with the changes above.

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

Successfully merging this pull request may close these issues.

3 participants