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

There are a few lines executed in the update-loop that are rather part of the activation procedure #95

Open
destogl opened this issue Apr 14, 2023 · 2 comments

Comments

@destogl
Copy link
Collaborator

destogl commented Apr 14, 2023

Resetting and starting of nodes is rather a part of the activation process, so it shouldn't be done/checked all the time in the update loop. Changing this would lead to clearer code and behavior, but it has some strong drawbacks:

  1. Needs error management inside HW interface. ros2_control supports that (see this PR), but then also all the controllers get deactivated – and they have to manually activated again.
  2. The first point clearly disturbs the prototyping and makes it much harder is someone doesn't understand all the internal mechanisms from ros2_control.
  3. There is currently not possibility to automatically re-activate hardware and controllers which probably is desired scenario is many applications to handle bus errors better, e.g., bus errors caused by use of non-realtime kernel.

// reset node nmt
if (it->second.nmt_state.reset_command())
{
it->second.nmt_state.reset_fbk = static_cast<double>(proxy_driver->reset_node_nmt_command());
}
// start nmt
if (it->second.nmt_state.start_command())
{
it->second.nmt_state.start_fbk = static_cast<double>(proxy_driver->start_node_nmt_command());
}

P.S. I will also extend this in the future with possible solutions when different options are tested in real-world scenarios.

@hellantos
Copy link
Member

@destogl any updates here or is this closable?

@destogl
Copy link
Collaborator Author

destogl commented Jun 14, 2023

I didn't do enough tests yet. So I would keep this open, but it will take time to get it fixed / closed.

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