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

Re-sending of previous commands #2

Open
stephane-caron opened this issue Sep 14, 2022 · 1 comment · Fixed by #24
Open

Re-sending of previous commands #2

stephane-caron opened this issue Sep 14, 2022 · 1 comment · Fixed by #24
Assignees
Labels
enhancement New feature or request

Comments

@stephane-caron
Copy link
Member

When the spine is in neither of the following three states:

  • Stop
  • Shutdown
  • Act

Then Spine::cycle_actuation will send the previous command:

    if (state_machine_.state() == State::kSendStops ||
        state_machine_.state() == State::kShutdown) {
      write_stop_commands(actuation_.commands());
    } else if (state_machine_.state() == State::kAct) {
      Dictionary& action = dict_("action");
      write_position_commands(actuation_.commands(),
                              actuation_.servo_joint_map(), action);
    } else {
      // TODO(scaron): clear commands, otherwise the previous ones will be
      // sent again!
    }

This is OK for stop commands, but not OK for infrequent position commands.

@stephane-caron stephane-caron added the enhancement New feature or request label Mar 1, 2023
@stephane-caron stephane-caron self-assigned this Apr 11, 2023
@stephane-caron
Copy link
Member Author

Escalating this issue in light of upkie/upkie#29

stephane-caron added a commit that referenced this issue May 16, 2023
stephane-caron added a commit that referenced this issue May 16, 2023
stephane-caron added a commit that referenced this issue May 1, 2024
Same rationale as the preceding commit.
stephane-caron added a commit that referenced this issue May 1, 2024
Same rationale as the preceding commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

1 participant